Skip to content

Commit c51107e

Browse files
committed
action_sheet: Remove backward-compat code for old special edit-limit value
Fixes-partly: zulip#1837
1 parent 8be9215 commit c51107e

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
@@ -1144,10 +1144,7 @@ bool _getShouldShowEditButton(BuildContext pageContext, Message message) {
11441144

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

11521149
return message.senderId == store.selfUserId
11531150
&& isComposeBoxOffered

test/widgets/action_sheet_test.dart

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

21822182
testVisibility(true);
2183-
// TODO(server-6) limit 0 not expected on 6.0+
2184-
testVisibility(true, limit: 0);
21852183
testVisibility(true, limit: 600);
21862184
testVisibility(true, narrow: ChannelNarrow(1));
21872185

0 commit comments

Comments
 (0)