refactor: Use AppSettings enum based configuration everywhere and fix load from json on web
This commit is contained in:
parent
4f0ed3e93f
commit
4c357f6249
46 changed files with 357 additions and 402 deletions
|
|
@ -112,7 +112,6 @@ class SettingsSecurityController extends State<SettingsSecurity> {
|
|||
void changeShareKeysWith(ShareKeysWith? shareKeysWith) async {
|
||||
if (shareKeysWith == null) return;
|
||||
AppSettings.shareKeysWith.setItem(
|
||||
Matrix.of(context).store,
|
||||
shareKeysWith.name,
|
||||
);
|
||||
Matrix.of(context).client.shareKeysWith = shareKeysWith;
|
||||
|
|
|
|||
|
|
@ -63,16 +63,12 @@ class SettingsSecurityView extends StatelessWidget {
|
|||
title: L10n.of(context).sendTypingNotifications,
|
||||
subtitle:
|
||||
L10n.of(context).sendTypingNotificationsDescription,
|
||||
onChanged: (b) => AppConfig.sendTypingNotifications = b,
|
||||
storeKey: SettingKeys.sendTypingNotifications,
|
||||
defaultValue: AppConfig.sendTypingNotifications,
|
||||
setting: AppSettings.sendTypingNotifications,
|
||||
),
|
||||
SettingsSwitchListTile.adaptive(
|
||||
title: L10n.of(context).sendReadReceipts,
|
||||
subtitle: L10n.of(context).sendReadReceiptsDescription,
|
||||
onChanged: (b) => AppConfig.sendPublicReadReceipts = b,
|
||||
storeKey: SettingKeys.sendPublicReadReceipts,
|
||||
defaultValue: AppConfig.sendPublicReadReceipts,
|
||||
setting: AppSettings.sendPublicReadReceipts,
|
||||
),
|
||||
ListTile(
|
||||
trailing: const Icon(Icons.chevron_right_outlined),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue