Bruno Windels
8b358379e8
first draft of device tracker
...
mainly missing race protection with /sync and actually running the code
2020-08-31 14:12:12 +02:00
Bruno Windels
f98b3dd5fa
create/load olm account before first sync
2020-08-27 19:13:09 +02:00
Bruno Windels
09a018ade1
store sync token and filter id under the same key in session
...
as they are updated together
2020-08-27 14:36:50 +02:00
Bruno Windels
14b27f81fe
store session values as individual values in store
...
so we don't have to write the whole object every time something changes
we'll use this to store the olm account
2020-08-27 14:28:40 +02:00
Bruno Windels
fe7cc08287
add _selectWhile with proper "while" semantics
...
the existing _selectWhile method was more like _selectUntil,
which is what we want for _selectLimit but not for selectWhile(Reverse)
The changes we had made before also broke _selectLimit as it would
look at the results length before the value got added so you
always got 1 value more than requested, breaking sync.
2020-08-19 18:25:49 +02:00
Bruno Windels
79363ed1d7
use optional chaining
2020-08-19 18:25:38 +02:00
Bruno Windels
d08297d1e0
move RoomMembers to own dir
2020-08-19 16:28:09 +02:00
Bruno Windels
9edd1bb0bb
implement loading all members
2020-08-19 16:13:30 +02:00
Bruno Windels
5ad7b74b2b
keep string key since we have to support IE11
2020-08-19 16:08:42 +02:00
Bruno Windels
9ff4f3839c
Merge branch 'master' into bwindels/memberlist
2020-08-19 12:13:38 +02:00
Bruno Windels
2526198251
replace usage of readPath with ?.
2020-08-19 11:36:43 +02:00
Bruno Windels
cc4c9d7893
Improve IDB error reporting
...
Hope this can help with
https://github.com/vector-im/hydrogen-web/issues/50
2020-08-18 17:27:40 +02:00
Bruno Windels
00a85697ab
add license header in all source files
2020-08-05 18:38:55 +02:00
Bruno Windels
f5d3092031
WIP
2020-06-26 23:26:24 +02:00
Bruno Windels
bb7fca0592
support deleting the session from the container
2020-04-20 22:29:25 +02:00
Bruno Windels
a097929dbd
rename lowercase filenames of classes to camelcase like class
2020-04-20 21:41:10 +02:00
Bruno Windels
001dbefbcf
stop using default exports
...
because it becomes hard to remember where you used them and where not
2020-04-20 21:26:39 +02:00
Bruno Windels
35c090dcb4
add proper import/export functionality
2019-12-14 18:29:35 +01:00
Bruno Windels
5ecf0a6717
fix error path on transaction abort error
2019-11-21 18:23:48 +01:00
Bruno Windels
b16f21867c
preserve value for storage errors on add and put
2019-10-12 22:19:16 +02:00
Bruno Windels
2fa5fa7890
add delete button in session picker
2019-10-12 21:16:48 +02:00
Bruno Windels
6f527fd2e0
use openCursor where openKeyCursor is not supported
2019-09-15 12:24:46 +02:00
Bruno Windels
bbf6943455
use .get fallback where .getKey is not supported (Edge 15)
2019-09-15 12:24:27 +02:00
Bruno Windels
8e590fe53b
rename and use StorageError to deal with idb DOMerror
2019-09-15 12:23:54 +02:00
Bruno Windels
3ed72df620
put everything together to make it roughly work
...
no local echo yet, and send errors are being swallowed
2019-07-27 10:51:51 +02:00
Bruno Windels
707988f806
better handle remote echos and hookup in session and room
2019-07-26 22:33:33 +02:00
Bruno Windels
ccb722d766
more WIP
2019-07-26 22:03:57 +02:00
Bruno Windels
f3d1128f28
WIP
2019-07-01 10:00:29 +02:00
Bruno Windels
cd9f25ea80
convert tabs to spaces where needed
2019-06-26 22:31:36 +02:00
Bruno Windels
b882e0ef8a
respect argument count of idb calls
...
lumia doesn't like undefined arguments if they
are being left out, so call the idb calls with
the exact amount of arguments
2019-06-26 22:02:00 +02:00
Bruno Windels
bbb5e35bcb
wrap everything that can throw a idb DOMException in StorageError
...
as lumia gives very cryptic errors without a stacktrace.
2019-06-26 22:00:50 +02:00
Bruno Windels
0fd52be710
encode idb array keys as sortable strings
...
that's why numeric parts of the keys have to be encoded
as a fixed length, "big-endian" ordered strings, so
string sorting will also sort the numeric keys correctly.
this also assumes room ids don't contain the "|" character,
we should probably escape the separator at some point.
2019-06-26 21:55:33 +02:00
Bruno Windels
106146660c
define storage keys to be 32bit for idb / web platform
...
as a preparation to serialize the eventIndex and fragmentId
as a 8 character string, part of a concatenated string PK,
as lumia doesn't support array keys.
2019-06-26 21:52:41 +02:00
Bruno Windels
3dbf5e727d
process in incoming order (reverse-chronological order if backward)
...
makes code simpler, don't need fix to undo reverse ordering of
nonOverlappingEvents. reverse looking is very likely premature
optimization as well.
2019-06-03 00:18:52 +02:00
Bruno Windels
c9aaa18151
return only eventId from findFirstOrLastOccurringEventId
2019-06-03 00:11:12 +02:00
Bruno Windels
0b637f656a
timeline store requests should always be scoped to 1 fragmentId
...
as fragmentIds should not be sorted, they are a linked list
and that is what determines their order.
2019-06-02 19:27:40 +02:00
Bruno Windels
e339cb7321
more fixes, timeline is showing again
2019-06-02 14:59:30 +02:00
Bruno Windels
a1e527ccbc
first round of fixes after running the app again in the browser!
2019-06-02 00:49:47 +02:00
Bruno Windels
3de86cdf33
obsolete comment
2019-06-01 18:32:32 +02:00
Bruno Windels
a6b17cf25a
first draft of persistFragmentFill
2019-05-12 20:25:41 +02:00
Bruno Windels
89bc0e1696
split up RoomPersister to SyncPersister
...
also rename stores to timelineEvents and timelineFragments
2019-05-12 20:24:06 +02:00
Bruno Windels
2b510b24d9
adjust persister to fragments (untested)
2019-05-11 15:41:46 +02:00
Bruno Windels
152397a292
first impl of idb fragment store
2019-05-11 15:41:09 +02:00
Bruno Windels
783f39c378
add fragmentId to methods that need it in timeline store
2019-05-11 13:21:21 +02:00
Bruno Windels
53cdabb459
store method to find events to connect with when filling gaps
...
as fragments can be unaware of their chronological relationship,
we need to check whether the events received from /messages or /context
already exists, so we can later hook up the fragments.
2019-05-11 13:10:31 +02:00
Bruno Windels
d90411a6dd
adjust SortKey to have fragmentKey instead of gapKey
...
with FragmentIndex to compare fragment keys
2019-05-01 14:47:39 +02:00
Bruno Windels
06d2d2e198
draft of idb store for fragments
2019-04-18 20:19:43 +02:00
Bruno Windels
aaff9eea6c
update store api with requirements for gap filling
2019-03-29 23:01:22 +01:00
Bruno Windels
b1e382d7c9
thinko with direction
2019-03-21 21:36:02 +01:00
Bruno Windels
8e8e22fe16
work on filling gaps
2019-03-09 00:41:06 +01:00