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

Adding 'when' to substitute if #56

Merged
merged 3 commits into from Mar 30, 2020

Conversation

sierisimo
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Documentation Update

Description

Related Tickets & Documents

Discussion on hungarian notation: https://stackoverflow.com/questions/111933/why-shouldnt-i-use-hungarian-notation\#112080
Kotlin puzzlers on if-elseif-else -> https://github.com/angryziber/kotlin-puzzlers/blob/master/src/syntax/weirdChaining/WeirdChaining.kts

[optional] What gif best describes this PR or how it makes you feel?

This is 2019!

ALSO:

* Removed the 'm' from 'mFilePathCallback'. The hungarian notation is not recommended anywhere, only on the AOSP but not for kotlin files. Here's a good discussion about it: https://stackoverflow.com/questions/111933/why-shouldnt-i-use-hungarian-notation\#112080
Copy link
Contributor

@VarunBarad VarunBarad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks good but it would be better to keep the call to startActivityForResult verbose as it was.

The ActivityCompat is a helper class to validate versions of the SDK and remove that code from the developer side. It's not needed in this case as the minSDK and the targetSDK are pointing to highe values than 16. The method startActivityForResult on this helper class checks for SDK >= 16.
@maestromac maestromac merged commit a3941fb into forem:master Mar 30, 2020
@sierisimo sierisimo deleted the add_idiomatic_code branch March 30, 2020 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants