mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-15 07:52:02 +02:00
always notify the given activity of text change
This commit is contained in:
parent
bc6cb492ef
commit
48f31b8d83
@ -564,9 +564,11 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun currentNoteTextChanged(newText: String) {
|
fun currentNoteTextChanged(newText: String) {
|
||||||
showSaveButton = newText != mCurrentNote.value
|
if (!config.autosaveNotes) {
|
||||||
if (showSaveButton != saveNoteButton?.isVisible) {
|
showSaveButton = newText != mCurrentNote.value
|
||||||
invalidateOptionsMenu()
|
if (showSaveButton != saveNoteButton?.isVisible) {
|
||||||
|
invalidateOptionsMenu()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,11 +87,7 @@ class NoteFragment : Fragment() {
|
|||||||
view.notes_counter.beGone()
|
view.notes_counter.beGone()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.showWordCount || !config.autosaveNotes) {
|
view.notes_view.addTextChangedListener(textWatcher)
|
||||||
view.notes_view.addTextChangedListener(textWatcher)
|
|
||||||
} else {
|
|
||||||
view.notes_view.removeTextChangedListener(textWatcher)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user