Skip to content

Commit

Permalink
Restrict version-specific link to the T&C only
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanas committed Sep 27, 2022
1 parent 0b7b99f commit 35435ff
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/constants/app_constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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..
Expand Down

0 comments on commit 35435ff

Please sign in to comment.