Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package globalstate holds the types for the ui state
Index ¶
Constants ¶
      View Source
      
  
const ( AppStageMessageUI = iota AppStageTabbedUI )
Variables ¶
This section is empty.
Functions ¶
func FileSave ¶
func FileSave(s *GlobalStateSave) error
func IntervalSaveWatch ¶
func IntervalSaveWatch(s *GlobalStateSave) error
IntervalSaveWatch is expected to be called from the main rendering loop of the application and just deltas lastSaveTime, if the delta exceeds the saveIntervalSeconds threshold, FileSave() is rerun
Types ¶
type AppQueueload ¶
type GlobalState ¶
type GlobalState struct {
	Window           *app.Window
	Theme            *material.Theme
	MarkdownRenderer *markdown.Renderer
	MobrouteRuntime  *mobroute.MobrouteRuntime
	MobrouteLog      *bytes.Buffer
	PendingLoadInfo PendingLoadInfo
	AppQueueload    *AppQueueload
	// Unsaved global state
	TabSelected        string
	LocationFromCoords []float64
	LocationFromLabel  string
	LocationToLabel    string
	LocationToCoords   []float64
	// Saved global state (will be written to file & restored on quit/boot)
	Save GlobalStateSave
}
    type GlobalStateSave ¶
type GlobalStateSave struct {
	FeedIDsEnabled      []int    `json:"feed_ids_enabled"`
	Favorites           []string `json:"favorites"`
	CfgOmitSchedule     bool     `json:"cfg_omit_schedule"`
	CfgOfflineMode      bool     `json:"cfg_offline_mode"`
	CfgCrossfeedCompute bool     `json:"cfg_crossfeed_compute"`
}
    func FileLoad ¶
func FileLoad() (*GlobalStateSave, error)
func FileLoadWarnError ¶
func FileLoadWarnError() GlobalStateSave
 Click to show internal directories. 
   Click to hide internal directories.