fix: message preview toggle is inverted in room list header (#31865)

This commit is contained in:
Florian Duros
2026-01-23 12:17:22 +01:00
committed by GitHub
parent c135c16824
commit 26779b10bd
2 changed files with 3 additions and 2 deletions

View File

@@ -189,8 +189,8 @@ export class RoomListHeaderViewModel
public toggleMessagePreview = (): void => {
PosthogTrackers.trackInteraction("WebRoomListMessagePreviewToggle");
const isMessagePreviewEnabled = SettingsStore.getValue("RoomList.showMessagePreview");
SettingsStore.setValue("RoomList.showMessagePreview", null, SettingLevel.DEVICE, !isMessagePreviewEnabled);
const isMessagePreviewEnabled = !SettingsStore.getValue("RoomList.showMessagePreview");
SettingsStore.setValue("RoomList.showMessagePreview", null, SettingLevel.DEVICE, isMessagePreviewEnabled);
this.snapshot.merge({ isMessagePreviewEnabled });
};
}