Skip to content

Commit 882ce21

Browse files
committed
action_sheet: Remove backward-compat code for unsupported "mark as unread"
Fixes-partly: #1837
1 parent 9996e0a commit 882ce21

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

lib/widgets/action_sheet.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,8 +1044,6 @@ void showMessageActionSheet({required BuildContext context, required Message mes
10441044
final isComposeBoxOffered = messageListPage.composeBoxState != null;
10451045

10461046
final isMessageRead = message.flags.contains(MessageFlag.read);
1047-
final markAsUnreadSupported = store.zulipFeatureLevel >= 155; // TODO(server-6)
1048-
final showMarkAsUnreadButton = markAsUnreadSupported && isMessageRead;
10491047

10501048
final isSenderMuted = store.isUserMuted(message.senderId);
10511049

@@ -1059,7 +1057,7 @@ void showMessageActionSheet({required BuildContext context, required Message mes
10591057
StarButton(message: message, pageContext: pageContext),
10601058
if (isComposeBoxOffered)
10611059
QuoteAndReplyButton(message: message, pageContext: pageContext),
1062-
if (showMarkAsUnreadButton)
1060+
if (isMessageRead)
10631061
MarkAsUnreadButton(message: message, pageContext: pageContext),
10641062
if (isSenderMuted)
10651063
// The message must have been revealed in order to open this action sheet.

lib/widgets/actions.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ abstract final class ZulipAction {
6666
Message message,
6767
Narrow narrow,
6868
) async {
69-
assert(PerAccountStoreWidget.of(context).zulipFeatureLevel >= 155); // TODO(server-6)
7069
final zulipLocalizations = ZulipLocalizations.of(context);
7170
await updateMessageFlagsStartingFromAnchor(
7271
context: context,

0 commit comments

Comments
 (0)