From 35435ffa77739544b3172968ceccf28228ca4923 Mon Sep 17 00:00:00 2001 From: El-Hassan Wanas Date: Tue, 27 Sep 2022 14:33:09 +0300 Subject: [PATCH] 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..