Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Add support for multiple accounts #329

Merged
merged 11 commits into from
Dec 15, 2020
Merged

Conversation

msfjarvis
Copy link
Collaborator

@mvietri has been unable to continue his work on #90 and I use the feature every day so figure I'd get the ball rolling. The existing code has been rebased and most of the pending review comments have been addressed in a separate commit to make reviewing simpler.

@Tunous
Copy link
Owner

Tunous commented Sep 12, 2020

Could you tell me what is your plan here? I don't see this being marked as a draft pull request but you said that not all review comments have been addressed. I wonder what is to be done now. Should I go on with new review or are you still planning more improvements? Non-passing CI suggests that there is still some work to do.

@msfjarvis
Copy link
Collaborator Author

I should have marked the PR as a draft, apologies for that. I'm still working on getting tests fixed and addressing the remaining few review comments and will undraft this once done.

@msfjarvis msfjarvis marked this pull request as draft September 12, 2020 18:35
Esselans and others added 4 commits December 11, 2020 02:00
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
@msfjarvis msfjarvis marked this pull request as ready for review December 10, 2020 20:35
@msfjarvis
Copy link
Collaborator Author

Rebased and fixed tests, should be good to go now.

Copy link
Owner

@Tunous Tunous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a basic glance at the code. Later I'll try running app with these changes and add comments if I find anything.

List<AccountManager> accounts = Observable.fromIterable(accountManagerAdapter.get().getData())
.ofType(AccountManager.class)
.toList()
.blockingGet();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we creating an observable and then converting it back? Isn't it possible to avoid switching between these?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it's for the ofType filtering functionality, I'll try to filter directly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've filtered it with the stream() extension but I'm not sure it works down till API 23.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
@msfjarvis
Copy link
Collaborator Author

msfjarvis commented Dec 12, 2020

Hm, it seems gradle-cache-action's latest version is having intermittent problems. I'll rollback to v1.5.

Edit: tracking issue for the bug burrunan/gradle-cache-action#27

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
The lighter one caused a nearly-white on white effect when switching accounts.

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
@msfjarvis msfjarvis requested a review from Tunous December 12, 2020 06:13
Copy link
Owner

@Tunous Tunous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to merge this. I have found few things that could be improved but these are not blocking as the feature is working correctly.

My notes:

  • It would be more intuitive if account rows were clickable. Clicking on them could switch accounts replacing swipe left to switch gesture.
  • I think that it would be a good idea if the dialog automatically closed after user switched account.
  • Some sort of indicator marking which account is currently selected
  • Logout button is visible even when I'm logged out
  • Also there doesn't seem to be anything indicating that we are logged out. But that probably would be solved if we had selected account indicator and hiding logout button, not sure.

@Tunous Tunous merged commit e2936fd into Tunous:master Dec 15, 2020
@Tunous Tunous added this to the 0.11.1 milestone Dec 15, 2020
@Tunous Tunous added the feature New feature label Dec 15, 2020
@msfjarvis msfjarvis deleted the multiple_accounts branch December 15, 2020 22:53
@msfjarvis
Copy link
Collaborator Author

Thanks for merging and your notes! I'll try to address them sometime over the next couple weeks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants