Skip to content

Commit a4879a9

Browse files
committed
compose_box: make current time testable
1 parent cd8e68a commit a4879a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/widgets/compose_box.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2065,7 +2065,7 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
20652065
case TopicNarrow(:final streamId):
20662066
final channel = store.streams[streamId];
20672067
if (channel == null || !store.hasPostingPermission(inChannel: channel,
2068-
user: store.selfUser, byDate: DateTime.now())) {
2068+
user: store.selfUser, byDate: ZulipBinding.instance.utcNow())) {
20692069
return _ErrorBanner(getLabel: (zulipLocalizations) =>
20702070
zulipLocalizations.errorBannerCannotPostInChannelLabel);
20712071
}

0 commit comments

Comments
 (0)