Migrate database logic to Kotlin
Room has been convereted into a KMP library in the latest stable releases and annotation processing requires KSP which only generates kotlin classes Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
parent
f3ca5f659d
commit
4422b55ab4
61 changed files with 1676 additions and 1953 deletions
|
|
@ -315,7 +315,7 @@ class MediaBrowserImpl(
|
|||
}
|
||||
|
||||
private fun populateHistory(): Single<List<MediaBrowserCompat.MediaItem>> {
|
||||
val history = database.streamHistoryDAO().getHistory().firstOrError()
|
||||
val history = database.streamHistoryDAO().history.firstOrError()
|
||||
return history.map { items ->
|
||||
items.map { this.createHistoryMediaItem(it) }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ class MediaBrowserPlaybackPreparer(
|
|||
}
|
||||
|
||||
val streamId = path[0].toLong()
|
||||
return database.streamHistoryDAO().getHistory()
|
||||
return database.streamHistoryDAO().history
|
||||
.firstOrError()
|
||||
.map { items ->
|
||||
val infoItems = items
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue