mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-10 21:07:29 -06:00
tidy + lint
This commit is contained in:
parent
a25e53af4e
commit
f1eb6476f3
6 changed files with 24 additions and 12 deletions
|
|
@ -22,16 +22,13 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
|
||||
)
|
||||
|
||||
const (
|
||||
preparedPostsMaxLength = desiredPostIndexLength
|
||||
)
|
||||
|
||||
// Timeline represents a timeline for one account, and contains indexed and prepared posts.
|
||||
type Timeline interface {
|
||||
/*
|
||||
|
|
@ -113,17 +110,19 @@ type timeline struct {
|
|||
account *gtsmodel.Account
|
||||
db db.DB
|
||||
tc typeutils.TypeConverter
|
||||
log *logrus.Logger
|
||||
sync.Mutex
|
||||
}
|
||||
|
||||
// NewTimeline returns a new Timeline for the given account ID
|
||||
func NewTimeline(accountID string, db db.DB, typeConverter typeutils.TypeConverter) Timeline {
|
||||
func NewTimeline(accountID string, db db.DB, typeConverter typeutils.TypeConverter, log *logrus.Logger) Timeline {
|
||||
return &timeline{
|
||||
postIndex: &postIndex{},
|
||||
preparedPosts: &preparedPosts{},
|
||||
accountID: accountID,
|
||||
db: db,
|
||||
tc: typeConverter,
|
||||
log: log,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue