I’ve done something very similar recently actually.
I don’t know if it’s a good practice but I ended using DataStore and StateFlow as a signalling mechanism between ViewModel and the zip operation.
I’ve done something very similar recently actually.
I don’t know if it’s a good practice but I ended using DataStore and StateFlow as a signalling mechanism between ViewModel and the zip operation.
The Android Developer channel on YouTube has a lot of helpful tutorial on developing in Compose.
I recommend watching this playlist to understand the basics concepts.
Android Studio is the way to go, especially you’re new to this space. Be familiar with the official tools before exploring other options.
You shouldn’t write your Composable like this, Composable shouldn’t have business logic in it.
A Composable only describes the UI it represents, and it’s possible to be re-runned at any point in time. In the best case scenario, it should only display the states it received from an entity like a ViewModel and emit actions to the entity as well.
So in your case, the zip opening things should be outside of the import()
Composable depends on you application structure and updated string through a different means.
There’s one based on Git, but haven’t been updated for a while: Git Journal
Using git it’s probably the most easy and lightweight method to VC plain text, and you will probably just need to use the
git commit
command most of the time.I personally just use a bash script and run it through Tasker and Termux to sync my text notes to GitHub.