Created
June 23, 2018 13:16
-
-
Save MaximBazarov/f5934c915d038e907eb95e9687c6be09 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Action creator | |
func downloadProfile(state: ApplicationState) -> Action { | |
return Downloader.DownloadUserProfile( | |
baseURL: state.api.profile.baseURL | |
endpoint: state.api.profile.getProfile | |
profileID: state.profile.id | |
authToken: state.auth.token | |
retryCount: state.api.retryCount | |
) | |
} | |
// then our method is just | |
func profileScreenisAboutToAppear() { | |
core.dispatch(action: downloadProfile(state: state)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment