Migrate more track DB calls to SQLDelight
This commit is contained in:
@@ -692,7 +692,7 @@ class MangaPresenter(
|
||||
.map { tracks ->
|
||||
val dbTracks = tracks.map { it.toDbTrack() }
|
||||
loggedServices.map { service ->
|
||||
TrackItem(dbTracks.find { it.sync_id == service.id }, service)
|
||||
TrackItem(dbTracks.find { it.sync_id.toLong() == service.id }, service)
|
||||
}
|
||||
}
|
||||
.collectLatest { trackItems ->
|
||||
|
||||
@@ -32,7 +32,7 @@ class SetTrackChaptersDialog<T> : DialogController
|
||||
@Suppress("unused")
|
||||
constructor(bundle: Bundle) : super(bundle) {
|
||||
val track = bundle.getSerializable(KEY_ITEM_TRACK) as Track
|
||||
val service = Injekt.get<TrackManager>().getService(track.sync_id)!!
|
||||
val service = Injekt.get<TrackManager>().getService(track.sync_id.toLong())!!
|
||||
item = TrackItem(track, service)
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ class SetTrackScoreDialog<T> : DialogController
|
||||
@Suppress("unused")
|
||||
constructor(bundle: Bundle) : super(bundle) {
|
||||
val track = bundle.getSerializable(KEY_ITEM_TRACK) as Track
|
||||
val service = Injekt.get<TrackManager>().getService(track.sync_id)!!
|
||||
val service = Injekt.get<TrackManager>().getService(track.sync_id.toLong())!!
|
||||
item = TrackItem(track, service)
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ class SetTrackStatusDialog<T> : DialogController
|
||||
@Suppress("unused")
|
||||
constructor(bundle: Bundle) : super(bundle) {
|
||||
val track = bundle.getSerializable(KEY_ITEM_TRACK) as Track
|
||||
val service = Injekt.get<TrackManager>().getService(track.sync_id)!!
|
||||
val service = Injekt.get<TrackManager>().getService(track.sync_id.toLong())!!
|
||||
item = TrackItem(track, service)
|
||||
}
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ class TrackSearchDialog : DialogController {
|
||||
|
||||
@Suppress("unused")
|
||||
constructor(bundle: Bundle) : super(bundle) {
|
||||
service = Injekt.get<TrackManager>().getService(bundle.getInt(KEY_SERVICE))!!
|
||||
service = Injekt.get<TrackManager>().getService(bundle.getLong(KEY_SERVICE))!!
|
||||
currentTrackUrl = bundle.getString(KEY_CURRENT_URL)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user