fix: back/forward navigation won't reset scroll in timeline

This commit is contained in:
midzelis
2025-09-26 00:08:44 +00:00
parent 25dbb60574
commit 0a18d9c35e
9 changed files with 122 additions and 80 deletions
@@ -187,7 +187,7 @@ export class TimelineManager extends PhotostreamManager {
addAssetsToMonthGroups(this, [...notUpdated], { order: this.#options.order ?? AssetOrder.Desc });
}
async findMonthGroupForAsset(id: string) {
async findSegmentForAssetId(id: string) {
if (!this.isInitialized) {
await this.initTask.waitUntilCompletion();
}
@@ -218,11 +218,6 @@ export class TimelineManager extends PhotostreamManager {
return getMonthGroupByDate(this, yearMonth);
}
getMonthGroupByAssetId(assetId: string) {
const monthGroupInfo = findMonthGroupForAssetUtil(this, assetId);
return monthGroupInfo?.monthGroup;
}
async getRandomMonthGroup() {
const random = Math.floor(Math.random() * this.months.length);
const month = this.months[random];