mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-02 07:02:25 -06:00
more work integration new timeline code
This commit is contained in:
parent
49d9a008d9
commit
771fbe2d5e
14 changed files with 419 additions and 606 deletions
30
internal/cache/timeline/timeline.go
vendored
Normal file
30
internal/cache/timeline/timeline.go
vendored
Normal 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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue