Skip to content

Commit 3017ba6

Browse files
gnpricechrisbobbe
authored andcommitted
actions [nfc]: Namespace actions as statics on a ZulipAction class
This makes it explicit at each call site that the method being called is an action, not (for example) an API endpoint binding. The difference is important in particular because it affects how -- really, whether -- the caller should handle errors. See discussion from when the similarity in appearance to API endpoint bindings caused confusion: https://chat.zulip.org/#narrow/channel/516-mobile-dev-help/topic/.23F1317.20showErrorDialog/near/2080570
1 parent 4f438d3 commit 3017ba6

File tree

4 files changed

+207
-206
lines changed

4 files changed

+207
-206
lines changed

lib/widgets/action_sheet.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,8 @@ class MarkAsUnreadButton extends MessageActionSheetMenuItemButton {
796796

797797
@override void onPressed() async {
798798
final narrow = findMessageListPage().narrow;
799-
unawaited(markNarrowAsUnreadFromMessage(pageContext, message, narrow));
799+
unawaited(ZulipAction.markNarrowAsUnreadFromMessage(pageContext,
800+
message, narrow));
800801
}
801802
}
802803

0 commit comments

Comments
 (0)