Merge pull request #634 from Zocker1999NET/fix-621

Use MyMovementMethod on hotfix fixing crash on selection (SDK<=23)
This commit is contained in:
Tibor Kaputa 2023-07-10 16:15:51 +02:00 committed by GitHub
commit 07071b7b02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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
}
@ -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()
}
}