Skip to content

Instantly share code, notes, and snippets.

@saurabharora90
Last active June 14, 2020 17:19
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 saurabharora90/846ac70042eb143d9ea772f0adaa24c4 to your computer and use it in GitHub Desktop.
Save saurabharora90/846ac70042eb143d9ea772f0adaa24c4 to your computer and use it in GitHub Desktop.
class CustomerCareInitializer @Inject constructor(
private val session: UserSession,
private val apiService: ApiService
) : ModuleInitializer {
override fun initialize(context: Context): Completable {
return apiService.execute( ... )
.flatMap {
Zendesk.init(...)
}
.ignoreElement()
.onErrorComplete()
}
}
class SubscriptionInitializer @Inject constructor() : ModuleInitializer {
override fun initialize(context: Context): Completable {
// perfom quick initialisation
return Completable.complete()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment