moving notification to notification package inside ui
This commit is contained in:
parent
33603e1450
commit
b587f5acfd
7
main.go
7
main.go
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/aditya-K2/gomp/ui/notify"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -21,7 +22,7 @@ import (
|
|||||||
var (
|
var (
|
||||||
CONN *mpd.Client
|
CONN *mpd.Client
|
||||||
UI *ui.Application
|
UI *ui.Application
|
||||||
Notify *ui.NotificationServer
|
Notify *notify.NotificationServer
|
||||||
RENDERER *render.Renderer
|
RENDERER *render.Renderer
|
||||||
Volume int64
|
Volume int64
|
||||||
Random bool
|
Random bool
|
||||||
@ -56,7 +57,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
UI = ui.NewApplication()
|
UI = ui.NewApplication()
|
||||||
ui.ConnectUI(UI)
|
notify.ConnectUI(UI)
|
||||||
|
|
||||||
fileMap, err := CONN.GetFiles()
|
fileMap, err := CONN.GetFiles()
|
||||||
dirTree := client.GenerateDirectoryTree(fileMap)
|
dirTree := client.GenerateDirectoryTree(fileMap)
|
||||||
@ -70,7 +71,7 @@ func main() {
|
|||||||
|
|
||||||
ArtistTree, err = client.GenerateArtistTree()
|
ArtistTree, err = client.GenerateArtistTree()
|
||||||
ArtistTreeContent := utils.ConvertToArray(ArtistTree)
|
ArtistTreeContent := utils.ConvertToArray(ArtistTree)
|
||||||
Notify = ui.NewNotificationServer()
|
Notify = notify.NewNotificationServer()
|
||||||
Notify.Start()
|
Notify.Start()
|
||||||
client.SetNotificationServer(Notify)
|
client.SetNotificationServer(Notify)
|
||||||
render.SetNotificationServer(Notify)
|
render.SetNotificationServer(Notify)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package ui
|
package notify
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"github.com/aditya-K2/gomp/ui"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/aditya-K2/gomp/utils"
|
"github.com/aditya-K2/gomp/utils"
|
||||||
@ -10,10 +11,10 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
UI *Application
|
UI *ui.Application
|
||||||
)
|
)
|
||||||
|
|
||||||
func ConnectUI(a *Application) {
|
func ConnectUI(a *ui.Application) {
|
||||||
UI = a
|
UI = a
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user