Skip to content

Commit 70a608b

Browse files
mgoldenbergbnjbvr
authored andcommitted
refactor(indexeddb): remove nested memory store from MediaStore impl
Signed-off-by: Michael Goldenberg <[email protected]>
1 parent bcd4337 commit 70a608b

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

crates/matrix-sdk-indexeddb/src/media_store/builder.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use std::{rc::Rc, sync::Arc};
1616

17-
use matrix_sdk_base::media::store::{MediaService, MemoryMediaStore};
17+
use matrix_sdk_base::media::store::MediaService;
1818
use matrix_sdk_store_encryption::StoreCipher;
1919

2020
use crate::{
@@ -67,7 +67,6 @@ impl IndexeddbMediaStoreBuilder {
6767
inner: Rc::new(open_and_upgrade_db(&self.database_name).await?),
6868
serializer: IndexedTypeSerializer::new(SafeEncodeSerializer::new(self.store_cipher)),
6969
media_service: MediaService::new(),
70-
memory_store: MemoryMediaStore::new(),
7170
})
7271
}
7372
}

crates/matrix-sdk-indexeddb/src/media_store/mod.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use matrix_sdk_base::{
3333
media::{
3434
store::{
3535
IgnoreMediaRetentionPolicy, MediaRetentionPolicy, MediaService, MediaStore,
36-
MediaStoreInner, MemoryMediaStore,
36+
MediaStoreInner,
3737
},
3838
MediaRequestParameters,
3939
},
@@ -66,12 +66,6 @@ pub struct IndexeddbMediaStore {
6666
// A service for conveniently delegating media-related queries to an `MediaStoreInner`
6767
// implementation
6868
media_service: MediaService,
69-
// An in-memory store for providing temporary implementations for
70-
// functions of `MediaStore`.
71-
//
72-
// NOTE: This will be removed once we have IndexedDB-backed implementations for all
73-
// functions in `MediaStore`.
74-
memory_store: MemoryMediaStore,
7569
}
7670

7771
impl IndexeddbMediaStore {

0 commit comments

Comments
 (0)