From 34dc75469c72ed1cd8583d14c1ea2fcf4e2f71b9 Mon Sep 17 00:00:00 2001 From: yugecin Date: Sat, 7 Jul 2018 23:25:22 +0200 Subject: [PATCH] don't delay the downloadmenu message when no songs are available --- src/itdelatrisu/opsu/states/DownloadsMenu.java | 13 ------------- src/itdelatrisu/opsu/states/MainMenu.java | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/itdelatrisu/opsu/states/DownloadsMenu.java b/src/itdelatrisu/opsu/states/DownloadsMenu.java index 3cf1cbac..f9f15c8b 100644 --- a/src/itdelatrisu/opsu/states/DownloadsMenu.java +++ b/src/itdelatrisu/opsu/states/DownloadsMenu.java @@ -149,9 +149,6 @@ public class DownloadsMenu extends ComplexOpsuState { /** Beatmap set ID of the current beatmap being previewed, or -1 if none. */ private int previewID = -1; - /** The bar notification to send upon entering the state. */ - private String barNotificationOnLoad; - /** Search query, executed in {@code queryThread}. */ private SearchQuery searchQuery; @@ -948,10 +945,6 @@ public class DownloadsMenu extends ComplexOpsuState { startDownloadIndexPos.setPosition(0); pageDir = Page.RESET; previewID = -1; - if (barNotificationOnLoad != null) { - barNotifs.send(barNotificationOnLoad); - barNotificationOnLoad = null; - } } @Override @@ -992,10 +985,4 @@ public class DownloadsMenu extends ComplexOpsuState { else if (DownloadNode.downloadAreaContains(cx, cy)) startDownloadIndexPos.scrollOffset(shift * DownloadNode.getInfoHeight()); } - - /** - * Sends a bar notification upon entering the state. - * @param s the notification string - */ - public void notifyOnLoad(String s) { barNotificationOnLoad = s; } } diff --git a/src/itdelatrisu/opsu/states/MainMenu.java b/src/itdelatrisu/opsu/states/MainMenu.java index 2ef5fb18..bc400325 100644 --- a/src/itdelatrisu/opsu/states/MainMenu.java +++ b/src/itdelatrisu/opsu/states/MainMenu.java @@ -895,7 +895,7 @@ public class MainMenu extends BaseOpsuState { private void enterSongMenu() { OpsuState state = songMenuState; if (BeatmapSetList.get().getMapSetCount() == 0) { - downloadState.notifyOnLoad("Download some beatmaps to get started!"); + barNotifs.send("Download some beatmaps to get started!"); state = downloadState; } displayContainer.switchState(state);