openMF / mifos-mobile-cn

Client-facing app on top of Apache Fineract CN
https://openmf.github.io/mobileapps.github.io/
Apache License 2.0
38 stars 64 forks source link

refactor: convert null check to kotlin style #198

Closed yashraj-01 closed 3 years ago

yashraj-01 commented 3 years ago

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:

  1. return info != null && info.isConnected
  2. return info != null && info.isConnected && info.type == ConnectivityManager.TYPE_WIFI
  3. return info != null && info.isConnected && info.type == ConnectivityManager.TYPE_MOBILE
  4. return info != null && info.isConnected && Network.isConnectionFast(info.type, info.subtype)
Sparsh1212 commented 3 years ago

I would like to work on this issue. Please assign this to me.