Fudge
07/28/2020, 1:50 PMvar state by savedInstanceState{0}
Button(onClick ={state++}) {
Text(text = "Increase $state")
}
Am I right in thinking state
should be saved when I restart the app? Because it doesn't do thatAdam Powell
07/28/2020, 1:53 PMFudge
07/28/2020, 1:54 PMAdam Powell
07/28/2020, 1:54 PMFudge
07/28/2020, 1:58 PMAdam Powell
07/28/2020, 1:58 PMFudge
07/28/2020, 2:00 PMAdam Powell
07/28/2020, 2:00 PMMutableState<T>
is probably not the right abstraction for many forms of disk-persisted data since it makes it very difficult to know what has been confirmed written to disk or notFudge
07/28/2020, 2:12 PMTimo Drick
07/28/2020, 2:15 PMJoost Klitsie
07/28/2020, 2:18 PMTerminate Application
button in for example logcatAdam Powell
07/28/2020, 2:25 PMfinally the data storage solution will have a sensible namethat's kind of the first indicator that SharedPreferences was never a general purpose data storage solution to begin with 😄 though people have certainly ran with it over the years. it was basically written to hold things of the same level of complexity and importance as, "I prefer dark mode"
Joost Klitsie
07/28/2020, 2:28 PMAdam Powell
07/28/2020, 2:33 PMsuspend
functionsJoost Klitsie
07/28/2020, 2:34 PMAdam Powell
07/28/2020, 2:35 PMrunBlocking
around a suspend call on the main thread can lead to things going considerably slower than just performing the operation there in the first place, thanks to things like kernel scheduling and priority inversions across the systemJoost Klitsie
07/28/2020, 2:37 PMFudge
07/28/2020, 2:46 PMAdam Powell
07/28/2020, 3:15 PM