element-hq / element-hq/element-ios
Expand MXStoreService implementation
- 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
Assessment
This issue has not been assessed yet.