From faa4707e0bb4ebaf1620b3bdad891dd3ecf806fa Mon Sep 17 00:00:00 2001 From: Chris Bobbe Date: Tue, 28 Jan 2025 16:32:52 -0800 Subject: [PATCH] action_sheet [nfc]: Comment on user-topic button about client-side check Zixuan points out that this could be helpful here: https://github.com/zulip/zulip-flutter/pull/1301#discussion_r1932747085 This probably makes sense to not do until #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. --- lib/widgets/action_sheet.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/widgets/action_sheet.dart b/lib/widgets/action_sheet.dart index 478a91582e5..6c7ea2ea92a 100644 --- a/lib/widgets/action_sheet.dart +++ b/lib/widgets/action_sheet.dart @@ -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,