Skip to content

Commit 175c1a1

Browse files
committed
action_sheet: Remove backward-compat code for old special edit-limit value
Fixes-partly: zulip#1837
1 parent 51f6c7d commit 175c1a1

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

lib/widgets/action_sheet.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,10 +1146,7 @@ bool _getShouldShowEditButton(BuildContext pageContext, Message message) {
11461146

11471147
final now = ZulipBinding.instance.utcNow().millisecondsSinceEpoch ~/ 1000;
11481148
final editLimit = store.realmMessageContentEditLimitSeconds;
1149-
final outsideEditLimit =
1150-
editLimit != null
1151-
&& editLimit != 0 // TODO(server-6) remove (pre-FL 138, 0 represents no limit)
1152-
&& now - message.timestamp > editLimit;
1149+
final outsideEditLimit = editLimit != null && now - message.timestamp > editLimit;
11531150

11541151
return message.senderId == store.selfUserId
11551152
&& isComposeBoxOffered

test/widgets/action_sheet_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,8 +2196,6 @@ void main() {
21962196
}
21972197

21982198
testVisibility(true);
2199-
// TODO(server-6) limit 0 not expected on 6.0+
2200-
testVisibility(true, limit: 0);
22012199
testVisibility(true, limit: 600);
22022200
testVisibility(true, narrow: ChannelNarrow(1));
22032201

0 commit comments

Comments
 (0)