mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-12 22:50:07 +01:00
fix a glitch with disappearing note values
This commit is contained in:
parent
fbc58abeb0
commit
8969a1a426
@ -101,12 +101,14 @@ class NoteFragment : androidx.fragment.app.Fragment() {
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
super.onSaveInstanceState(outState)
|
||||
outState.putString(TEXT, getCurrentNoteViewText())
|
||||
if (note != null) {
|
||||
outState.putString(TEXT, getCurrentNoteViewText())
|
||||
}
|
||||
}
|
||||
|
||||
override fun onViewStateRestored(savedInstanceState: Bundle?) {
|
||||
super.onViewStateRestored(savedInstanceState)
|
||||
if (savedInstanceState != null) {
|
||||
if (savedInstanceState != null && note != null && savedInstanceState.containsKey(TEXT)) {
|
||||
skipTextUpdating = true
|
||||
val newText = savedInstanceState.getString(TEXT) ?: ""
|
||||
view.notes_view.setText(newText)
|
||||
|
Loading…
x
Reference in New Issue
Block a user