Remove dependency injection from core module and data module from presentation-widget module

Includes side effects:
- No longer need to restart app for user agent string change to take effect
- parseAs extension function requires a Json instance in the calling context, which doesn't necessarily need to be the default one provided by Injekt

(cherry picked from commit 93523ef50b80ef294866bfb0da54e236cdf2d9f6)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt
#	app/src/main/java/eu/kanade/tachiyomi/extension/api/ExtensionGithubApi.kt
#	core/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt
#	core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt
#	domain/build.gradle.kts
#	source-api/build.gradle.kts
This commit is contained in:
arkon
2023-02-20 19:02:38 -05:00
committed by Jobobby04
parent 2e1c83442e
commit 6563490513
42 changed files with 864 additions and 657 deletions
@@ -8,9 +8,19 @@ import tachiyomi.domain.updates.model.UpdatesWithRelations
import tachiyomi.domain.updates.repository.UpdatesRepository
class UpdatesRepositoryImpl(
val databaseHandler: DatabaseHandler,
private val databaseHandler: DatabaseHandler,
) : UpdatesRepository {
override suspend fun awaitWithRead(read: Boolean, after: Long): List<UpdatesWithRelations> {
return databaseHandler.awaitList {
updatesViewQueries.getUpdatesByReadStatus(
read = read,
after = after,
mapper = updateWithRelationMapper,
)
}
}
override fun subscribeAll(after: Long): Flow<List<UpdatesWithRelations>> {
return databaseHandler.subscribeToList {
updatesViewQueries.updates(after, updateWithRelationMapper)
@@ -19,4 +29,14 @@ class UpdatesRepositoryImpl(
.map(updatesViewMapper)
}
}
override fun subscribeWithRead(read: Boolean, after: Long): Flow<List<UpdatesWithRelations>> {
return databaseHandler.subscribeToList {
updatesViewQueries.getUpdatesByReadStatus(
read = read,
after = after,
mapper = updateWithRelationMapper,
)
}
}
}