-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Convert ReaderPostPagerActivity to Kotlin #21822
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
Convert ReaderPostPagerActivity to Kotlin #21822
Conversation
Generated by 🚫 Danger |
…-Android into issue/CMM-288-kotlin-reader-post-pager-activity Conflicts: WordPress/src/main/java/org/wordpress/android/ui/reader/ReaderPostPagerActivity.java
|
App Name | ![]() |
|
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr21822-1f0f899 | |
Commit | 1f0f899 | |
Direct Download | jetpack-prototype-build-pr21822-1f0f899.apk |
|
App Name | ![]() |
|
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr21822-1f0f899 | |
Commit | 1f0f899 | |
Direct Download | wordpress-prototype-build-pr21822-1f0f899.apk |
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.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
viewPager = findViewById(R.id.viewpager) | ||
progressBar = findViewById(R.id.progress_loading) |
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.
❓ No need to take any action, but is there any reason why we are not using ViewBindings here?
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.
That class was created in 2014, before ViewBindings existed, but I'm not sure why it wasn't converted later.
blogIdentifier: String?, | ||
postIdentifier: String? | ||
) { | ||
if (!TextUtils.isEmpty(blogIdentifier) && !TextUtils.isEmpty(postIdentifier)) { |
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 (!TextUtils.isEmpty(blogIdentifier) && !TextUtils.isEmpty(postIdentifier)) { | |
if (!blogIdentifier.isNullOrEmpty() && !postIdentifier.isNullOrEmpty()) { |
Just a nitpick to avoid using Java methods
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.
Good call! I made that change in 1f0f899
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.
|
Fixes CMM-288
This PR converts
ReaderPostPagerActivity
to Kotlin. No new functionality has been added, but I've resolved all deprecation warnings apart from thePostPagerAdapter
. That adapter and related view pager should be updated toViewPager2
, but that change will require a separate PR.To test, simply use the Reader and verify that it still works as expected.