From 99a4e5748471800dde82c02d5421d1db681c9838 Mon Sep 17 00:00:00 2001 From: nea Date: Thu, 29 Sep 2022 01:15:45 +0200 Subject: Use api selected variable to find best profile --- .../moulberry/notenoughupdates/profileviewer/ProfileViewer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java index ec68071e..983cbf4e 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/ProfileViewer.java @@ -887,6 +887,10 @@ public class ProfileViewer { } String cuteName = profile.get("cute_name").getAsString(); + if (profile.has("selected") && profile.get("selected").getAsBoolean()) { + lastCuteName = cuteName; + break; + } if (lastCuteName == null) lastCuteName = cuteName; profileNames.add(cuteName); if (member.has("last_save")) { -- cgit