Commit graph

41 commits

Author SHA1 Message Date
Bruno Windels d734a61447 Merge branch 'master' into bwindels/calls 2022-04-11 16:14:34 +02:00
Bruno Windels 5445db2a42 allow injecting the tilesCreator from the Root/Session/RoomViewModel
this changes the API slightly to be more future-proof,
as we'll expose it in the SDK now.

The function now returns a SimpleTile constructor, rather than an
instance. This allows us to test if an entry would render in the
timeline without creating a tile, which is something we might want in
the matrix layer later on.

The function is now called tileClassForEntry, analogue to what we
do in TimelineView.
2022-04-08 12:52:30 +02:00
Bruno Windels 07bc0a2376 move observable values each in their own file 2022-03-29 12:01:46 +02:00
Bruno Windels 6d7c983e8e convert (Base)ObservableMap to typescript 2022-03-09 11:33:49 +01:00
Bruno Windels 8201a85c47 ensure these have a fn for tilesCreator 2022-01-14 16:20:38 +01:00
Bruno Windels ad335d5088 pass in tilesCreator everywhere, although not needed right now 2022-01-14 16:06:29 +01:00
RMidhunSuresh 41cf6460d0 Remove dead code 2022-01-06 12:07:10 +05:30
RMidhunSuresh b753507b8d WIP 2022-01-06 11:59:58 +05:30
Bruno Windels fc3eb7f57f Merge branch 'master' into bwindels/typescript-observable-2 2021-11-30 16:37:43 +01:00
RMidhunSuresh 520e0f1b89 Use interface ILogItem 2021-11-15 17:29:08 +05:30
Danila Fedorin 0466b49520 Rename MappedList to TypeScript 2021-10-03 22:18:12 -07:00
Danila Fedorin a7360f409e Rename ObservableValue to TypeScript 2021-09-29 17:42:57 -07:00
Bruno Windels edc3a1d33c convert storage mock to TS and add utility for mock raw database 2021-09-28 14:19:59 +02:00
Bruno Windels ac5a4c2bc6 pass log item everywhere to tryInsert 2021-09-22 10:33:40 +02:00
Bruno Windels 6cded5319a change timelineEventStore.insert to tryInsert 2021-09-21 21:04:10 +02:00
Bruno Windels c3177b06bf
Merge pull request #418 from vector-im/replies
Sending replies
2021-08-06 21:28:42 +00:00
Danila Fedorin 053c94b60e Stop passing room to tiles in tests 2021-08-06 11:02:41 -07:00
RMidhunSuresh be57352f71 Move PowerLevels.js into /room
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-06 19:49:48 +05:30
RMidhunSuresh 2502c4024a Fix broken tests
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
Bruno Windels 787308375c prevent toggling in vm while already busy
otherwise the check in SendQueue to prevent duplicates might fail
2021-06-24 14:33:16 +02:00
Bruno Windels 3fa0f234bb not used 2021-06-24 14:12:55 +02:00
Bruno Windels 38b465cb9d rename vm.toggleReaction to vm.toggle 2021-06-24 13:15:20 +02:00
Bruno Windels a4a7c23148 use pending re(d)action timestamp to have stable reaction sorting order
also move more logic into the matrix layer, from Reaction(s)ViewModel
to PendingAnnotation
2021-06-24 12:26:38 +02:00
Bruno Windels 48588687a5 share logic whether have reacted already between basemsgtile & reactvm 2021-06-23 15:38:12 +02:00
Bruno Windels 18562d30d8 integration tests for local echo of toggling reactions 2021-06-23 11:43:14 +02:00
Bruno Windels b153613200 determine toggle state correctly with both pending redaction & reaction 2021-06-23 11:41:28 +02:00
Bruno Windels fd54539e1c clarify comment 2021-06-17 09:41:10 +02:00
Bruno Windels 94635a18e0 actually, 0 or -1 mean you have a local redaction 2021-06-16 12:41:42 +02:00
Bruno Windels 3b629622d9 need to keep pending count around if 0 or less for redaction local echo
also need to be able to tell the difference between no pending reactions
and redactions and the sum being 0 (having both a redaction and
reaction) so we keep isPending to true
2021-06-16 10:23:22 +02:00
Bruno Windels e5c1094153 WIP 2021-06-15 19:06:41 +02:00
Bruno Windels 75ee509361 fix lint 2021-06-11 11:30:11 +02:00
Bruno Windels 81a721f880 make equality stable in comparator for reaction 2021-06-11 11:04:48 +02:00
Bruno Windels 1d9709d4e3 also compare by key if the timestamps are the same 2021-06-11 11:02:31 +02:00
Bruno Windels 206d18f498 WIP2 2021-06-08 16:56:17 +02:00
Bruno Windels 2ebadb36c3 WIP 2021-06-08 13:20:55 +02:00
Bruno Windels 280de98858 fix lint 2021-06-04 16:41:37 +02:00
Bruno Windels b7402ce43c support local echo for adding a reaction 2021-06-04 15:34:44 +02:00
Bruno Windels cc444fa207 we actually don't need any of the view model infrastructure
all the updates go over the observable list
2021-06-03 21:00:25 +02:00
Bruno Windels 2eb2e4e9b3 more stable sorting order for reactions 2021-06-03 19:57:29 +02:00
Bruno Windels bb8acbefa3 support undoing a reaction 2021-06-03 19:57:16 +02:00
Bruno Windels 2152d5e833 expose reactions on base message tile as vm with observable list 2021-06-03 19:15:49 +02:00