Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private fun <T> Observable<T>.subscribe(onNext:(T)-> Unit = {}, context: KFunction<out Unit>? = null) {
- this.subscribe({}, { ErrorController().onError("[ ${context?.name} ]",it) })
- }
- //exemple
- private fun onReceiveShareAction(userId: String) {
- messenger.sendShareMessage(Recipient(userId)).subscribe(context = ::onReceiveShareAction)
- }
Add Comment
Please, Sign In to add comment