-
Notifications
You must be signed in to change notification settings - Fork 41
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
Material 3 #136
base: master
Are you sure you want to change the base?
Material 3 #136
Conversation
Thanks for the MR! Our team will review it and come back to you! |
@@ -152,7 +152,7 @@ class ShareActivity : BaseAppCompatActivity() { | |||
} | |||
|
|||
// Move cursor to the last character | |||
binding.prefixEditText.setSelection(binding.prefixEditText.text.count()) | |||
binding.prefixEditText.setSelection(binding.prefixEditText.text!!.count()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If prefixEditText is ever null this will cause a crash. Could you update it to avoid it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I have no idea why I made those changes in the first place. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, you added it because otherwise, it would cause a compilation error. Right now, reverting it makes the code fail to compile. The ideal approach would be to write it in a more null-safe way. For example, you could add a .orEmpty().
@@ -30,7 +30,7 @@ fun Context.toastUpToDate() = toastShortly("You are up to date") | |||
|
|||
fun Context.getVersionName(): String { | |||
val packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_ACTIVITIES) | |||
return packageInfo.versionName | |||
return packageInfo.versionName!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If versionName is ever null this will cause a crash. Could you update it to avoid it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed now :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
Note
This is not a redesign.
Closes #132