1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-06-03 19:58:06 +02:00

Working infinite scroll

This commit is contained in:
Philipp Heckel 2022-03-07 23:07:07 -05:00
parent 9757983046
commit 6d140d6a86
5 changed files with 66 additions and 14 deletions

View file

@ -40,7 +40,8 @@ class SubscriptionManager {
// It's actually fine, because the reading and filtering is quite fast. The rendering is what's
// killing performance. See https://dexie.org/docs/Collection/Collection.offset()#a-better-paging-approach
const pageSize = 20;
console.log(`getNotifications(${subscriptionId}, ${offset})`)
const pageSize = 2000;
return db.notifications
.orderBy("time") // Sort by time first
.filter(n => n.subscriptionId === subscriptionId)