fix #112, keep cursor position at Resume

This commit is contained in:
tibbi 2017-09-23 10:45:31 +02:00
parent 8adaa00967
commit ba2a9af7fb

View File

@ -106,11 +106,13 @@ class NoteFragment : Fragment() {
return
}
setText(fileContents)
setColors(config.textColor, config.primaryColor, config.backgroundColor)
setTextSize(TypedValue.COMPLEX_UNIT_PX, context.getTextSize())
gravity = getTextGravity()
setSelection(if (config.placeCursorToEnd) text.length else 0)
if (text.toString() != fileContents) {
setText(fileContents)
setSelection(if (config.placeCursorToEnd) text.length else 0)
}
}
}