Skip to content

Commit

Permalink
fix migration completely killing chat opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Jun 24, 2024
1 parent 41b74e9 commit bdc1486
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod_name = Chatting
mod_id = chatting
mod_version = 2.0.1
mod_version = 2.0.2
mod_archives_name = Chatting

# Gradle Configuration -- DO NOT TOUCH THESE VALUES.
Expand Down
14 changes: 13 additions & 1 deletion src/main/kotlin/org/polyfrost/chatting/config/ChattingConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ object ChattingConfig : Config(
var tooltipTextRenderType = 1

var isPatcherMigrated = false
var isPatcherMigratedPt2CauseImStupid = false

init {
initialize()
Expand All @@ -356,7 +357,7 @@ object ChattingConfig : Config(
if (OldPatcherConfig.transparentChatOnlyWhenClosed) {
chatWindow.setBackgroundColor(chatWindow.getBackgroundColor().also { it.alpha = 0 })
chatWindow.differentOpacity = true
chatWindow.openOpacity = 255
chatWindow.openOpacity = 0
} else {
chatWindow.setBackground(false)
}
Expand All @@ -366,6 +367,17 @@ object ChattingConfig : Config(
}
isPatcherMigrated = true

save()
}
if (!isPatcherMigratedPt2CauseImStupid) {
if (OldPatcherConfig.transparentChat) {
if (OldPatcherConfig.transparentChatOnlyWhenClosed && chatWindow.openOpacity == 255) {
chatWindow.openOpacity = 0
}
}

isPatcherMigratedPt2CauseImStupid = true

save()
}
} catch (_: ClassNotFoundException) {}
Expand Down

0 comments on commit bdc1486

Please sign in to comment.