Page MenuHomePhorge

D123.1732569315.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D123.1732569315.diff

diff --git a/src/matrix-room-list.cpp b/src/matrix-room-list.cpp
--- a/src/matrix-room-list.cpp
+++ b/src/matrix-room-list.cpp
@@ -113,11 +113,9 @@
const auto &roomB = allRooms[idB];
auto aIsInvite = roomA.membership == Invite;
auto bIsInvite = roomB.membership == Invite;
- auto aIsFavourite = roomA.tags().find("m.favourite") != nullptr;
- auto bIsFavourite = roomB.tags().find("m.favourite") != nullptr;
- if (aIsFavourite != bIsFavourite) {
- return aIsFavourite;
- } else if (aIsInvite != bIsInvite) {
+ auto aIsFavourite = roomA.tags().count("m.favourite") == 1;
+ auto bIsFavourite = roomB.tags().count("m.favourite") == 1;
+ if (aIsInvite != bIsInvite) {
/**
* if my membership in A is invite,
* then the membership in B is not invite,
@@ -125,6 +123,8 @@
* otherwise B should come first
**/
return aIsInvite;
+ } else if (aIsFavourite != bIsFavourite) {
+ return aIsFavourite;
} else {
return latestEventTimestamp(roomA)
> latestEventTimestamp(roomB);

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 1:15 PM (13 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40325
Default Alt Text
D123.1732569315.diff (1 KB)

Event Timeline