mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-13 23:12: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) {
|
||||
showSaveButton = newText != mCurrentNote.value
|
||||
if (showSaveButton != saveNoteButton?.isVisible) {
|
||||
invalidateOptionsMenu()
|
||||
if (!config.autosaveNotes) {
|
||||
showSaveButton = newText != mCurrentNote.value
|
||||
if (showSaveButton != saveNoteButton?.isVisible) {
|
||||
invalidateOptionsMenu()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -87,11 +87,7 @@ class NoteFragment : Fragment() {
|
||||
view.notes_counter.beGone()
|
||||
}
|
||||
|
||||
if (config.showWordCount || !config.autosaveNotes) {
|
||||
view.notes_view.addTextChangedListener(textWatcher)
|
||||
} else {
|
||||
view.notes_view.removeTextChangedListener(textWatcher)
|
||||
}
|
||||
view.notes_view.addTextChangedListener(textWatcher)
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user