Skip to content

Commit

Permalink
Fixed a bug where toasts would not show up for people you haven't tal…
Browse files Browse the repository at this point in the history
…ked to before
  • Loading branch information
rebane2001 committed Jan 24, 2021
1 parent 3a90317 commit b86101c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod_id = livemessage
mod_name = Livemessage
mod_group = com.rebane2001
mod_version = 1.0.0
mod_version = 1.0.1
mod_author = ["rebane2001"]
mod_description = A Minecraft DM manager

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ public static boolean newMessage(String username, String message, boolean sentBy
UUID uuid = LiveProfileCache.getLiveprofileFromName(username).uuid;
boolean doHide = false;
if (uuid != null) {
if (!chats.contains(uuid))
loadBuddies();
if (!sentByMe) {
// Increase unread messages counter
unreadMessages.put(uuid, unreadMessages.getOrDefault(uuid, 0) + 1);
Expand All @@ -198,8 +200,6 @@ public static boolean newMessage(String username, String message, boolean sentBy
} catch (Exception e) {
e.printStackTrace();
}
if (!chats.contains(uuid))
loadBuddies();
}
// Send message to open window
for (LiveWindow liveWindow : liveWindows){
Expand Down

0 comments on commit b86101c

Please sign in to comment.