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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user