Skip to content

Commit d33cba5

Browse files
committed
test: Bump recentZulipFeatureLevel to FL 334, from FL 278
In particular, this assumes support for empty topics in our app code. To make sure we are aware of possible behavior changes in the app code we test against. Here's a helpful `git grep` command and its result (thanks to "zulipFeatureLevel" being quite a greppable name): ``` $ git grep 'zulipFeatureLevel [<|>]' lib lib/api/model/narrow.dart: final supportsOperatorDm = zulipFeatureLevel >= 177; // TODO(server-7) lib/api/model/narrow.dart: final supportsOperatorWith = zulipFeatureLevel >= 271; // TODO(server-9) lib/model/autocomplete.dart: final isChannelWildcardAvailable = store.zulipFeatureLevel >= 247; // TODO(server-9) lib/model/autocomplete.dart: final isTopicWildcardAvailable = store.zulipFeatureLevel >= 224; // TODO(server-8) lib/model/compose.dart: final isChannelWildcardAvailable = store.zulipFeatureLevel >= 247; // TODO(server-9) lib/model/compose.dart: final isTopicWildcardAvailable = store.zulipFeatureLevel >= 224; // TODO(server-8) lib/model/store.dart: assert(zulipFeatureLevel >= 334); lib/model/store.dart: if (zulipFeatureLevel >= 163) { // TODO(server-7) lib/model/store.dart: bool get isUnsupported => zulipFeatureLevel < kMinSupportedZulipFeatureLevel; lib/widgets/action_sheet.dart: final supportsUnmutingTopics = store.zulipFeatureLevel >= 170; lib/widgets/action_sheet.dart: final supportsFollowingTopics = store.zulipFeatureLevel >= 219; lib/widgets/action_sheet.dart: final markAsUnreadSupported = store.zulipFeatureLevel >= 155; // TODO(server-6) lib/widgets/actions.dart: final useLegacy = store.zulipFeatureLevel < 155; // TODO(server-6) lib/widgets/actions.dart: assert(PerAccountStoreWidget.of(context).zulipFeatureLevel >= 155); // TODO(server-6) lib/widgets/autocomplete.dart: final isChannelWildcardAvailable = store.zulipFeatureLevel >= 247; // TODO(server-9) lib/widgets/compose_box.dart: if (store.zulipFeatureLevel < 334) { lib/widgets/compose_box.dart: if (store.zulipFeatureLevel >= 334) { ``` We can tell that this bump only affects 3 entries from above: ``` lib/model/store.dart: assert(zulipFeatureLevel >= 334); lib/widgets/compose_box.dart: if (store.zulipFeatureLevel < 334) { lib/widgets/compose_box.dart: if (store.zulipFeatureLevel >= 334) { ``` All are related to the FL 334 (general chat) changes. We could have bumped it further to FL 334+, but that's beyond the needs of changes that follow.
1 parent 2739149 commit d33cba5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/model/store.dart

+1
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ class PerAccountStore extends PerAccountStoreBase with ChangeNotifier, EmojiStor
577577
/// be empty otherwise.
578578
// TODO(server-10) simplify this
579579
String get realmEmptyTopicDisplayName {
580+
assert(zulipFeatureLevel >= 334);
580581
assert(_realmEmptyTopicDisplayName != null); // TODO(log)
581582
return _realmEmptyTopicDisplayName ?? 'general chat';
582583
}

test/example_data.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ final Uri realmUrl = Uri.parse('https://chat.example/');
7676
Uri get _realmUrl => realmUrl;
7777

7878
const String recentZulipVersion = '9.0';
79-
const int recentZulipFeatureLevel = 278;
79+
const int recentZulipFeatureLevel = 334;
8080
const int futureZulipFeatureLevel = 9999;
8181
const int ancientZulipFeatureLevel = kMinSupportedZulipFeatureLevel - 1;
8282

0 commit comments

Comments
 (0)