From aed085b12d3f32f0455ae2f6d7ed62b6f91abe5e Mon Sep 17 00:00:00 2001 From: chimnayajith Date: Thu, 30 Jan 2025 16:25:52 +0530 Subject: [PATCH] store: Add realmIcon and realmName to PerAccountStore --- lib/model/store.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/model/store.dart b/lib/model/store.dart index 7603c7f452..5ec343ce3e 100644 --- a/lib/model/store.dart +++ b/lib/model/store.dart @@ -263,6 +263,8 @@ 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, @@ -270,6 +272,8 @@ class PerAccountStore extends ChangeNotifier with EmojiStore, ChannelStore, Mess realmUrl: realmUrl, realmWildcardMentionPolicy: initialSnapshot.realmWildcardMentionPolicy, realmMandatoryTopics: initialSnapshot.realmMandatoryTopics, + realmName: realmName, + realmIcon: realmIcon, realmWaitingPeriodThreshold: initialSnapshot.realmWaitingPeriodThreshold, maxFileUploadSizeMib: initialSnapshot.maxFileUploadSizeMib, realmDefaultExternalAccounts: initialSnapshot.realmDefaultExternalAccounts, @@ -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, @@ -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.