Skip to content

Commit aed581a

Browse files
committed
check if the token has a :
1 parent 5e6d66c commit aed581a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/dark/zewo2/gui/screens/SessionIDScreen.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ public void initWidgets() {
3939
// Add
4040
t.add(theme.button("Done")).minWidth(220).expandX().widget().action = () -> {
4141
if (ID.get().isEmpty() || USER.get().isEmpty()) return;
42-
if (UUID.get().isEmpty()){
42+
if (ID.get().contains(":")){
4343
ID.set(ID.get().replaceAll("token:", ""));
4444
String tokenPart = ID.get().split(":")[0];
4545
String uuidPart = ID.get().split(":")[1];
4646
setSession(USER.get(), uuidPart, tokenPart);
47+
} else if (UUID.get().isEmpty()) {
48+
t.add(theme.label("Supply a UUID"));
4749
} else {
4850
setSession(USER.get(), UUID.get(), ID.get());
4951
}

0 commit comments

Comments
 (0)