mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-01-30 22:14:52 +01:00
handle actionMode related things only if the activity is init
This commit is contained in:
parent
1ef3528a62
commit
1e51175be4
@ -43,6 +43,7 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
|
||||
lateinit var mNotes: List<Note>
|
||||
|
||||
var noteViewWithTextSelected: MyEditText? = null
|
||||
private var wasInit = false
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
@ -70,6 +71,8 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
|
||||
intent.action = null
|
||||
}
|
||||
}
|
||||
|
||||
wasInit = true
|
||||
}
|
||||
|
||||
private fun handleText(text: String) {
|
||||
@ -176,6 +179,7 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
|
||||
// https://code.google.com/p/android/issues/detail?id=191430 quickfix
|
||||
override fun onActionModeStarted(mode: ActionMode?) {
|
||||
super.onActionModeStarted(mode)
|
||||
if (wasInit) {
|
||||
currentNotesView()?.apply {
|
||||
if (config.clickableLinks || movementMethod == LinkMovementMethod.getInstance()) {
|
||||
movementMethod = ArrowKeyMovementMethod.getInstance()
|
||||
@ -183,6 +187,7 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onActionModeFinished(mode: ActionMode?) {
|
||||
super.onActionModeFinished(mode)
|
||||
|
Loading…
x
Reference in New Issue
Block a user