Skip to content

Commit

Permalink
Merge pull request #634 from Zocker1999NET/fix-621
Browse files Browse the repository at this point in the history
Use MyMovementMethod on hotfix fixing crash on selection (SDK<=23)
  • Loading branch information
tibbi committed Jul 10, 2023
2 parents 6c7d3aa + 716f96a commit 07071b7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class MainActivity : SimpleActivity() {
super.onActionModeStarted(mode)
if (wasInit) {
currentNotesView()?.apply {
if (config.clickableLinks || movementMethod is LinkMovementMethod) {
if (config.clickableLinks || movementMethod is LinkMovementMethod || movementMethod is MyMovementMethod) {
movementMethod = ArrowKeyMovementMethod.getInstance()
noteViewWithTextSelected = this
}
Expand All @@ -251,7 +251,7 @@ class MainActivity : SimpleActivity() {
override fun onActionModeFinished(mode: ActionMode?) {
super.onActionModeFinished(mode)
if (config.clickableLinks) {
noteViewWithTextSelected?.movementMethod = LinkMovementMethod.getInstance()
noteViewWithTextSelected?.movementMethod = MyMovementMethod.getInstance()
}
}

Expand Down

0 comments on commit 07071b7

Please sign in to comment.