https://kotlinlang.org logo
#codereview
Title
# codereview
m

Mohamed Ibrahim

10/17/2019, 7:59 AM
What do you think about those ext function
fun <R> Observable<R>.checkInternetConnection(): Observable<R> {
return if (NetworkUtils.isConnected) this else Observable.error(NoInternetException)
}
r

reline

10/17/2019, 2:50 PM
Personally, I handle network exceptions on a case-by-case basis instead of attempting to determine internet connection status as a whole.
👍 1
b

bjonnh

10/23/2019, 5:35 PM
Or use a state machine that keeps the state and reacts to events. Also you are applying that to all observables?
👍 1
4 Views