thunderbiscuit / padawan-wallet

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

Fix: reset done tutorials requires app restart #88 #159

Closed fivetran-tangyetong closed 2 years ago

fivetran-tangyetong commented 2 years ago

Fixes #88 by Added a flag to Repository.kt so that when user resets their tutorials TutorialsHome.kt fragment will check for and update UI if necessary. I think this is the simplest fix unless its easier to redraw the TutorialsHome.kt fragment.

thunderbiscuit commented 2 years ago

Tested ACK. To me the whole "done" tutorials workflow and code looks just so wrong at this point 🤣, I do hope to find a better solution once the wallet gets ported to Compose.

But for now this is a good/hacky enough way to do it!

Thanks 👍

thunderbiscuit commented 2 years ago

Just one thing: would you mind squashing those two commits into one?

fivetran-tangyetong commented 2 years ago

Ok, I'll get back to you once I've done that! Still not very fluent in git workflows.

I'm also not sure on a cleaner method to redrawing the tutorialsHome state from the settings, hopefully compose gives us a better one.

thunderbiscuit commented 2 years ago

Yeah I think Compose should solve that nicely. For the workflow I think what you want to do is an interactive rebase (look it up). Something like `git rebase --interactive HEAD~2 will allow you to squash those two commits into one.

https://thoughtbot.com/blog/git-interactive-rebase-squash-amend-rewriting-history

fivetran-tangyetong commented 2 years ago

Okay, I think I got it 👍