fix: auto-load first library section on open

PrayerView's select displayed the first option natively while activeSection
stayed null, so content only appeared after manually changing selection.
Initialize to first section and load it on render for all 8 collections.
This commit is contained in:
catarrh committed 2026-08-24 23:42:00 +03:00
1 parent f49735b360
commit 9cef9130cc
1 file changed
+5
+5
View File
@@ -191,6 +191,9 @@ export class PrayerView {
async render() {
const sections = this.getSections();
if (!this.activeSection) {
this.activeSection = sections[0]?.id ?? null;
}
const isTriodion = this.collection === 'triodion';
const subtitle = isTriodion ? this.t.triodion.subtitle
: this.collection === 'akathists' ? this.t.akathists.subtitle
@@ -250,6 +253,8 @@ export class PrayerView {
this.activeSection = id;
this.loadSection(id);
});
if (this.activeSection) void this.loadSection(this.activeSection);
}
private async loadSection(id: string) {