Skip to content

Commit

Permalink
fixed chat peek randomly scrolls
Browse files Browse the repository at this point in the history
  • Loading branch information
ImToggle committed Aug 29, 2024
1 parent 44486a1 commit 95062c9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/kotlin/org/polyfrost/chatting/Chatting.kt
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ object Chatting {
}
}

var canScroll = true

val key = ChattingConfig.chatPeekBind
if (key.isActive != lastPressed && ChattingConfig.chatPeek) {
lastPressed = key.isActive
Expand All @@ -181,6 +183,7 @@ object Chatting {
} else if (!ChattingConfig.peekMode) {
peeking = false
}
canScroll = false
if (!peeking) mc.ingameGUI.chatGUI.resetScroll()
}

Expand All @@ -196,7 +199,7 @@ object Chatting {
}

shouldSmooth = true
mc.ingameGUI.chatGUI.scroll(i)
if (canScroll) mc.ingameGUI.chatGUI.scroll(i)
}
}
}
Expand Down

0 comments on commit 95062c9

Please sign in to comment.