From 343afea7137257bc67494b25b72aedaf0cfca14e Mon Sep 17 00:00:00 2001 From: Fynn Petersen-Frey <10599762+fyfrey@users.noreply.github.com> Date: Wed, 15 Nov 2023 15:31:38 +0100 Subject: [PATCH] fix(mobile): rebuild of unified partner timeline (#5065) --- mobile/lib/shared/models/store.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mobile/lib/shared/models/store.dart b/mobile/lib/shared/models/store.dart index 40258f304ba85..669dbb048d036 100644 --- a/mobile/lib/shared/models/store.dart +++ b/mobile/lib/shared/models/store.dart @@ -44,6 +44,7 @@ class Store { /// Stores the value synchronously in the cache and asynchronously in the DB static Future put(StoreKey key, T value) { + if (_cache[key.id] == value) return Future.value(); _cache[key.id] = value; return _db.writeTxn( () async => _db.storeValues.put(await StoreValue._of(value, key)), @@ -52,6 +53,7 @@ class Store { /// Removes the value synchronously from the cache and asynchronously from the DB static Future delete(StoreKey key) { + if (_cache[key.id] == null) return Future.value(); _cache[key.id] = null; return _db.writeTxn(() => _db.storeValues.delete(key.id)); }