mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-04-13 06:52:03 +02:00
fix #112, keep cursor position at Resume
This commit is contained in:
parent
8adaa00967
commit
ba2a9af7fb
@ -106,11 +106,13 @@ class NoteFragment : Fragment() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
setText(fileContents)
|
|
||||||
setColors(config.textColor, config.primaryColor, config.backgroundColor)
|
setColors(config.textColor, config.primaryColor, config.backgroundColor)
|
||||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, context.getTextSize())
|
setTextSize(TypedValue.COMPLEX_UNIT_PX, context.getTextSize())
|
||||||
gravity = getTextGravity()
|
gravity = getTextGravity()
|
||||||
setSelection(if (config.placeCursorToEnd) text.length else 0)
|
if (text.toString() != fileContents) {
|
||||||
|
setText(fileContents)
|
||||||
|
setSelection(if (config.placeCursorToEnd) text.length else 0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user