Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@SUPERCILEX
Copy link
Collaborator

Built on top of #1207

Darn it! I should have seen this coming, but the usable failure stuff doesn't cover success states or non-usable failure states! πŸ€¦β€β™‚οΈ

TLDR: I just made Resource immutable again and added back the isUsed method which is now checked only once in the ResourceObserver. The main beef you had with that method was that we were checking it everytime, right? Now we aren't. 😁

Signed-off-by: Alex Saveau <[email protected]>
Signed-off-by: Alex Saveau <[email protected]>
@SUPERCILEX SUPERCILEX requested a review from samtstern as a code owner March 25, 2018 05:21
@samtstern samtstern added this to the 3.3.0 milestone Mar 26, 2018
@samtstern
Copy link
Contributor

@SUPERCILEX this will be the final 3.3.0 PR after merge conflicts are resolved.

# Conflicts:
#	auth/src/main/java/com/firebase/ui/auth/viewmodel/ResourceObserver.java
@SUPERCILEX
Copy link
Collaborator Author

For sure, I just wanted to get these PRs into the wild. 😁

return;
}

onSaveOperation(resource);
Copy link
Contributor

@samtstern samtstern Mar 26, 2018

Choose a reason for hiding this comment

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

  1. Why is ResourceObserver not good for this situation?
  2. Having a usable Resource<Void> is kind of strange ... but maybe I should just get over it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That was you! πŸ˜† Nah, I think we weren't doing it because we didn't want to show a loading dialog, but now that I'm looking at the code, we do have a task running in the background so we should be showing one. πŸ€·β€β™‚οΈ, I'll use the ResourceObserver πŸ˜„.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Huh, the void thing is kinda ugly: it messed with our nullability annotations. Not sure how to fix it though without getting rid of the Resource for this altogether.

@samtstern
Copy link
Contributor

VoidResourceObserver is a good compromise for now. If we start using that all over the place we can reconsider.

@samtstern samtstern merged commit 3ee1155 into firebase:version-3.3.0-dev Mar 26, 2018
@SUPERCILEX SUPERCILEX deleted the rotate branch March 26, 2018 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants