From b587f5acfdc686e403fc8b9103336590fa2d02e8 Mon Sep 17 00:00:00 2001 From: aditya-K2 Date: Thu, 23 Dec 2021 00:16:07 +0530 Subject: [PATCH] moving notification to notification package inside ui --- main.go | 7 ++++--- ui/{ => notify}/notification.go | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) rename ui/{ => notify}/notification.go (96%) diff --git a/main.go b/main.go index 576871b..0773b2f 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,7 @@ package main import ( + "github.com/aditya-K2/gomp/ui/notify" "strconv" "time" @@ -21,7 +22,7 @@ import ( var ( CONN *mpd.Client UI *ui.Application - Notify *ui.NotificationServer + Notify *notify.NotificationServer RENDERER *render.Renderer Volume int64 Random bool @@ -56,7 +57,7 @@ func main() { } UI = ui.NewApplication() - ui.ConnectUI(UI) + notify.ConnectUI(UI) fileMap, err := CONN.GetFiles() dirTree := client.GenerateDirectoryTree(fileMap) @@ -70,7 +71,7 @@ func main() { ArtistTree, err = client.GenerateArtistTree() ArtistTreeContent := utils.ConvertToArray(ArtistTree) - Notify = ui.NewNotificationServer() + Notify = notify.NewNotificationServer() Notify.Start() client.SetNotificationServer(Notify) render.SetNotificationServer(Notify) diff --git a/ui/notification.go b/ui/notify/notification.go similarity index 96% rename from ui/notification.go rename to ui/notify/notification.go index 4741d34..e05554f 100644 --- a/ui/notification.go +++ b/ui/notify/notification.go @@ -1,6 +1,7 @@ -package ui +package notify import ( + "github.com/aditya-K2/gomp/ui" "time" "github.com/aditya-K2/gomp/utils" @@ -10,10 +11,10 @@ import ( ) var ( - UI *Application + UI *ui.Application ) -func ConnectUI(a *Application) { +func ConnectUI(a *ui.Application) { UI = a }