Skip to content

Commit

Permalink
Move saving of the html where it actually matters
Browse files Browse the repository at this point in the history
onSaveInstanceState is cool for when you want to survive process being killed but onDestroyView is enough to survive configuration changes
  • Loading branch information
LunarX committed Jul 9, 2024
1 parent a1aeb35 commit 962b5b4
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,8 @@ class EditorSampleFragment : Fragment() {
}
}

override fun onSaveInstanceState(outState: Bundle) {
editorSampleViewModel.editorReloader.save(binding.editor)
super.onSaveInstanceState(outState)
}

override fun onDestroyView() {
editorSampleViewModel.editorReloader.save(binding.editor)
super.onDestroyView()
_binding = null
}
Expand Down

0 comments on commit 962b5b4

Please sign in to comment.