Simplify paging algorithm

This commit is contained in:
Jon Staab
2024-11-20 13:33:54 -08:00
parent 86c710f40f
commit 3cb85a7b70
+1 -1
View File
@@ -128,7 +128,7 @@ export class FeedController {
// Relays can't be relied upon to return events in descending order, do exponential // Relays can't be relied upon to return events in descending order, do exponential
// windowing to ensure we get the most recent stuff on first load, but eventually find it all // windowing to ensure we get the most recent stuff on first load, but eventually find it all
if (count < limit) { if (count < limit) {
delta = delta * Math.round(10 - 9 * (Math.log(count + 1) / Math.log(limit + 1))) delta = delta * Math.round(100 * (2 - inc(count) / inc(limit)))
until = since until = since
} }