Closed yashraj-01 closed 3 years ago
The current null checks in Network.kt can be refactored to more kotlin style.
The following lines of code can be refactored to kotlin style:
return info != null && info.isConnected
return info != null && info.isConnected && info.type == ConnectivityManager.TYPE_WIFI
return info != null && info.isConnected && info.type == ConnectivityManager.TYPE_MOBILE
return info != null && info.isConnected && Network.isConnectionFast(info.type, info.subtype)
I would like to work on this issue. Please assign this to me.
Summary
The current null checks in Network.kt can be refactored to more kotlin style.
The following lines of code can be refactored to kotlin style:
return info != null && info.isConnected
return info != null && info.isConnected && info.type == ConnectivityManager.TYPE_WIFI
return info != null && info.isConnected && info.type == ConnectivityManager.TYPE_MOBILE
return info != null && info.isConnected && Network.isConnectionFast(info.type, info.subtype)