don't delay the downloadmenu message when no songs are available

This commit is contained in:
yugecin 2018-07-07 23:25:22 +02:00
parent 9af6abacb0
commit 34dc75469c
No known key found for this signature in database
GPG Key ID: 2C5AC035A7068E44
2 changed files with 1 additions and 14 deletions

View File

@ -149,9 +149,6 @@ public class DownloadsMenu extends ComplexOpsuState {
/** Beatmap set ID of the current beatmap being previewed, or -1 if none. */ /** Beatmap set ID of the current beatmap being previewed, or -1 if none. */
private int previewID = -1; private int previewID = -1;
/** The bar notification to send upon entering the state. */
private String barNotificationOnLoad;
/** Search query, executed in {@code queryThread}. */ /** Search query, executed in {@code queryThread}. */
private SearchQuery searchQuery; private SearchQuery searchQuery;
@ -948,10 +945,6 @@ public class DownloadsMenu extends ComplexOpsuState {
startDownloadIndexPos.setPosition(0); startDownloadIndexPos.setPosition(0);
pageDir = Page.RESET; pageDir = Page.RESET;
previewID = -1; previewID = -1;
if (barNotificationOnLoad != null) {
barNotifs.send(barNotificationOnLoad);
barNotificationOnLoad = null;
}
} }
@Override @Override
@ -992,10 +985,4 @@ public class DownloadsMenu extends ComplexOpsuState {
else if (DownloadNode.downloadAreaContains(cx, cy)) else if (DownloadNode.downloadAreaContains(cx, cy))
startDownloadIndexPos.scrollOffset(shift * DownloadNode.getInfoHeight()); 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; }
} }

View File

@ -895,7 +895,7 @@ public class MainMenu extends BaseOpsuState {
private void enterSongMenu() { private void enterSongMenu() {
OpsuState state = songMenuState; OpsuState state = songMenuState;
if (BeatmapSetList.get().getMapSetCount() == 0) { if (BeatmapSetList.get().getMapSetCount() == 0) {
downloadState.notifyOnLoad("Download some beatmaps to get started!"); barNotifs.send("Download some beatmaps to get started!");
state = downloadState; state = downloadState;
} }
displayContainer.switchState(state); displayContainer.switchState(state);