mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-16 16:27:23 +02:00
always notify the given activity of text change
This commit is contained in:
parent
bc6cb492ef
commit
48f31b8d83
@ -564,11 +564,13 @@ class MainActivity : SimpleActivity(), ViewPager.OnPageChangeListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun currentNoteTextChanged(newText: String) {
|
fun currentNoteTextChanged(newText: String) {
|
||||||
|
if (!config.autosaveNotes) {
|
||||||
showSaveButton = newText != mCurrentNote.value
|
showSaveButton = newText != mCurrentNote.value
|
||||||
if (showSaveButton != saveNoteButton?.isVisible) {
|
if (showSaveButton != saveNoteButton?.isVisible) {
|
||||||
invalidateOptionsMenu()
|
invalidateOptionsMenu()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun checkWhatsNewDialog() {
|
private fun checkWhatsNewDialog() {
|
||||||
arrayListOf<Release>().apply {
|
arrayListOf<Release>().apply {
|
||||||
|
@ -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