Skip to content

Conversation

@dustdfg
Copy link
Contributor

@dustdfg dustdfg commented Jan 9, 2026

What is it?

  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

  • Convert a bunch of files to kotlin

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

@github-actions github-actions bot added the size/giant PRs with more than 750 changed lines label Jan 9, 2026
@dustdfg dustdfg force-pushed the kotlin_merged2 branch 2 times, most recently from 6f8a301 to 2e3cffa Compare January 9, 2026 18:13
@dustdfg dustdfg force-pushed the kotlin_merged2 branch 2 times, most recently from d7d02f7 to a549118 Compare January 9, 2026 22:15
@theimpulson
Copy link
Member

No need to convert View related files to Kotlin as they will be deleted later with compose migration.

Copy link
Member

@theimpulson theimpulson left a 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.

Comment on lines 31 to 39
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
Copy link
Member

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 {
Copy link
Member

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) {
Copy link
Member

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 _

@theimpulson
Copy link
Member

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.

@dustdfg
Copy link
Contributor Author

dustdfg commented Jan 11, 2026

No need to convert View related files to Kotlin as they will be deleted later with compose migration.

  1. As a user I was waiting for refactor to come for so long time that I don't believe in it...
  2. Kotlin is better
  3. +/-Ok

Copy link
Contributor Author

@dustdfg dustdfg Jan 11, 2026

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?

@HatakeKakashri
Copy link
Contributor

No need to convert View related files to Kotlin as they will be deleted later with compose migration.

  1. As a user I was waiting for refactor to come for so long time that I don't believe in it...

Seems fair. Might as well convert to Compose in the same PR if you are comfortable with it.

@dustdfg
Copy link
Contributor Author

dustdfg commented Jan 11, 2026

No need to convert View related files to Kotlin as they will be deleted later with compose migration.

  1. As a user I was waiting for refactor to come for so long time that I don't believe in it...

Seems fair. Might as well convert to Compose in the same PR if you are comfortable with it.

It would target another branch then

@theimpulson theimpulson removed their request for review January 11, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/giant PRs with more than 750 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants