Skip to content

Instantly share code, notes, and snippets.

@ElonPark
Last active August 16, 2021 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ElonPark/c81f13c8dff59829ddd5a1ddcecc1e4d to your computer and use it in GitHub Desktop.
Save ElonPark/c81f13c8dff59829ddd5a1ddcecc1e4d to your computer and use it in GitHub Desktop.
UserListInteractor
// MARK: - UserListInteractor
final class UserListInteractor:
PresentableInteractor<UserListPresentable>,
UserListInteractable,
UserListPresentableListener,
Reactor
{
// MARK: - Reactor
typealias Action = UserListPresentableAction
typealias State = UserListPresentableState
enum Mutation {
case setLoading(Bool)
case setRefresh(Bool)
case userListSections([UserListSectionModel])
case attachUserInformationRIB
}
// MARK: - Properties
weak var router: UserListRouting?
weak var listener: UserListListener?
let initialState: UserListPresentableState
init(
initialState: UserListPresentableState,
presenter: UserListPresentable
) {
self.initialState = initialState
super.init(presenter: presenter)
presenter.listener = self
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment