-
Notifications
You must be signed in to change notification settings - Fork 120
StoresManager: API Improvements #114
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
Conversation
…nager-improvements
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.
Love this! Thank you for splitting out the authenticator and de-authenticator into separate files and separating them from the StoresManagerState protocol.
All unit tests ✅
2 nitpick-y items, 2 general comments, then ![]()
|
|
||
|
|
||
| /// Designated Initializer | ||
| /// |
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.
Delete repeated method documentation 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.
Thanks for catching that!!
| /// | ||
| private init() { } | ||
| var isAuthenticated: Bool { | ||
| return state is AuthenticatedState |
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 I just reviewed this concept last week! is is the Swift way of checking type. It's much more elegant than saying[thisThing isKindOfClass: [MyThing class]]
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.
Exactly, it's the same thing!
| /// Shared Instance | ||
| /// | ||
| private static var state: StoresManagerState = initialState() { | ||
| static var shared = StoresManager(keychain: .shared) |
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 spy the first Singleton in our app
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.
Yeah... it was either this, or AppDelegate.shared.storesManager!!! =(
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'm not against Singletons :)
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.
Ohhhh but i am!! 😄
| private var manager: StoresManager! | ||
|
|
||
|
|
||
| // MARK: - Overriden Methods |
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.
Overridden instead of Overriden
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 heads up!!
|
@mindgraffiti ready for another peek! thanks in advance!! |
mindgraffiti
left a comment
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.
sir!
|
Thank you Thuy!! |
Details:
StoresManagerStoresManagerStateProtocol APICloses #93
Testing:
Please verify that the new (and shiny!) unit tests look green!