fix Factory

This commit is contained in:
Cuong-Tran 2024-10-25 09:39:40 +07:00
parent 9c65d5adf2
commit 555bc597ce
No known key found for this signature in database
GPG Key ID: 733AA7624B9315C2

View File

@ -27,6 +27,7 @@ import java.time.ZoneOffset
class AddTracks( class AddTracks(
private val insertTrack: InsertTrack, private val insertTrack: InsertTrack,
private val refreshTracks: RefreshTracks,
private val getChaptersByMangaId: GetChaptersByMangaId, private val getChaptersByMangaId: GetChaptersByMangaId,
private val trackerManager: TrackerManager, private val trackerManager: TrackerManager,
) { ) {
@ -76,9 +77,7 @@ class AddTracks(
} }
} }
val refreshTracks = Injekt.get<RefreshTracks>()
val context = Injekt.get<Application>() val context = Injekt.get<Application>()
refreshTracks.await(mangaId) refreshTracks.await(mangaId)
.filter { it.first != null } .filter { it.first != null }
.forEach { (track, e) -> .forEach { (track, e) ->
@ -118,9 +117,7 @@ class AddTracks(
} }
} }
val refreshTracks = Injekt.get<RefreshTracks>()
val context = Injekt.get<Application>() val context = Injekt.get<Application>()
refreshTracks.await(manga.id) refreshTracks.await(manga.id)
.filter { it.first != null } .filter { it.first != null }
.forEach { (track, e) -> .forEach { (track, e) ->