mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2025-05-09 21:38:45 +00:00
Add default settings
This commit is contained in:
parent
ede1bb4275
commit
9e556721c5
7 changed files with 33 additions and 10 deletions
|
@ -90,10 +90,12 @@ func (svc *service) GetAuthUrl(ctx context.Context, instance string) (
|
|||
}
|
||||
|
||||
sessionID = util.NewSessionId()
|
||||
err = svc.sessionRepo.Add(model.Session{
|
||||
session := model.Session{
|
||||
ID: sessionID,
|
||||
InstanceDomain: instance,
|
||||
})
|
||||
Settings: *model.NewSettings(),
|
||||
}
|
||||
err = svc.sessionRepo.Add(session)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -276,6 +278,10 @@ func (svc *service) ServeTimelinePage(ctx context.Context, client io.Writer,
|
|||
return err
|
||||
}
|
||||
|
||||
for i := range statuses {
|
||||
statuses[i].ThreadInNewTab = c.Session.Settings.ThreadInNewTab
|
||||
}
|
||||
|
||||
if len(maxID) > 0 && len(statuses) > 0 {
|
||||
hasPrev = true
|
||||
prevLink = fmt.Sprintf("/timeline/$s?min_id=%s", timelineType, statuses[0].ID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue