From 55049fc3e6471bba0706951204102db27d128900 Mon Sep 17 00:00:00 2001 From: El-Hassan Wanas Date: Tue, 27 Sep 2022 10:48:55 +0300 Subject: [PATCH 1/4] Point links within a release to the released versions --- lib/constants/app_constants.dart | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/constants/app_constants.dart b/lib/constants/app_constants.dart index 2574f2b1..5e76e82d 100644 --- a/lib/constants/app_constants.dart +++ b/lib/constants/app_constants.dart @@ -188,14 +188,15 @@ const String FAQ = 'FAQ'; const String PRIVACY = 'Privacy Policy'; const String TERMS = 'Terms'; -const String FEEDBACK_LINK = - 'https://github.com/LeastAuthority/destiny/blob/main/FAQ.md#contact'; -const String FAQ_LINK = - 'https://github.com/LeastAuthority/destiny/blob/main/FAQ.md'; -const String PRIVACY_LINK = - 'https://github.com/LeastAuthority/destiny/blob/main/PRIVACY-POLICY.md'; -const String TERMS_LINK = - 'https://github.com/LeastAuthority/destiny/blob/main/TERMS.md'; +String projectLink(String path) { + final blob = const String.fromEnvironment("version", defaultValue: "main"); + return 'https://github.com/LeastAuthority/destiny/blob/$blob/$path'; +} + +final String FEEDBACK_LINK = projectLink('FAQ.md#contact'); +final String FAQ_LINK = projectLink('FAQ.md'); +final String PRIVACY_LINK = projectLink('PRIVACY-POLICY.md'); +final String TERMS_LINK = projectLink('TERMS.md'); const String ERR_WRONG_CODE_RECEIVER = """Oops.. If you’re sure this is the right code: Either the sender is no longer connected, or the code was already used. From c24cebf7bb33d929cbd188c17b2e4397acd43483 Mon Sep 17 00:00:00 2001 From: El-Hassan Wanas Date: Tue, 27 Sep 2022 14:05:34 +0300 Subject: [PATCH 2/4] Update plugin to fix file size verfication --- dart_wormhole_william | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dart_wormhole_william b/dart_wormhole_william index 0dadfe87..fba7b29a 160000 --- a/dart_wormhole_william +++ b/dart_wormhole_william @@ -1 +1 @@ -Subproject commit 0dadfe873291b9c73d967cd21461e745ee4f82ec +Subproject commit fba7b29a7b43690ae9e986a04f399b0bacc342f6 From c22a1aac8d0affdc3aee1772915f8569f8cfdc3d Mon Sep 17 00:00:00 2001 From: El-Hassan Wanas Date: Tue, 27 Sep 2022 14:06:02 +0300 Subject: [PATCH 3/4] Ensure setPosition is synchronous --- lib/views/shared/util.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/views/shared/util.dart b/lib/views/shared/util.dart index 5f3f0a3b..aec6ed4d 100644 --- a/lib/views/shared/util.dart +++ b/lib/views/shared/util.dart @@ -113,7 +113,7 @@ extension WriteOnlyFileFile on File { }, close: () async { await (await openFile).close(); }, setPosition: (int position) async { - (await openFile).setPosition(position); + await (await openFile).setPosition(position); }, getPosition: () async { return await (await openFile).position(); }, metadata: () async { From 454d96179215080ea6705cc657429875d0f06530 Mon Sep 17 00:00:00 2001 From: El-Hassan Wanas Date: Tue, 27 Sep 2022 14:33:09 +0300 Subject: [PATCH 4/4] Restrict version-specific link to the T&C only --- lib/constants/app_constants.dart | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/constants/app_constants.dart b/lib/constants/app_constants.dart index 5e76e82d..1a41cc1f 100644 --- a/lib/constants/app_constants.dart +++ b/lib/constants/app_constants.dart @@ -188,14 +188,15 @@ const String FAQ = 'FAQ'; const String PRIVACY = 'Privacy Policy'; const String TERMS = 'Terms'; -String projectLink(String path) { - final blob = const String.fromEnvironment("version", defaultValue: "main"); - return 'https://github.com/LeastAuthority/destiny/blob/$blob/$path'; +String projectLink(String path, {String? blob}) { + final finalBlob = + blob ?? const String.fromEnvironment("version", defaultValue: "main"); + return 'https://github.com/LeastAuthority/destiny/blob/$finalBlob/$path'; } -final String FEEDBACK_LINK = projectLink('FAQ.md#contact'); -final String FAQ_LINK = projectLink('FAQ.md'); -final String PRIVACY_LINK = projectLink('PRIVACY-POLICY.md'); +final String FEEDBACK_LINK = projectLink('FAQ.md#contact', blob: "main"); +final String FAQ_LINK = projectLink('FAQ.md', blob: "main"); +final String PRIVACY_LINK = projectLink('PRIVACY-POLICY.md', blob: "main"); final String TERMS_LINK = projectLink('TERMS.md'); const String ERR_WRONG_CODE_RECEIVER = """Oops..