Skip to content

Commit

Permalink
action_sheet [nfc]: Comment on user-topic button about client-side check
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
chrisbobbe committed Jan 30, 2025
1 parent 7a6546d commit 8fefcbd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/widgets/action_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ class UserTopicUpdateButton extends ActionSheetMenuItemButton {
}

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

0 comments on commit 8fefcbd

Please sign in to comment.