RoomListViewModel: Add functionality to toggle message preview setting (#29511)
* Add setting for showing message previews * Add hook to track and toggle message preview * Use hook in view model * Add tests * Fix tests * Fix lint * Fix typo
This commit is contained in:
@@ -314,6 +314,7 @@ export interface Settings {
|
||||
"showImages": IBaseSetting<boolean>;
|
||||
"showAvatarsOnInvites": IBaseSetting<boolean>;
|
||||
"RoomList.preferredSorting": IBaseSetting<SortingAlgorithm>;
|
||||
"RoomList.showMessagePreview": IBaseSetting<boolean>;
|
||||
"RightPanel.phasesGlobal": IBaseSetting<IRightPanelForRoomStored | null>;
|
||||
"RightPanel.phases": IBaseSetting<IRightPanelForRoomStored | null>;
|
||||
"enableEventIndexing": IBaseSetting<boolean>;
|
||||
@@ -1126,6 +1127,10 @@ export const SETTINGS: Settings = {
|
||||
supportedLevels: [SettingLevel.DEVICE],
|
||||
default: SortingAlgorithm.Recency,
|
||||
},
|
||||
"RoomList.showMessagePreview": {
|
||||
supportedLevels: [SettingLevel.DEVICE],
|
||||
default: false,
|
||||
},
|
||||
"RightPanel.phasesGlobal": {
|
||||
supportedLevels: [SettingLevel.DEVICE],
|
||||
default: null,
|
||||
|
||||
Reference in New Issue
Block a user