refactor: Migrate more config options to config viewer
Signed-off-by: Krille <c.kussowski@famedly.com>
This commit is contained in:
parent
cc7ca62f01
commit
5a96438ceb
5 changed files with 22 additions and 18 deletions
|
|
@ -24,6 +24,7 @@ import 'matrix_sdk_extensions/flutter_matrix_dart_sdk_database/builder.dart';
|
|||
|
||||
abstract class ClientManager {
|
||||
static const String clientNamespace = 'im.fluffychat.store.clients';
|
||||
|
||||
static Future<List<Client>> getClients({
|
||||
bool initialize = true,
|
||||
required SharedPreferences store,
|
||||
|
|
@ -101,7 +102,7 @@ abstract class ClientManager {
|
|||
: NativeImplementationsIsolate(compute);
|
||||
|
||||
static Client createClient(String clientName, SharedPreferences store) {
|
||||
final shareKeysWith = store.getString(SettingKeys.shareKeysWith) ?? 'all';
|
||||
final shareKeysWith = AppSettings.shareKeysWith.getItem(store);
|
||||
|
||||
return Client(
|
||||
clientName,
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ Future<String?> getDatabaseCipher() async {
|
|||
|
||||
void _sendNoEncryptionWarning(Object exception) async {
|
||||
final store = await SharedPreferences.getInstance();
|
||||
final isStored = store.getBool(SettingKeys.noEncryptionWarningShown);
|
||||
final isStored = AppSettings.noEncryptionWarningShown.getItem(store);
|
||||
|
||||
if (isStored == true) return;
|
||||
|
||||
|
|
@ -63,5 +63,5 @@ void _sendNoEncryptionWarning(Object exception) async {
|
|||
exception.toString(),
|
||||
);
|
||||
|
||||
await store.setBool(SettingKeys.noEncryptionWarningShown, true);
|
||||
await AppSettings.noEncryptionWarningShown.setItem(store, true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue