chore: call loadCustomSections in RoomListStoreV3 ctor

This commit is contained in:
Florian Duros 2026-04-17 09:36:10 +02:00
parent c03cdd36a3
commit f24b79be32
No known key found for this signature in database
GPG Key ID: A5BBB4041B493F15
2 changed files with 3 additions and 3 deletions

View File

@ -113,7 +113,7 @@ export class RoomListStoreV3Class extends AsyncStoreWithClient<EmptyObject> {
/**
* Defines the display order of sections.
*/
private sortedTags: string[] = [DefaultTagID.Favourite, CHATS_TAG, DefaultTagID.LowPriority];
private sortedTags: string[] = [];
private readonly msc3946ProcessDynamicPredecessor: boolean;
@ -131,6 +131,7 @@ export class RoomListStoreV3Class extends AsyncStoreWithClient<EmptyObject> {
});
SpaceStore.instance.on(UPDATE_HOME_BEHAVIOUR, () => this.onActiveSpaceChanged());
SettingsStore.watchSetting("RoomList.OrderedCustomSections", null, () => this.onOrderedCustomSectionsChange());
this.loadCustomSections();
}
/**
@ -202,8 +203,6 @@ export class RoomListStoreV3Class extends AsyncStoreWithClient<EmptyObject> {
protected async onReady(): Promise<any> {
if (this.roomSkipList?.initialized || !this.matrixClient) return;
this.loadCustomSections();
const sorter = this.getPreferredSorter(this.matrixClient.getSafeUserId());
this.roomSkipList = new RoomSkipList(sorter, this.getSkipListFilters());

View File

@ -61,6 +61,7 @@ describe("RoomListHeaderViewModel", () => {
if (settingName === "RoomList.preferredSorting") return SortingAlgorithm.Recency;
if (settingName === "feature_video_rooms") return true;
if (settingName === "feature_element_call_video_rooms") return true;
if (settingName === "RoomList.OrderedCustomSections") return [];
return false;
});
});