diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..cbfbbb54 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +indent_style = space +indent_size = 4 + +# Matches multiple files with brace expansion notation +# Set default charset +# [*.{js,py}] diff --git a/README.md b/README.md index 6191fe85..894bdee0 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A javascript matrix client prototype, trying to minize RAM usage by offloading a ## Status -Sort of syncing, but not really yet. +Syncing & storing rooms with state and timeline, next step is building minimal UI ## Troubleshooting @@ -14,3 +14,4 @@ You need to disable the browser cache to see your updated code when refreshing - store all fetched messages, not just synced ones - fast local search (with words index) - scroll timeline with date tooltip? + - jump to timestamp \ No newline at end of file diff --git a/doc/TODO.md b/doc/TODO.md index b0b09bf2..7dec2265 100644 --- a/doc/TODO.md +++ b/doc/TODO.md @@ -5,12 +5,12 @@ - DONE: add eventemitter - DONE: make sync work - DONE: store summaries - - setup editorconfig + - DONE: setup editorconfig - 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 + - DONE: make summary work better (name and joined/inviteCount doesn't seem to work well) + - DONE: 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 @@ -21,4 +21,10 @@ - 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) \ No newline at end of file + - clicking on a room list, you see messages (userId -> body) + - send messages + - fill gaps with call to /messages + - create sync filter + - lazy loading members + - decide denormalized data in summary vs reading from multiple stores PER room on load + - allow Room/Summary class to be subclassed and store additional data? diff --git a/prototypes/chrome-keys.html b/prototypes/chrome-keys.html new file mode 100644 index 00000000..943aaf31 --- /dev/null +++ b/prototypes/chrome-keys.html @@ -0,0 +1,74 @@ + + + + + + + + + \ No newline at end of file diff --git a/prototypes/chrome-keys2.html b/prototypes/chrome-keys2.html new file mode 100644 index 00000000..8fc37afd --- /dev/null +++ b/prototypes/chrome-keys2.html @@ -0,0 +1,102 @@ + + + + + + + + + \ No newline at end of file diff --git a/prototypes/chrome-keys3.html b/prototypes/chrome-keys3.html new file mode 100644 index 00000000..cdf7c664 --- /dev/null +++ b/prototypes/chrome-keys3.html @@ -0,0 +1,103 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/matrix/storage/idb/stores/RoomTimelineStore.js b/src/matrix/storage/idb/stores/RoomTimelineStore.js index 03a232eb..cf910687 100644 --- a/src/matrix/storage/idb/stores/RoomTimelineStore.js +++ b/src/matrix/storage/idb/stores/RoomTimelineStore.js @@ -51,8 +51,8 @@ export default class RoomTimelineStore { gap: null, }); } - - async removeEvent(roomId, sortKey) { + // could be gap or event + async removeEntry(roomId, sortKey) { this._timelineStore.delete([roomId, sortKey.buffer]); } }