New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove GitAsyncTask and replace with non-blocking coroutines #865
Remove GitAsyncTask and replace with non-blocking coroutines #865
Conversation
@FabianHenneke any particular reason for AutofillSaveActivity not extending AppCompatActivity? Would be |
I don't think there was, please go ahead and change it. |
Cool, thanks for quick response! Now get back on with your weekend :P |
It seems I broke Android with my extreme refactoring prowess... https://bin.msfjarvis.dev/~5eee41b25d7115001813f9b5 |
Seems like I ran into a bug: Kotlin/kotlinx.coroutines#2041. 1.4-M2 seems to fix it, trying that out. |
Alright that fixed the crash and everything's broken in the correct ways now. Will come back to this when I need to mellow out. |
@FabianHenneke how do we feel about eradicating |
They are highly coupled anyway and we are not really ever swapping out fragments anyway, so I would say that's fine if it simplifies things elsewhere. |
Hm but we still have the ToCloneOrNot fragment that's shown on first run, might honestly just make better sense to make it a separate activity. |
Giving up on that effort for the moment, this is gonna entail a larger refactor involving Autofill and SelectFolderFragment as well which is a distraction I do not want right now. Gonne see if |
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
TODO:
|
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Think this is about ready now |
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
app/src/main/java/com/zeapo/pwdstore/git/operation/SyncOperation.kt
Outdated
Show resolved
Hide resolved
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
|
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
app/src/main/java/com/zeapo/pwdstore/git/operation/GitOperation.kt
Outdated
Show resolved
Hide resolved
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
When I create a new password, the commit seems to be created correctly, but Password Store is finished when the commit is done. Maybe there is an issue related to |
I'll check after work. |
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Should be fixed now along with all the other git related tasks. |
This lets us use these directly with requireActivity() without having to cast to AppCompatActivity Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Will look into it tomorrow morning. Sorry for the late response, I got caught up in the natural follow-up PR that allows us to finally drop Jsch (coming soon). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me and worked in simple use cases, great work! Let's send it off to the snapshot build.
📢 Type of change
📜 Description
Refactors the git command execution to be less obtrusive to the users, offer better error messages and use coroutines in place of the aging AsyncTask.
💡 Motivation and Context
GitAsyncTask
is next on our list of ugly monoliths that need to go. Like GitActivity and PgpActivity, it encapsulates a bit too much logic that is better suited in different places of our execution flow.💚 How did you test it?
Completely untested, might not even compile.
📝 Checklist
🔮 Next steps
moar coroutines!