Commit graph

204 commits

Author SHA1 Message Date
Bruno Windels
9cd5257959 load more events when scrolled to top 2019-06-16 17:29:33 +02:00
Bruno Windels
0524f06722 remove logging 2019-06-03 00:31:21 +02:00
Bruno Windels
6bdf44d114 adjust comment 2019-06-03 00:30:37 +02:00
Bruno Windels
45528580ed fix comparator/comparer mismatch 2019-06-03 00:30:16 +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
0407829b26 fix filling gaps with overlapping events
although event order remains wrong, as events are reversed.
step before removing premature optimization, so it's in the git
commit log
2019-06-03 00:11:29 +02:00
Bruno Windels
7852f31f7e clear token on pagination when events start overlapping 2019-06-02 19:28:24 +02:00
Bruno Windels
bb5f139355 fix fragmentId:0 being evaluated as falsy 2019-06-02 19:27:23 +02:00
Bruno Windels
4b5b90e199 fix another direction mismatch 2019-06-02 19:26:45 +02:00
Bruno Windels
c63d94947f fix persisting a gappy sync 2019-06-02 18:28:38 +02:00
Bruno Windels
ef5d2cfa08 chunk is in reverse-chronological order for backward pagination 2019-06-02 18:15:40 +02:00
Bruno Windels
a59014475b also swap logic of setter 2019-06-02 18:15:08 +02:00
Bruno Windels
bdad0ad86b fix some gap fill errors 2019-06-02 15:46:24 +02:00
Bruno Windels
d022608a1a it's entry.entryIndex, not eventIndex, but use helper method instead. 2019-06-02 15:24:27 +02:00
Bruno Windels
1ed3babfec fragment boundary is a gap if backwards(started) & previousToken 2019-06-02 15:01:14 +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
039bbe038c adjust tiles(collection) to entry changes 2019-06-01 18:29:02 +02:00
Bruno Windels
35d90a8535 ctor takes a bool, not Direction. But use helper fn instead. 2019-06-01 18:20:29 +02:00
Bruno Windels
2a128ed32c use SortedArray in Timeline, adjust loadAtTop to use TimelineReader 2019-06-01 17:39:23 +02:00
Bruno Windels
f8fbfbff9a implement reading n events from end of live fragment 2019-06-01 17:04:05 +02:00
Bruno Windels
3137f025c7 remove draft commented code 2019-06-01 16:44:58 +02:00
Bruno Windels
447b0aa03c allow adding fragments to comparer, instead of reloading from db.
This is a suboptimal implementation now,
but is the API we want to end up with. Readers and Writers
in persistence add fragments to the comparer when they become
aware of, create, or link up fragments.
2019-06-01 16:42:57 +02:00
Bruno Windels
fa4efe0132 rename Gap/SyncPersistence to Writer, in line with TimelineReader 2019-06-01 15:40:21 +02:00
Bruno Windels
784588440c WIP for fragment support 2019-05-19 20:49:46 +02:00
Bruno Windels
3324fd3afd split up persistFragmentFill method into smaller ones 2019-05-12 20:44:20 +02:00
Bruno Windels
75100c1c60 adjust Timeline to changes, gap persister 2019-05-12 20:26:03 +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
bf835ac01d create Entry classes and return fragment boundaries as entries as well
they can then be used for gap tiles.
2019-05-11 18:19:53 +02:00
Bruno Windels
2b510b24d9 adjust persister to fragments (untested) 2019-05-11 15:41:46 +02:00
Bruno Windels
41f2224454 get live fragment in persister 2019-05-11 13:21:58 +02:00
Bruno Windels
d6ae313bbd make compare rely less on fragment index
also indenting
2019-05-11 09:51:27 +02:00
Bruno Windels
99c8816bf9 better naming
FragmentIndex -> FragmentIdIndex (index of fragment ids,
   not an index number in a fragment collection)
EventKey -> EventIndex (implies being ordered)
FragmentKey -> FragmentId
  (implies not being ordered, hence FragmentIdIndex)
2019-05-01 15:36:32 +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
749bdadf74 disable failing tests for now and include fragment index so it's tests are found 2019-04-18 20:19:09 +02:00
Bruno Windels
3f2f656db7 work on gap filling + tests (doesn't work yet) 2019-03-29 23:01:27 +01:00
Bruno Windels
8f7e5a799c work on filling gaps + test (draft only) 2019-03-21 21:35:33 +01:00
Bruno Windels
8e8e22fe16 work on filling gaps 2019-03-09 00:41:06 +01:00
Bruno Windels
ec925d7c49 draft of how to implement filling a timeline gap 2019-03-08 20:03:18 +01:00
Bruno Windels
f8bd11f07b doesn't need to be async for now 2019-02-27 23:23:09 +01:00
Bruno Windels
8462a0ac6b this behaves weird? need to figure out later 2019-02-27 23:22:47 +01:00
Bruno Windels
6b4ed65a57 show timeline when clicking room in roomlist 2019-02-27 22:50:08 +01:00
Bruno Windels
5cafb92fee emit after txn has been committed
to keep txn open for as short as possible,
and avoid any errors caused as part of emit aborting txn
2019-02-27 22:49:52 +01:00
Bruno Windels
c8d5b4483a public room.id property, needed for session.rooms updater 2019-02-26 23:27:06 +01:00
Bruno Windels
841f280d3c rooms on the screen!! 2019-02-26 22:45:58 +01:00
Bruno Windels
db53db7007 adjust to new ObservableMap api 2019-02-24 19:25:06 +01:00
Bruno Windels
5bff41c1ee wip on collections and listview 2019-02-20 23:48:16 +01:00
Bruno Windels
07fed669f6 debug room lastsortkey not loading in chrome (but does in FF!) 2019-02-16 02:57:19 +01:00
Bruno Windels
be8544aa48 also persist state events in timeline 2019-02-16 02:57:19 +01:00
Bruno Windels
f7789d343a more fields for summary 2019-02-16 02:57:19 +01:00
Bruno Windels
ffd3d740c5 state events are under state key 2019-02-16 02:57:19 +01:00
Bruno Windels
a544c25d58 more 2019-02-10 22:02:42 +01:00
Bruno Windels
bff0161a05 move sync & persistence engine over to own matrix folder 2019-02-10 21:33:18 +01:00