Convert newpipe/local/playlist/RemotePlaylistManager to kotlin#12976
Conversation
|
HI @dustdfg, could you please squash all your multiple Kotlin conversion PRs into a single one but with separate commits? They are all on the same topic and will make it easier for review and changes. |
|
Also, please add an SPDX copyright and license header to each new kotlin file conversion you are doing. Please see the database directory files for an example. |
| ): Completable { | ||
| return Completable.fromRunnable { | ||
| database.runInTransaction { | ||
| for (uid in deletedItems) { |
There was a problem hiding this comment.
Why not use forEach here and everywhere for loops?
|
|
||
| fun onUpdate(playlistId: Long, playlistInfo: PlaylistInfo): Single<Int> { | ||
| return Single.fromCallable { | ||
| val playlist = PlaylistRemoteEntity(playlistInfo) |
There was a problem hiding this comment.
You can probably use the .copy method here to modify the uid.
Ok. I think it is almost "antipatern" though because it is harder to merge one PR and etc... |
What is it?
Description of the changes in your PR
Converted
newpipe/local/playlist/RemotePlaylistManagerto kotlinTracking down that issue with playlists required me to understand this file so I am sure it is a trivial conversion. I tested it and everything works except I didn't test
onUpdatebecause that is the only part I don't understand when calledAPK 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