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.
22 lines
463 B
Go
22 lines
463 B
Go
package controller
|
|
|
|
import (
|
|
config "github.com/davegallant/srv/config"
|
|
feeds "github.com/davegallant/srv/feeds"
|
|
)
|
|
|
|
// Controller keeps everything together
|
|
type Controller struct {
|
|
Config config.Configuration
|
|
Rss *feeds.RSS
|
|
CurrentFeed int
|
|
}
|
|
|
|
// Init initiates the controller with config
|
|
func (c *Controller) Init(conf string) {
|
|
c.Config = config.LoadConfiguration(conf)
|
|
c.Rss = &feeds.RSS{}
|
|
c.Rss.Update(c.Config.Feeds)
|
|
c.CurrentFeed = 0
|
|
}
|