From 3f449c8773af6183c14b9c40ff1951a565bc1e67 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 31 Mar 2019 18:42:38 +0900 Subject: Room::updateData(): recalculate room name only when state changes occur --- lib/room.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/room.cpp b/lib/room.cpp index b0c898fb..e69d6de1 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1339,7 +1339,6 @@ void Room::updateData(SyncRoomData&& data, bool fromCache) emit memberListChanged(); roomChanges |= d->setSummary(move(data.summary)); - d->updateDisplayname(); for( auto&& ephemeralEvent: data.ephemeral ) roomChanges |= processEphemeralEvent(move(ephemeralEvent)); @@ -1364,6 +1363,7 @@ void Room::updateData(SyncRoomData&& data, bool fromCache) } if (roomChanges != Change::NoChange) { + d->updateDisplayname(); emit changed(roomChanges); if (!fromCache) connection()->saveRoomState(this); -- cgit v1.2.3