From 41577ada6d60c6f09a9d8d8f9cdc4d1e869d8666 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Thu, 30 Jan 2020 13:45:35 +0000 Subject: [PATCH] Fix store --- lib/utils/famedlysdk_store.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utils/famedlysdk_store.dart b/lib/utils/famedlysdk_store.dart index 91691bb..46c6c69 100644 --- a/lib/utils/famedlysdk_store.dart +++ b/lib/utils/famedlysdk_store.dart @@ -15,7 +15,7 @@ class Store extends StoreAPI { final FlutterSecureStorage secureStorage; Store(this.client) - : storage = !kIsWeb ? null : LocalStorage('LocalStorage'), + : storage = LocalStorage('LocalStorage'), secureStorage = kIsWeb ? null : FlutterSecureStorage() { _init(); } @@ -351,8 +351,8 @@ class ExtendedStore extends Store implements ExtendedStoreAPI { if (type == "history") return null; - if (type != "account_data" && eventUpdate.content["event_id"] != null || - eventUpdate.content["state_key"] != null) { + if (type != "account_data" && + eventUpdate.content.containsKey("state_key")) { final String now = DateTime.now().millisecondsSinceEpoch.toString(); txn.rawInsert( "INSERT OR REPLACE INTO RoomStates VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)",