Skip to content

Commit 94239cd

Browse files
committed
Sorting by for all websites
1 parent 2643c25 commit 94239cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/compositions/all-tab-list-summary.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ export async function useAllTabListSummary(sortingBy: SortingBy): Promise<TabLis
1212
return b.summaryTime - a.summaryTime;
1313
});
1414

15+
tabs = unSortedTabs.sort(function (a: Tab, b: Tab) {
16+
return sortingBy == SortingBy.UsageTime ? b.summaryTime - a.summaryTime : b.counter - a.counter;
17+
});
18+
1519
const summaryTimeList = tabs?.map(function (tab) {
1620
return tab.summaryTime;
1721
});

0 commit comments

Comments
 (0)