aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java
diff options
context:
space:
mode:
authorLulonaut <67191924+Lulonaut@users.noreply.github.com>2022-06-22 14:41:15 +0200
committerGitHub <noreply@github.com>2022-06-22 14:41:15 +0200
commitf34220a92af85a33d979edb24ac5c3e698498fe3 (patch)
treed36bcc12b1fd4116003c1c36cb09666f0e3f36c1 /src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java
parent439fc22ff04b0f5b0201c2d982bceb18d82fd553 (diff)
downloadnotenoughupdates-f34220a92af85a33d979edb24ac5c3e698498fe3.tar.gz
notenoughupdates-f34220a92af85a33d979edb24ac5c3e698498fe3.tar.bz2
notenoughupdates-f34220a92af85a33d979edb24ac5c3e698498fe3.zip
bug fixes (#172)
* yikes * cookie warning * better wording in docs * edit items in parent that are the bounds of the item list * totalCount not updating when not present * unplayable * comment? * outdated repo notification * more notification * crash * more crash * cookie bug
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java b/src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java
index c64fdb56..d373ef2c 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/NotificationHandler.java
@@ -49,6 +49,13 @@ public class NotificationHandler {
showNotificationOverInv = overInventory;
}
+ /**
+ * Stops rendering the notification, if one is displayed
+ */
+ public static void cancelNotification() {
+ notificationDisplayMillis = 0;
+ }
+
public static void renderNotification() {
long timeRemaining = 15000 - (System.currentTimeMillis() - notificationDisplayMillis);
boolean display = timeRemaining > 0 || notificationDisplayMillis == -420;