Skip to content

Commit c40a8d9

Browse files
store [nfc]: Rename _tryResolveUrl to _tryResolveUrlStr
1 parent 87ddd72 commit c40a8d9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/model/store.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ abstract class PerAccountStoreBase {
436436
/// Resolve [reference] as a URL relative to [realmUrl].
437437
///
438438
/// This returns null if [reference] fails to parse as a URL.
439-
Uri? tryResolveUrl(String reference) => _tryResolveUrl(realmUrl, reference);
439+
Uri? tryResolveUrl(String reference) => _tryResolveUrlStr(realmUrl, reference);
440440

441441
/// Always equal to `connection.zulipFeatureLevel`
442442
/// and `account.zulipFeatureLevel`.
@@ -465,10 +465,10 @@ abstract class PerAccountStoreBase {
465465
int get selfUserId => core.selfUserId;
466466
}
467467

468-
const _tryResolveUrl = tryResolveUrl;
468+
const _tryResolveUrlStr = tryResolveUrlStr;
469469

470470
/// Like [Uri.resolve], but on failure return null instead of throwing.
471-
Uri? tryResolveUrl(Uri baseUrl, String reference) {
471+
Uri? tryResolveUrlStr(Uri baseUrl, String reference) {
472472
try {
473473
return baseUrl.resolve(reference);
474474
} on FormatException {

test/widgets/content_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ void main() {
401401
// The image indeed has an invalid URL.
402402
final expectedImages = (example.expectedNodes[0] as ImagePreviewNodeList).imagePreviews;
403403
check(() => Uri.parse(expectedImages.single.srcUrl)).throws<void>();
404-
check(tryResolveUrl(eg.realmUrl, expectedImages.single.srcUrl)).isNull();
404+
check(tryResolveUrlStr(eg.realmUrl, expectedImages.single.srcUrl)).isNull();
405405
// The MessageImagePreview has shown up,
406406
// but it doesn't attempt a RealmContentNetworkImage.
407407
check(tester.widgetList(find.byType(MessageImagePreview))).isNotEmpty();

0 commit comments

Comments
 (0)