Skip to content

Commit

Permalink
chore: order apps by last used (#658)
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya authored Sep 17, 2024
1 parent 63cd230 commit 611f84c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions frontend/src/screens/apps/AppList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ function AppList() {
}

const albyConnection = apps.find((x) => x.name === albyConnectionName);
const otherApps = apps.filter(
(x) => x.nostrPubkey !== albyConnection?.nostrPubkey
);
const otherApps = apps
.filter((x) => x.nostrPubkey !== albyConnection?.nostrPubkey)
.sort(
(a, b) =>
new Date(b.lastEventAt ?? 0).getTime() -
new Date(a.lastEventAt ?? 0).getTime()
);

return (
<>
Expand Down

0 comments on commit 611f84c

Please sign in to comment.