ref: a20b17aaece69ffc9854e3b35ccea5162019e7ff
parent: 66dd5b18259ccfcbb1a3f77d843f575c217fa76b
author: penny <penny@limitedideas.org>
date: Wed Oct 8 17:28:03 EDT 2025
limit backloading statuses
--- a/status.go
+++ b/status.go
@@ -7,6 +7,8 @@
mastodon "codeberg.org/penny64/hellclient-go-mastodon"
)
+const maxUnreadStatusesToLoad = 100
+
func (hc *Hellclient) GetStatusesSince(ID mastodon.ID, GetTimeline func(ctx context.Context, pg *mastodon.Pagination) ([]*mastodon.Status, error)) ([]*mastodon.Status, error) { page := &mastodon.Pagination{MinID: ID}@@ -34,6 +36,9 @@
//I really don't understand the server's results but erase the max ID and it paginates up I don't know man
page.MaxID = ""
fmt.Printf("Loaded %v statuses....", len(statuses))+ if len(statuses) >= maxUnreadStatusesToLoad {+ break
+ }
}
return statuses, err
--
⑨