thunderbiscuit / padawan-wallet

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

Fix: Sync wallet on startup and stop crashing when changing tabs during sync #165

Closed fivetran-tangyetong closed 2 years ago

fivetran-tangyetong commented 2 years ago

Fixes #127 by calling a coroutine in the onCreateView so the view only calls it once on startup. Fixes #139 by calling the snackbar using the rootView instead of the child view, so switching fragments will not cause it to crash the app.

thunderbiscuit commented 2 years ago

I think this is good to go. Small little thing: usually I'm not a big fan of the not-null assertion operator. Are we sure this rootView can never be null?

fivetran-tangyetong commented 2 years ago

I'll look into it and get back to you

fivetran-tangyetong commented 2 years ago

Ok, I've changed intializing rootView from container?.root to simply calling binding.root, which I should have done from the beginning. Thanks for pointing it out!

thunderbiscuit commented 2 years ago

Good stuff.