@@ -302,6 +302,7 @@ class PerAccountStore extends ChangeNotifier with EmojiStore, UserStore, Channel
302
302
realmMandatoryTopics: initialSnapshot.realmMandatoryTopics,
303
303
realmWaitingPeriodThreshold: initialSnapshot.realmWaitingPeriodThreshold,
304
304
maxFileUploadSizeMib: initialSnapshot.maxFileUploadSizeMib,
305
+ realmEmptyTopicDisplayName: initialSnapshot.realmEmptyTopicDisplayName,
305
306
realmDefaultExternalAccounts: initialSnapshot.realmDefaultExternalAccounts,
306
307
customProfileFields: _sortCustomProfileFields (initialSnapshot.customProfileFields),
307
308
emailAddressVisibility: initialSnapshot.emailAddressVisibility,
@@ -344,6 +345,7 @@ class PerAccountStore extends ChangeNotifier with EmojiStore, UserStore, Channel
344
345
required this .realmMandatoryTopics,
345
346
required this .realmWaitingPeriodThreshold,
346
347
required this .maxFileUploadSizeMib,
348
+ required String ? realmEmptyTopicDisplayName,
347
349
required this .realmDefaultExternalAccounts,
348
350
required this .customProfileFields,
349
351
required this .emailAddressVisibility,
@@ -362,6 +364,7 @@ class PerAccountStore extends ChangeNotifier with EmojiStore, UserStore, Channel
362
364
assert (realmUrl == connection.realmUrl),
363
365
assert (emoji.realmUrl == realmUrl),
364
366
_globalStore = globalStore,
367
+ _realmEmptyTopicDisplayName = realmEmptyTopicDisplayName,
365
368
_emoji = emoji,
366
369
_users = users,
367
370
_channels = channels,
@@ -414,6 +417,18 @@ class PerAccountStore extends ChangeNotifier with EmojiStore, UserStore, Channel
414
417
/// For docs, please see [InitialSnapshot.realmWaitingPeriodThreshold] .
415
418
final int realmWaitingPeriodThreshold; // TODO(#668): update this realm setting
416
419
final int maxFileUploadSizeMib; // No event for this.
420
+
421
+ /// The display name to use for empty topics.
422
+ ///
423
+ /// This should only be accessed when FL >= 334, since topics cannot
424
+ /// be empty otherwise.
425
+ // TODO(server-10) simplify this
426
+ String get realmEmptyTopicDisplayName {
427
+ assert (_realmEmptyTopicDisplayName != null ); // TODO(log)
428
+ return _realmEmptyTopicDisplayName ?? 'general chat' ;
429
+ }
430
+ final String ? _realmEmptyTopicDisplayName; // TODO(#668): update this realm setting
431
+
417
432
final Map <String , RealmDefaultExternalAccount > realmDefaultExternalAccounts;
418
433
List <CustomProfileField > customProfileFields;
419
434
/// For docs, please see [InitialSnapshot.emailAddressVisibility] .
0 commit comments