Commit graph

1973 commits

Author SHA1 Message Date
RMidhunSuresh f41c835e91 Support updater in MappedMap
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 0819dcb29e Use MappedList instead of MappedMap
- MappedList supports an optional updater method

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh b62473ae79 Add update method
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 4fcaac3865 Add binding in view
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 11eb9c7783 Use set instead of add in memberlist
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 2e8c4563aa Implement set method to support update from value
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh a1e3ff3ed8 Use name instead of displayName
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh a9ff6ab026 Sort memberlist using powerlevel
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 3e23392a0e Consider powerlevels in comparator and add tests
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh cb5e598e95 Getter for powerlevel from room
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh f7a6fbd901 Make getUserLevel() public
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh ddb7a16fb8 Make member private
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 7e72d57be7 Make list scrollable
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh abd2c19bf2 Remove unused param
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh a765d7fc7d Create memberlist view from rightpanel
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh f3c7ab337d Remove code from session view/vm
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 46a6cf6adf Add memberlist to navigation
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 1418645e15 Modify CSS to reflect changes
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh dfe7385611 Accommodate "rightpanel" navigation segment
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 8b01ca502e Create RightPanel from SessionViewModel
- Also remove old methods used in RoomDetails

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 7500bbeaad Modify navigation to work with rightpanel segment
- Ensure that rightpanel does not show in the URL.
- Create an action of details to insert the rightpanel segment.
- Make sure rightpanel can be a child of room.

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh b74e4452dd Move rightpanel to separate view and vm
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 7e6e4ecfab Duplicate navigation from room details
- TODO: Remove duplication

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
RMidhunSuresh 69237fce85 Basic barebones of memberlist view
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-16 17:08:18 +05:30
Bruno Windels fb3c090de2 confirm the leave room 2021-07-15 14:30:16 +02:00
Bruno Windels f515407491
Merge pull request #404 from MidhunSureshR/fix-402
Handle avatar image error
2021-07-05 07:48:48 +00:00
RMidhunSuresh 191613adbe Make changes
- use textContent where possible
- make sure we have an image before adding title

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 19:21:54 +05:30
RMidhunSuresh b8c01272f4 remove listener on dispose
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 15:42:07 +05:30
RMidhunSuresh 93e77a3fcd Only add attribute if we have avatar
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 15:41:40 +05:30
RMidhunSuresh 03a913629f Pass color as data attribute
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 15:25:28 +05:30
Danila Fedorin f7d6569154 Add a small comment to Invite.avatarColorId, too. 2021-06-30 15:21:11 -07:00
Danila Fedorin b40f946b85 Add JSDoc to new Hero method 2021-06-30 15:15:08 -07:00
Danila Fedorin ee1f1500e9 Roll back to using heroes for computing DM color 2021-06-30 15:07:40 -07:00
RMidhunSuresh 9ed6cd57f3 use textContent
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 00:01:38 +05:30
RMidhunSuresh 168b1d6247 Move AvatarView to separate file
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-30 23:51:14 +05:30
RMidhunSuresh b469c4299f implement new approach
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-30 23:30:44 +05:30
RMidhunSuresh bcaf84e545 Revert commits
This reverts commit 5f1346568d.

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-30 23:28:13 +05:30
Danila Fedorin d0f70cbdf9 Move avatar color ID computation into SummaryData 2021-06-29 18:01:08 -07:00
Danila Fedorin dec0683145 Correctly color archived and invited rooms 2021-06-29 16:50:42 -07:00
RMidhunSuresh b42f7e1a36 remove both handlers
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-29 19:50:37 +05:30
RMidhunSuresh 8b6ff533e8 Add and remove opposing event listeners
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-29 15:51:11 +05:30
Danila Fedorin 6527a0c677 Make the room color match up on the left panel, too. 2021-06-28 11:54:49 -07:00
Danila Fedorin 97854423c4 Ensure DM rooms have the same color in timeline and left panel. 2021-06-28 11:44:27 -07:00
RMidhunSuresh 5f1346568d Handle avatar error
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-28 23:18:07 +05:30
Bruno Windels 09aba78803
Merge branch 'master' into room-info 2021-06-24 15:06:37 +00:00
Bruno Windels dbaef5117a
Merge pull request #384 from vector-im/bwindels/reactions
Reactions
2021-06-24 15:01:44 +00:00
Bruno Windels eee1be1ceb safari doesn't like empty string key paths 🙄 2021-06-24 16:16:15 +02:00
Bruno Windels bb6417dab9 fix lint 2021-06-24 15:24:53 +02:00
Bruno Windels 5984e8dd6d don't show reactions for redacted messages 2021-06-24 14:49:43 +02:00
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 575f3fa966 fix tests 2021-06-24 14:28:10 +02:00
Bruno Windels 299294daff prevent re(d)action in left/kicked room 2021-06-24 14:24:22 +02:00
Bruno Windels 3fa0f234bb not used 2021-06-24 14:12:55 +02:00
Bruno Windels 20ae21ead5 add some more emoji fonts that might be install by default 2021-06-24 14:12:41 +02:00
Bruno Windels 366d3761b8 remove waiting for update event (it might not come in case of dupe)
also remove duplicate logging impl for re(d)action at cost of
double haveAnnotation call
2021-06-24 13:35:59 +02:00
Bruno Windels b148368d5b test different keys do work still 2021-06-24 13:29:13 +02:00
Bruno Windels 7557e2f437 not used 2021-06-24 13:26:14 +02:00
Bruno Windels 668c0aff36 drop duplicate reactions in send queue, as last measure of defence 2021-06-24 13:25:58 +02:00
Bruno Windels 38b465cb9d rename vm.toggleReaction to vm.toggle 2021-06-24 13:15:20 +02:00
Bruno Windels c46c330efb prevent duplicate redactions from distorting reaction local echo 2021-06-24 13:14:54 +02:00
Bruno Windels 061f44f475 extract methods here 2021-06-24 12:56:23 +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
RMidhunSuresh eb35f46214 Make sure room does exist before creating vm
- This will stop the code from throwing when opening /details on
  UnknownRoomView.

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-24 14:58:02 +05:30
RMidhunSuresh a273b25bac Remove css assumption
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-24 14:52:48 +05:30
RMidhunSuresh e2fd90bdc2 Remove Segment import
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-24 13:48:53 +05:30
Bruno Windels 52957beb82 don't encrypt reactions 2021-06-23 17:49:27 +02:00
Bruno Windels 3c7ccc90b2 fix css for reaction view and do some renaming
also add some user-select:none
2021-06-23 17:48:21 +02:00
Bruno Windels c585d76ce5 also clear pending reaction promise when an error is thrown 2021-06-23 17:47:47 +02:00
Bruno Windels 1a5a64864a don't double log redactReaction 2021-06-23 17:47:18 +02:00
Bruno Windels e125599a47 prevent decryption result getting lost after reaction updates entry 2021-06-23 17:38:52 +02:00
Bruno Windels 48588687a5 share logic whether have reacted already between basemsgtile & reactvm 2021-06-23 15:38:12 +02:00
Bruno Windels a1d24894eb this will block if we have a pending redaction & reaction
so the reaction won't be aborted
2021-06-23 11:45:24 +02:00
Bruno Windels 442d4cce03 make the react/redactReaction promise only return after update happened 2021-06-23 11:44:53 +02:00
Bruno Windels 18562d30d8 integration tests for local echo of toggling reactions 2021-06-23 11:43:14 +02:00
Bruno Windels 4d19f8d21d this should return any promise returned, otherwise breaks tests 2021-06-23 11:42:32 +02:00
Bruno Windels 8991632105 add redaction mock utility fn 2021-06-23 11:42:16 +02:00
Bruno Windels b153613200 determine toggle state correctly with both pending redaction & reaction 2021-06-23 11:41:28 +02:00
Bruno Windels 616d701ebb add test that redaction for non-sending event aborts it 2021-06-21 19:02:42 +02:00
Bruno Windels 0e750db9ae write unit tests for (re)aggregating annotations in RelationWriter 2021-06-21 18:16:21 +02:00
Bruno Windels d1345d0f83 write test for redaction in RelationWriter 2021-06-21 17:52:02 +02:00
Bruno Windels 81f06f565e write tests for AsyncMappedList 2021-06-21 17:26:08 +02:00
RMidhunSuresh 12305be06a Fix issue #397
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-19 16:01:02 +05:30
Bruno Windels 1fc1d2c79b fix lint 2021-06-18 15:09:34 +02:00
Bruno Windels 11fba12083 add tests for remote reaction target being added after pending event 2021-06-18 15:09:14 +02:00
Bruno Windels 0703cf8915 cleanup 2021-06-18 15:06:49 +02:00
Bruno Windels 5bea8130f2 more timeline annotation tests 2021-06-18 14:39:54 +02:00
Bruno Windels 9f99cf4b1e fix lint in tests 2021-06-18 11:52:09 +02:00
Bruno Windels 8092713faa add tests for local echo of adding and removing reaction 2021-06-18 11:51:02 +02:00
Bruno Windels f000e98619 no point in reacting to redacted messages 2021-06-17 16:48:58 +02:00
Bruno Windels 64f1abdfed show quick reactions in message menu 2021-06-17 16:46:06 +02:00
Bruno Windels 4312610e7d support menu options with custom DOM 2021-06-17 16:45:53 +02:00
Bruno Windels 70d64f38eb spelling 2021-06-17 16:07:32 +02:00
Bruno Windels cad884aa41 fix local redaction echo while already sending target 2021-06-17 16:07:09 +02:00
Bruno Windels a77ef02677 cleanup 2021-06-17 10:12:45 +02:00
Bruno Windels cbee498d41 a bit more brief 2021-06-17 10:03:32 +02:00
Bruno Windels bf84b59e39 more accurate test name and also test >= 2021-06-17 09:59:24 +02:00
Bruno Windels 099f99a96b check power levels to see if we can react 2021-06-17 09:41:25 +02:00
Bruno Windels fd54539e1c clarify comment 2021-06-17 09:41:10 +02:00
Bruno Windels 150f58a6b3 don't aggregate relations on redacted events 2021-06-16 18:00:50 +02:00
Bruno Windels ce5409dc26 aggregate relations when seeing event target during back-pagination 2021-06-16 17:40:29 +02:00