Skip to content

Commit 086b167

Browse files
committed
Fixed: History: Unsorted items after loadMore
1 parent ee3e836 commit 086b167

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/services/history.actions.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export async function normalizeHistory(
8686
if (!item.title) item.title = Utils.getDomainOf(item.url)
8787

8888
normalizeHistoryItem(item)
89+
8990
if (allVisits && item.visitCount !== undefined && item.visitCount > 1 && item.url) {
9091
let visits: browser.history.VisitItem[] | undefined = cachedVisits[item.url]
9192
if (!visits) {
@@ -103,10 +104,13 @@ export async function normalizeHistory(
103104
hItem.url = item.url
104105
hItem.title = item.title
105106
hItem.visitCount = item.visitCount
106-
normalizeHistoryItem(hItem)
107+
hItem.favicon = (item as HistoryItem).favicon
107108
normalized.push(hItem)
108109
}
109110
} else {
111+
if (item.lastVisitTime === undefined) continue
112+
if (after !== undefined && item.lastVisitTime < after) continue
113+
if (before !== undefined && item.lastVisitTime > before) continue
110114
normalized.push(item)
111115
}
112116
}

src/sidebar/components/panel.history.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ const historyList = computed((): HistoryGroup[] => {
118118
try {
119119
itemPreview.info = decodeURI(itemPreview.url)
120120
} catch (err) {
121-
Logs.warn('History panel: Cannot decodeURI:', itemPreview.url)
122121
itemPreview.info = itemPreview.url
123122
}
124123
const domain = Utils.getDomainOf(itemPreview.url)

0 commit comments

Comments
 (0)