Skip to content

Commit 46fec69

Browse files
committed
Add screen change logger
1 parent c7b7acc commit 46fec69

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## 2.0.1-debug.1
3+
## 2.0.1-debug.2
44

55
- Added debug logging
66

common/src/main/java/dev/terminalmc/autoreconnectrf/AutoReconnect.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ public static void onConfigSaved(Config config) {
108108
public static void onScreenChanged(@Nullable Screen current, @Nullable Screen next) {
109109
if (isSameType(current, next))
110110
return;
111+
if (debug())
112+
AutoReconnect.LOG.info(
113+
"Changing screen from {} to {}",
114+
current == null ? "null" : current.getClass().getSimpleName(),
115+
next == null ? "null" : next.getClass().getSimpleName()
116+
);
111117
if (!isMainScreen(current) && isMainScreen(next) || isReAuthenticating(current, next)) {
112118
cancelAutoReconnect();
113119
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
template_version=4
1111

1212
# Mod Version
13-
mod_version=2.0.1-debug.1
13+
mod_version=2.0.1-debug.2
1414
# 'STABLE', 'BETA' or 'ALPHA'
1515
mod_version_type=STABLE
1616

0 commit comments

Comments
 (0)