Skip to content

Commit

Permalink
Use MyMovementMethod on hotfix fixing crash on selection (SDK<=23)
Browse files Browse the repository at this point in the history
- fixes SimpleMobileTools#621
- hotfix causing the issue implemented in 1741070
  • Loading branch information
Zocker1999NET committed May 20, 2023
1 parent 148c9e5 commit 716f96a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,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 @@ -254,7 +254,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 716f96a

Please sign in to comment.