chore: Make privacy url not configurable
This commit is contained in:
parent
b856e83e83
commit
136ddd7681
5 changed files with 13 additions and 10 deletions
|
|
@ -50,4 +50,10 @@ abstract class AppConfig {
|
|||
host: 'servers.joinmatrix.org',
|
||||
path: 'servers.json',
|
||||
);
|
||||
|
||||
static final Uri privacyUrl = Uri(
|
||||
scheme: 'https',
|
||||
host: 'github.com',
|
||||
path: '/krille-chan/fluffychat/blob/main/PRIVACY.md',
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,10 +52,6 @@ enum AppSettings<T> {
|
|||
// AppConfig-mirrored settings
|
||||
applicationName<String>('chat.fluffy.application_name', 'FluffyChat'),
|
||||
defaultHomeserver<String>('chat.fluffy.default_homeserver', 'matrix.org'),
|
||||
privacyUrl<String>(
|
||||
'chat.fluffy.privacy_url',
|
||||
'https://github.com/krille-chan/fluffychat/blob/main/PRIVACY.md',
|
||||
),
|
||||
// colorSchemeSeed stored as ARGB int
|
||||
colorSchemeSeedInt<int>(
|
||||
'chat.fluffy.color_scheme_seed',
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import 'package:flutter_web_auth_2/flutter_web_auth_2.dart';
|
|||
import 'package:go_router/go_router.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
import 'package:universal_html/html.dart' as html;
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/setting_keys.dart';
|
||||
|
|
@ -212,7 +212,7 @@ class HomeserverPickerController extends State<HomeserverPicker> {
|
|||
case MoreLoginActions.importBackup:
|
||||
restoreBackup();
|
||||
case MoreLoginActions.privacy:
|
||||
launchUrlString(AppSettings.privacyUrl.value);
|
||||
launchUrl(AppConfig.privacyUrl);
|
||||
case MoreLoginActions.about:
|
||||
PlatformInfos.showDialog(context);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@ import 'package:flutter/material.dart';
|
|||
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:matrix/matrix.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
import 'package:fluffychat/config/setting_keys.dart';
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/l10n/l10n.dart';
|
||||
import 'package:fluffychat/utils/fluffy_share.dart';
|
||||
|
|
@ -244,7 +245,7 @@ class SettingsView extends StatelessWidget {
|
|||
ListTile(
|
||||
leading: const Icon(Icons.privacy_tip_outlined),
|
||||
title: Text(L10n.of(context).privacy),
|
||||
onTap: () => launchUrlString(AppSettings.privacyUrl.value),
|
||||
onTap: () => launchUrl(AppConfig.privacyUrl),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.info_outline_rounded),
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/setting_keys.dart';
|
||||
import 'package:fluffychat/config/themes.dart';
|
||||
import 'package:fluffychat/l10n/l10n.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
|
|
@ -108,7 +108,7 @@ class _PrivacyButtons extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => launchUrlString(AppSettings.privacyUrl.value),
|
||||
onPressed: () => launchUrl(AppConfig.privacyUrl),
|
||||
child: Text(
|
||||
L10n.of(context).privacy,
|
||||
style: shadowTextStyle,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue