From c6e00afc7c23df994b70eee89d2d392718e6a321 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Wed, 4 Oct 2023 13:09:42 +0100 Subject: [feature] tentatively start adding polls support (#2249) --- internal/timeline/get.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'internal/timeline/get.go') diff --git a/internal/timeline/get.go b/internal/timeline/get.go index bc238c276..93c869e73 100644 --- a/internal/timeline/get.go +++ b/internal/timeline/get.go @@ -222,7 +222,7 @@ func (t *timeline) getXBetweenIDs(ctx context.Context, amount int, behindID stri // a point where the items are out of the range // we're interested in. rangeF = func(e *list.Element) (bool, error) { - entry := e.Value.(*indexedItemsEntry) //nolint:forcetypeassert + entry := e.Value.(*indexedItemsEntry) if entry.itemID >= behindID { // ID of this item is too high, @@ -276,7 +276,6 @@ func (t *timeline) getXBetweenIDs(ctx context.Context, amount int, behindID stri // Move the mark back one place each loop. beforeIDMark = e - //nolint:forcetypeassert if entry := e.Value.(*indexedItemsEntry); entry.itemID <= beforeID { // We've gone as far as we can through // the list and reached entries that are @@ -319,7 +318,7 @@ func (t *timeline) getXBetweenIDs(ctx context.Context, amount int, behindID stri // To preserve ordering, we need to reverse the slice // when we're finished. for e := beforeIDMark; e != nil; e = e.Prev() { - entry := e.Value.(*indexedItemsEntry) //nolint:forcetypeassert + entry := e.Value.(*indexedItemsEntry) if entry.itemID == beforeID { // Don't include the beforeID -- cgit v1.2.3