mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Remove common functionality from KeyboardWidget and into Base
Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
@@ -12,17 +12,18 @@ type WtfAppManager struct {
|
||||
// NewAppManager creates and returns an instance of AppManager
|
||||
func NewAppManager() WtfAppManager {
|
||||
appMan := WtfAppManager{
|
||||
WtfApps: []*WtfApp{},
|
||||
|
||||
selected: 0,
|
||||
}
|
||||
|
||||
return appMan
|
||||
}
|
||||
|
||||
// AddApp adds a WtfApp to the collection of apps that the AppManager manages.
|
||||
// Add adds a WtfApp to the collection of apps that the AppManager manages.
|
||||
// This app is then available for display onscreen.
|
||||
func (appMan *WtfAppManager) AddApp(wtfApp *WtfApp) error {
|
||||
func (appMan *WtfAppManager) Add(wtfApp *WtfApp) {
|
||||
appMan.WtfApps = append(appMan.WtfApps, wtfApp)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Current returns the currently-displaying instance of WtfApp
|
||||
|
||||
Reference in New Issue
Block a user