-
Notifications
You must be signed in to change notification settings - Fork 350
Show current organization's name and logo atop main menu #1937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
87ddd72
c40a8d9
83f3f9e
c9c67d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -436,7 +436,7 @@ abstract class PerAccountStoreBase { | |
| /// Resolve [reference] as a URL relative to [realmUrl]. | ||
| /// | ||
| /// This returns null if [reference] fails to parse as a URL. | ||
| Uri? tryResolveUrl(String reference) => _tryResolveUrl(realmUrl, reference); | ||
| Uri? tryResolveUrl(String reference) => _tryResolveUrlStr(realmUrl, reference); | ||
|
|
||
| /// Always equal to `connection.zulipFeatureLevel` | ||
| /// and `account.zulipFeatureLevel`. | ||
|
|
@@ -465,10 +465,10 @@ abstract class PerAccountStoreBase { | |
| int get selfUserId => core.selfUserId; | ||
| } | ||
|
|
||
| const _tryResolveUrl = tryResolveUrl; | ||
| const _tryResolveUrlStr = tryResolveUrlStr; | ||
|
|
||
| /// Like [Uri.resolve], but on failure return null instead of throwing. | ||
| Uri? tryResolveUrl(Uri baseUrl, String reference) { | ||
| Uri? tryResolveUrlStr(Uri baseUrl, String reference) { | ||
|
Comment on lines
475
to
+476
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we move this helper to a different file, like maybe lib/basic.dart? It's a convenience function encapsulating some control flow (a try/catch) and doesn't depend on details of a store. Ditto the new, parallel helper that you're adding, which takes a
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or, alternatively, I think we could just make both of these helpers private. |
||
| try { | ||
| return baseUrl.resolve(reference); | ||
| } on FormatException { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -401,7 +401,7 @@ void main() { | |
| // The image indeed has an invalid URL. | ||
| final expectedImages = (example.expectedNodes[0] as ImagePreviewNodeList).imagePreviews; | ||
| check(() => Uri.parse(expectedImages.single.srcUrl)).throws<void>(); | ||
| check(tryResolveUrl(eg.realmUrl, expectedImages.single.srcUrl)).isNull(); | ||
| check(tryResolveUrlStr(eg.realmUrl, expectedImages.single.srcUrl)).isNull(); | ||
|
Comment on lines
403
to
+404
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The rename brings attention to this existing check 🙂 which looks redundant with the one above it ( |
||
| // The MessageImagePreview has shown up, | ||
| // but it doesn't attempt a RealmContentNetworkImage. | ||
| check(tester.widgetList(find.byType(MessageImagePreview))).isNotEmpty(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flutter analyzeis complaining to me at this commit: