element-hq / element-hq/element-ios

Expand MXStoreService implementation

Open
#5,121 0 comments 0 reactions 0 assignees View on GitHub
A-SDK T-Enhancement
Dominant language
Swift
Stars
1.8k
Forks
544
PR merge metrics
PR metrics pending

Description

`MXStoreService` has been implemented to allow us to synchronise resetting stored data across multiple stores. The initial [PR](https://github.com/matrix-org/matrix-ios-sdk/pull/1288), was a basic implementation to fix a specific issue and could now do with fleshing out a bit more.

Most importantly, it added an optional dependency on `MXStore` to `MXStoreService` which would be nice to remove. The service will orchestrate all data belonging to a user from the outside and then we should consider using a callback or local notification on the `MXStore` that `MXStoreService` listen to.

Additionally there may be other stores that would be appropriate to add the service such as
- `MXScanManager`
- `MXCrypto`
- `MXRoomSummaryStore`

Lastly it may be worth re-evaluating if there is a better alternative to `UserDefaults` to record which stores need resetting due to the `MXFileStore` having deleted its data before the other stores are set up.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.