matrix-org / matrix-org/matrix-js-sdk

Support SQLite implementation for IStore

Open
#4,570 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T-Other
Dominant language
TypeScript
Stars
2.2k
Forks
704
Avg merge
1d 20h
Merged PRs (30d)
40

Description

Hi,

We are currently using matrix js sdk in our react native app. As indexeddb is not supported in RN we currently use the memory store.

The problem is that when you open a notification from a room there is a loading state because nothin is stored on device. We are using TimelineWindow for our rooms with pagination etc https://matrix-org.github.io/matrix-js-sdk/classes/matrix.TimelineWindow.html.

So I have 2 questions:
- 1) What would some kind of solution be to store the 40 recent events of a room, and load it in the TimelineWindow?
- 2) as (1) would be quick workaround I am considering contributing to the sdk to implement a SQLite store implantation. Would this mean to just implement the IStore in [https://github.com/matrix-org/matrix-js-sdk/blob/develop/src/store/index.ts ](https://github.com/matrix-org/matrix-js-sdk/blob/develop/src/store/index.ts) methods to a SQLite implantation?

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading src/store/index.ts to understand the IStore methods, then review the TimelineWindow documentation and the issue’s recent-events and pagination requirements. The scope needs clarification before implementation; done would mean an agreed SQLite-backed store that supports the required TimelineWindow loading behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, sqlite, typescript
Domain
databases, mobile
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.