Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: convert null check to kotlin style #198

Closed
yashraj-01 opened this issue Dec 9, 2020 · 1 comment · Fixed by #201
Closed

refactor: convert null check to kotlin style #198

yashraj-01 opened this issue Dec 9, 2020 · 1 comment · Fixed by #201

Comments

@yashraj-01
Copy link

yashraj-01 commented Dec 9, 2020

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
Copy link
Contributor

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

Sparsh1212 added a commit to Sparsh1212/mifos-mobile-cn that referenced this issue Dec 9, 2020
garvit984 added a commit that referenced this issue Dec 9, 2020
refactor #198: convert null checks in Network.kt to kotlin style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants