mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-04 02:31:08 +02:00
do not allow undoing the initial note content setup
This commit is contained in:
parent
7550daf5a5
commit
628784c213
@ -130,7 +130,9 @@ class TextFragment : NoteFragment() {
|
|||||||
gravity = config.getTextGravity()
|
gravity = config.getTextGravity()
|
||||||
if (text.toString() != fileContents) {
|
if (text.toString() != fileContents) {
|
||||||
if (!skipTextUpdating) {
|
if (!skipTextUpdating) {
|
||||||
|
removeTextWatcher()
|
||||||
setText(fileContents)
|
setText(fileContents)
|
||||||
|
setTextWatcher()
|
||||||
}
|
}
|
||||||
skipTextUpdating = false
|
skipTextUpdating = false
|
||||||
setSelection(if (config.placeCursorToEnd) text.length else 0)
|
setSelection(if (config.placeCursorToEnd) text.length else 0)
|
||||||
@ -159,6 +161,7 @@ class TextFragment : NoteFragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun setTextWatcher() = view.text_note_view.addTextChangedListener(textWatcher)
|
fun setTextWatcher() = view.text_note_view.addTextChangedListener(textWatcher)
|
||||||
|
|
||||||
fun removeTextWatcher() = view.text_note_view.removeTextChangedListener(textWatcher)
|
fun removeTextWatcher() = view.text_note_view.removeTextChangedListener(textWatcher)
|
||||||
|
|
||||||
fun updateNoteValue(value: String) {
|
fun updateNoteValue(value: String) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user