Skip to content

Commit ad5723d

Browse files
committed
action_sheet [nfc]: Comment on user-topic button about client-side check
Zixuan points out that this could be helpful here: zulip#1301 (comment) This probably makes sense to not do until zulip#1078, when we'll have separate buttons for each of the four possible user-topic states. This same comment *could* be added on various other action-sheet buttons. But realistically it wouldn't make a difference on any that we've implemented so far: all the others (besides this and ResolveUnresolveButton) are on the message action sheet, and they're all about actions that would only be done by the self-user -- starring, marking as unread, etc. -- so they can't be done without the user's awareness, and will rarely be done anyway because you'd need to do it on a different client.
1 parent 12f4540 commit ad5723d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: lib/widgets/action_sheet.dart

+4
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,10 @@ class UserTopicUpdateButton extends ActionSheetMenuItemButton {
361361
}
362362

363363
@override void onPressed() async {
364+
// Could implement client-side check on whether the action was done between
365+
// opening the action sheet and pressing the button.
366+
// Like in ResolveUnresolveButton;
367+
// see also dartdoc of [ActionSheetMenuItemButton].
364368
try {
365369
await updateUserTopicCompat(
366370
PerAccountStoreWidget.of(pageContext).connection,

0 commit comments

Comments
 (0)