more work integration new timeline code

This commit is contained in:
kim 2025-02-13 12:34:45 +00:00
commit 771fbe2d5e
14 changed files with 419 additions and 606 deletions

30
internal/cache/timeline/timeline.go vendored Normal file
View file

@ -0,0 +1,30 @@
package timeline
import (
"codeberg.org/gruf/go-structr"
"github.com/superseriousbusiness/gotosocial/internal/paging"
)
func nextPageParams(
curLo, curHi string, // current page params
nextLo, nextHi string, // next lo / hi values
order paging.Order,
) (lo string, hi string) {
if order.Ascending() {
} else /* i.e. descending */ {
}
}
// toDirection converts page order to timeline direction.
func toDirection(o paging.Order) structr.Direction {
switch o {
case paging.OrderAscending:
return structr.Asc
case paging.OrderDescending:
return structr.Desc
default:
return false
}
}