forked from mystiq/hydrogen-web
more
This commit is contained in:
parent
35648d31b9
commit
a544c25d58
5 changed files with 31 additions and 18 deletions
|
@ -3,4 +3,8 @@ A javascript matrix client prototype, trying to minize RAM usage by offloading a
|
|||
|
||||
## Status
|
||||
|
||||
Not working yet
|
||||
Sort of syncing, but not really yet.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
You need to disable the browser cache to see your updated code when refreshing
|
29
doc/TODO.md
29
doc/TODO.md
|
@ -1,11 +1,24 @@
|
|||
# Minimal thing to get working
|
||||
|
||||
- finish summary store
|
||||
- move "sdk" bits over to "matrix" directory
|
||||
- add eventemitter
|
||||
- make sync work
|
||||
- store summaries
|
||||
- DONE: finish summary store
|
||||
- DONE: move "sdk" bits over to "matrix" directory
|
||||
- DONE: add eventemitter
|
||||
- DONE: make sync work
|
||||
- DONE: store summaries
|
||||
- setup editorconfig
|
||||
- setup linting (also in editor)
|
||||
- store timeline
|
||||
- store state
|
||||
- DONE: setup linting (also in editor)
|
||||
- DONE: store timeline
|
||||
- DONE: store state
|
||||
- make summary work better (name and joined/inviteCount doesn't seem to work well)
|
||||
- timeline doesn't seem to recover it's key well upon loading, the query in load seems to never yield an event in the persister
|
||||
- map DOMException to something better
|
||||
- it's pretty opaque now when something idb related fails. DOMException has these fields:
|
||||
code: 0
|
||||
message: "Key already exists in the object store."
|
||||
name: "ConstraintError"
|
||||
- emit events so we can start showing something on the screen maybe?
|
||||
- move session._rooms over to Map, so we can iterate over it, ...
|
||||
- build a very basic interface with
|
||||
- a start/stop sync button
|
||||
- a room list sorted alphabetically
|
||||
- clicking on a room list, you see messages (userId -> body)
|
|
@ -4,7 +4,6 @@ export default class RoomPersister {
|
|||
constructor(roomId) {
|
||||
this._roomId = roomId;
|
||||
this._lastSortKey = new SortKey();
|
||||
|
||||
}
|
||||
|
||||
async load(txn) {
|
||||
|
|
|
@ -4,6 +4,7 @@ export default class Session {
|
|||
constructor(storage) {
|
||||
this._storage = storage;
|
||||
this._session = null;
|
||||
// use Map here?
|
||||
this._rooms = {};
|
||||
}
|
||||
// should be called before load
|
||||
|
|
|
@ -37,10 +37,8 @@ export default class RoomTimelineStore {
|
|||
this._timelineStore.add({
|
||||
roomId: roomId,
|
||||
sortKey: sortKey.buffer,
|
||||
content: {
|
||||
event: null,
|
||||
gap: gap,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -49,10 +47,8 @@ export default class RoomTimelineStore {
|
|||
this._timelineStore.add({
|
||||
roomId: roomId,
|
||||
sortKey: sortKey.buffer,
|
||||
content: {
|
||||
event: event,
|
||||
gap: null,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue