Skip to content

Commit ba9c636

Browse files
committed
action_sheet: Remove backward-compat code for old special edit-limit value
Fixes-partly: #1837
1 parent 76ceacd commit ba9c636

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

11081108
final now = ZulipBinding.instance.utcNow().millisecondsSinceEpoch ~/ 1000;
11091109
final editLimit = store.realmMessageContentEditLimitSeconds;
1110-
final outsideEditLimit =
1111-
editLimit != null
1112-
&& editLimit != 0 // TODO(server-6) remove (pre-FL 138, 0 represents no limit)
1113-
&& now - message.timestamp > editLimit;
1110+
final outsideEditLimit = editLimit != null && now - message.timestamp > editLimit;
11141111

11151112
return message.senderId == store.selfUserId
11161113
&& isComposeBoxOffered

test/widgets/action_sheet_test.dart

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

22042204
testVisibility(true);
2205-
// TODO(server-6) limit 0 not expected on 6.0+
2206-
testVisibility(true, limit: 0);
22072205
testVisibility(true, limit: 600);
22082206
testVisibility(true, narrow: ChannelNarrow(1));
22092207

0 commit comments

Comments
 (0)