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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort by recently used #1031
Sort by recently used #1031
Conversation
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.
Thanks for the v2, this approach looks pretty good to me. Just a few comments.
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.
Seems good to me, address Fabian's review comments and I'll merge it after testing. Great job!
would it be better to save the file path or a hash? |
I think i included all your reviews and manage the case of renaming category/password |
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.
Some more comments, but I'm overall quite happy. Thanks for the contribution!
app/src/main/java/com/zeapo/pwdstore/crypto/PasswordCreationActivity.kt
Outdated
Show resolved
Hide resolved
val timeP1 = recentHistory.getString(p1.file.absolutePath) | ||
val timeP2 = recentHistory.getString(p2.file.absolutePath) | ||
when { | ||
timeP1 != null && timeP2 != null -> timeP2.compareTo(timeP1) |
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.
This could be simplified using compareBy
and nullsLast
, but I could also add that later.
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.
I'll leave it to you, I have no idea how to use those...
Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
Co-authored-by: Fabian Henneke <FabianHenneke@users.noreply.github.com>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
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.
Hey, @msfjarvis I think you missed one here too.
馃摙 Type of change
馃摐 Description
I added a new
PasswordSortOrder
for recently used passwords, saving the time when the password was used and comparing with others.馃挕 Motivation and Context
#535
馃挌 How did you test it?
馃摑 Checklist
馃敭 Next steps
馃摳 Screenshots / GIFs