Skip to content

Commit

Permalink
Fix NormalMinchatMessageElement.addContextActions being unused
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnemotechnician committed Apr 11, 2023
1 parent 5c2392f commit 31fe24b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ abstract class MinchatMessageElement(
false.also { updateBackground() }

override fun touchDown(event: InputEvent?, x: Float, y: Float, pointer: Int, button: KeyCode?): Boolean {
if (!addContextActions) return false

if (Vars.mobile) {
updateBackground()
longClickBegin = System.currentTimeMillis()
Expand All @@ -55,6 +57,8 @@ abstract class MinchatMessageElement(
}

override fun touchUp(event: InputEvent?, x: Float, y: Float, pointer: Int, button: KeyCode?) {
if (!addContextActions) return

if (Vars.mobile && longClickBegin > 0L) {
if (System.currentTimeMillis() - longClickBegin > 400L) {
onRightClick()
Expand Down

0 comments on commit 31fe24b

Please sign in to comment.