-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Convert a bunch of files to kotlin #13026
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
base: dev
Are you sure you want to change the base?
Conversation
6f8a301 to
2e3cffa
Compare
d7d02f7 to
a549118
Compare
|
No need to convert View related files to Kotlin as they will be deleted later with compose migration. |
theimpulson
left a comment
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.
General feedback that seems to apply to the most of the converted code.
| val result: MutableList<PeertubeInstance> = ArrayList() | ||
| for (instance in array) { | ||
| if (instance is JsonObject) { | ||
| val name = instance.getString("name") | ||
| val url = instance.getString("url") | ||
| result.add(PeertubeInstance(url, name)) | ||
| } | ||
| } | ||
| return result |
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.
You can probably use .map here to simplify the logic
| } | ||
|
|
||
| @JvmStatic | ||
| fun getTranslatedFilterString(filter: String, c: Context): String { |
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.
Please rename the parameter to be of a more accurate name like context
|
|
||
| try { | ||
| return NewPipe.getService(serviceName) | ||
| } catch (e: ExtractionException) { |
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.
Rename unused caught exceptions to _
|
I suggest marking the PR as draft when it is still WIP. Once ready for review, please avoid doing changes unless asked or required to fix or improve existing code in the PR. |
|
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.
What about this? As stated in commit it also deletes unnecessary code left after another PR. Should I delete this commit from PR (and create separate pr for this) as other view related commits or no?
Seems fair. Might as well convert to Compose in the same PR if you are comfortable with it. |
It would target another branch then |
a549118 to
301d391
Compare
`onSaveInstanceState` is useless after TeamNewPipe#12995
301d391 to
906592b
Compare
What is it?
Description of the changes in your PR
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.
Due diligence