Commit graph

27 commits

Author SHA1 Message Date
Michael Telatynski
755007cbee Conclude labs flags and write more tests 2021-07-27 14:39:14 +01:00
Jaiwanth
517e8951ee Apply suggestions from review 2021-07-22 08:30:18 +05:30
Jaiwanth
a99b24ef83 Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into spaces-jump-to-room 2021-06-30 11:20:01 +05:30
Jaiwanth
1b21c8f732 Remove unreadRoomId from summarized notification state 2021-06-30 10:53:46 +05:30
J. Ryan Stinnett
ae0a8b8da4 Auto-fix lint errors 2021-06-29 13:11:58 +01:00
Jaiwanth
bf2d26ef21 Modify to navigate only on notification dots click 2021-05-20 11:23:00 +05:30
Jaiwanth
3e8863fc9a Adjust behaviour for the home space 2021-05-11 13:03:45 +05:30
Jaiwanth
73b9ad41da Navigate to room with maximum notifications when clicked on already selected space 2021-05-05 12:38:44 +05:30
Travis Ralston
4be9c51dad Move all the RED_EXCLAMATION badges to a single definition 2021-04-21 16:43:25 -06:00
David Baker
d39b7175f7 Don't include invisible rooms in notify summary
This could cause rogue title bar natifications if you had invisible rooms
2021-04-16 15:31:01 +01:00
Michael Telatynski
7030c636f0 Initial Space Store for keeping track of space hierarchies from sync 2021-02-25 16:36:35 +00:00
J. Ryan Stinnett
ce226ab534 Replace Riot with Element in docs and comments
This only covers the simple cases of references to issues and repos. More
complex areas, such as deployment scripts, will be handled separately.

Part of https://github.com/vector-im/element-web/issues/14864
2020-08-03 18:33:36 +01:00
Travis Ralston
da05cac1b6 Listen for our own membership changes on notification states
Fixes https://github.com/vector-im/riot-web/issues/14798 (part 1)

When we transition from invite to not-invite we need to ensure we clear the invite notification state.
2020-07-30 14:33:38 -06:00
Travis Ralston
900c234434 Internalize notification state handling for lists
This reduces the update cost of rooms changing, and fixes a bug where when a sublist became filtered it would change the notification count of the sublist.

This does change the expected usage of the state store to ensuring that only one place updates the rooms on the list states, which is currently the room list store. Ideally the state store could listen to the room list store to update itself, however due to a complicated require() loop it is not possible.
2020-07-27 17:33:27 -06:00
Travis Ralston
61c5b4f9bf deunderscore 2020-07-22 08:23:47 -06:00
Travis Ralston
cd77434a69 Appease the linter 2020-07-21 20:59:33 -06:00
Travis Ralston
dd16ec070c Replace countRoomsWithNotif with a dedicated NotificationState
Fixes https://github.com/vector-im/riot-web/issues/14694

Instead of spending 10-1000ms in a function iterating over a whole lot of room events, we can use our cached state from the Notification State Store. 

This commit sets up a structure that could be applied to communities in the TagPanel too, as that could probably use a similar optimization.

This reduces the updateStatusIndicator() time to just 4ms on average.
2020-07-21 20:24:44 -06:00
Travis Ralston
6a29cd33c1 Remove tag specificity from notification states
We don't need this complexity now that we aren't doing per-tag logic.
2020-07-21 19:59:17 -06:00
Travis Ralston
a4f7f666cf Remove useless TagSpecificNotificationState
FTUE Notifications won't be needing this.
2020-07-17 16:20:19 -06:00
Travis Ralston
4a8a59c578 Make EffectiveMembership utils generic
Fixes https://github.com/vector-im/riot-web/issues/14460

Just have to move them to utils.
2020-07-13 20:29:46 -06:00
Travis Ralston
ae09bfb8fd Don't destroy room notification states when replacing them
The "should never happen" now happens a lot by design. We shouldn't destroy the state as it'll stop badge counts for everything.

Fixes https://github.com/vector-im/riot-web/issues/14391
2020-07-09 10:22:04 -06:00
Travis Ralston
47380306c2 Move and improve notification state handling
Previously we were creating a notification state whenever we needed one, which was leading to hundreds of listeners even on a small account. To ease the burden, and reduce the load of having to wake so many listeners, we now record a single listener for each tag ID and room combination.

This commit also introduces a number of utilities to make future notification work a bit of an easier transition, such as the `isX` and `hasX` getters on the new NotificationState abstract class. Similarly, "snapshots" have been added to reduce code duplication between different kinds of states checking for updates.

The ListNotificationState is now heavily tied into the store which offers it to help reuse the cache of room notification states. 

Fixes https://github.com/vector-im/riot-web/issues/14370
2020-07-08 19:26:25 -06:00
Michael Telatynski
1849ed90d2 Implement ViewRoomDelta for the new Room List
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2020-07-06 17:58:29 +01:00
Travis Ralston
a6e0799b57 Handle push rule changes in the RoomNotificationState 2020-07-02 15:05:01 -06:00
Travis Ralston
a5001e50aa Disable all unread decorations on muted rooms 2020-07-02 13:33:24 -06:00
Travis Ralston
782a555e44 Make badges represent old list behaviour
Fixes https://github.com/vector-im/riot-web/issues/14160
2020-06-30 13:45:10 -06:00
Travis Ralston
393eaf84c3 Move notification states out of the NotificationBadge component
Fixes https://github.com/vector-im/riot-web/issues/14153
2020-06-30 13:34:44 -06:00