Skip to content

Commit bdc1486

Browse files
committed
fix migration completely killing chat opacity
1 parent 41b74e9 commit bdc1486

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mod_name = Chatting
22
mod_id = chatting
3-
mod_version = 2.0.1
3+
mod_version = 2.0.2
44
mod_archives_name = Chatting
55

66
# Gradle Configuration -- DO NOT TOUCH THESE VALUES.

src/main/kotlin/org/polyfrost/chatting/config/ChattingConfig.kt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ object ChattingConfig : Config(
345345
var tooltipTextRenderType = 1
346346

347347
var isPatcherMigrated = false
348+
var isPatcherMigratedPt2CauseImStupid = false
348349

349350
init {
350351
initialize()
@@ -356,7 +357,7 @@ object ChattingConfig : Config(
356357
if (OldPatcherConfig.transparentChatOnlyWhenClosed) {
357358
chatWindow.setBackgroundColor(chatWindow.getBackgroundColor().also { it.alpha = 0 })
358359
chatWindow.differentOpacity = true
359-
chatWindow.openOpacity = 255
360+
chatWindow.openOpacity = 0
360361
} else {
361362
chatWindow.setBackground(false)
362363
}
@@ -366,6 +367,17 @@ object ChattingConfig : Config(
366367
}
367368
isPatcherMigrated = true
368369

370+
save()
371+
}
372+
if (!isPatcherMigratedPt2CauseImStupid) {
373+
if (OldPatcherConfig.transparentChat) {
374+
if (OldPatcherConfig.transparentChatOnlyWhenClosed && chatWindow.openOpacity == 255) {
375+
chatWindow.openOpacity = 0
376+
}
377+
}
378+
379+
isPatcherMigratedPt2CauseImStupid = true
380+
369381
save()
370382
}
371383
} catch (_: ClassNotFoundException) {}

0 commit comments

Comments
 (0)