Skip to content

Commit b8e0143

Browse files
store: Replace realmIcon getter with resolvedRealmIcon
We almost always need the full resolved realm icon URL, so provide a getter that does that.
1 parent ea5cd48 commit b8e0143

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/model/store.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,11 @@ abstract class PerAccountStoreBase {
426426
/// Always equal to `account.realmName`.
427427
String get realmName => account.realmName!;
428428

429-
/// Always equal to `account.realmIcon`.
430-
Uri get realmIcon => account.realmIcon!;
429+
/// The full, resolved URL for the Zulip realm icon.
430+
///
431+
/// Returned URL is derived by resolving [account.realmIcon] (relative) URL
432+
/// against the base [realmUrl].
433+
Uri get resolvedRealmIcon => realmUrl.resolveUri(account.realmIcon!);
431434

432435
/// Resolve [reference] as a URL relative to [realmUrl].
433436
///

0 commit comments

Comments
 (0)