thunderbiscuit / padawan-wallet

The bitcoin wallet trainer on Android.
https://padawanwallet.com/
Apache License 2.0
116 stars 51 forks source link

Use viewmodel cache instead of polling the shared preferences on every recomposition #206

Closed thunderbiscuit closed 2 years ago

thunderbiscuit commented 2 years ago

The decision of whether to show the dialog offering to send testnet coins currently requires we ask the shared preferences every time if that dialog has been shown before. We should poll shared preferences once upon creating the viewmodel and cache its response.

thunderbiscuit commented 2 years ago

Fixed by 95239be.