This repository has been archived on 2024-01-06. You can view files and clone it, but cannot push or open issues or pull requests.
Files
srv/controller/controller.go
Dave Gallant a13d212968 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.
2020-04-08 00:21:18 -04:00

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
}