Skip to content

Commit

Permalink
store: Add realmIcon and realmName to PerAccountStore
Browse files Browse the repository at this point in the history
  • Loading branch information
chimnayajith committed Jan 31, 2025
1 parent f0878c9 commit aed085b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/model/store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,17 @@ class PerAccountStore extends ChangeNotifier with EmojiStore, ChannelStore, Mess
assert(connection.zulipFeatureLevel == account.zulipFeatureLevel);

final realmUrl = account.realmUrl;
final realmName = initialSnapshot.realmName;
final realmIcon = initialSnapshot.realmIconUrl;
final channels = ChannelStoreImpl(initialSnapshot: initialSnapshot);
return PerAccountStore._(
globalStore: globalStore,
connection: connection,
realmUrl: realmUrl,
realmWildcardMentionPolicy: initialSnapshot.realmWildcardMentionPolicy,
realmMandatoryTopics: initialSnapshot.realmMandatoryTopics,
realmName: realmName,
realmIcon: realmIcon,
realmWaitingPeriodThreshold: initialSnapshot.realmWaitingPeriodThreshold,
maxFileUploadSizeMib: initialSnapshot.maxFileUploadSizeMib,
realmDefaultExternalAccounts: initialSnapshot.realmDefaultExternalAccounts,
Expand Down Expand Up @@ -315,6 +319,8 @@ class PerAccountStore extends ChangeNotifier with EmojiStore, ChannelStore, Mess
required this.realmUrl,
required this.realmWildcardMentionPolicy,
required this.realmMandatoryTopics,
required this.realmName,
required this.realmIcon,
required this.realmWaitingPeriodThreshold,
required this.maxFileUploadSizeMib,
required this.realmDefaultExternalAccounts,
Expand Down Expand Up @@ -373,6 +379,9 @@ class PerAccountStore extends ChangeNotifier with EmojiStore, ChannelStore, Mess
/// Always equal to `account.realmUrl` and `connection.realmUrl`.
final Uri realmUrl;

final String realmName;
final String realmIcon;

/// Resolve [reference] as a URL relative to [realmUrl].
///
/// This returns null if [reference] fails to parse as a URL.
Expand Down

0 comments on commit aed085b

Please sign in to comment.