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 diff --git a/lib/constants/app_constants.dart b/lib/constants/app_constants.dart index 2574f2b1..1a41cc1f 100644 --- a/lib/constants/app_constants.dart +++ b/lib/constants/app_constants.dart @@ -188,14 +188,16 @@ 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, {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', 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.. If you’re sure this is the right code: Either the sender is no longer connected, or the code was already used. 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 {