Determine when to apply autoscroll

When shrinking the window, scrolling was limited to only the current
view buffer. This should implement auto-scrolling. It's a little bit
janky, but should be sufficient for now.
This commit is contained in:
Dave Gallant
2020-04-07 23:25:27 -04:00
parent 69139ee7f6
commit a13d212968
3 changed files with 55 additions and 61 deletions

View File

@@ -1,17 +1,15 @@
package controller
import (
"time"
config "github.com/davegallant/srv/config"
feeds "github.com/davegallant/srv/feeds"
)
// Controller keeps everything together
type Controller struct {
Config config.Configuration
lastUpdate time.Time
Rss *feeds.RSS
Config config.Configuration
Rss *feeds.RSS
CurrentFeed int
}
// Init initiates the controller with config
@@ -19,4 +17,5 @@ func (c *Controller) Init(conf string) {
c.Config = config.LoadConfiguration(conf)
c.Rss = &feeds.RSS{}
c.Rss.Update(c.Config.Feeds)
c.CurrentFeed = 0
}