Update dependencies

This commit is contained in:
Syer10
2023-02-12 17:34:34 -05:00
parent 5477cfc06c
commit 372088c005
12 changed files with 30 additions and 20 deletions

View File

@@ -68,7 +68,7 @@ class UpdateCheckWorker(private val context: Context, workerParams: WorkerParame
.setConstraints(constraints)
.build()
WorkManager.getInstance(context).enqueueUniquePeriodicWork(TAG, ExistingPeriodicWorkPolicy.REPLACE, request)
WorkManager.getInstance(context).enqueueUniquePeriodicWork(TAG, ExistingPeriodicWorkPolicy.UPDATE, request)
}
fun cancelTask(context: Context) {

View File

@@ -25,12 +25,12 @@ materialDialogs = "0.9.1"
# Android
androidGradle = "7.4.1"
core = "1.9.0"
appCompat = "1.7.0-alpha01"
appCompat = "1.7.0-alpha02"
activityCompose = "1.6.1"
work = "2.7.1"
work = "2.8.0"
# Android Lifecycle
lifecycle = "2.6.0-alpha05"
lifecycle = "2.6.0-beta01"
# Swing
darklaf = "3.0.2"
@@ -39,11 +39,11 @@ darklaf = "3.0.2"
ksp = "1.8.0-1.0.9"
# Dependency Injection
kotlinInject = "0.5.1"
kotlinInject = "0.6.1"
# Network
ktor = "2.2.3"
ktorfit = "1.0.0-beta17"
ktorfit = "1.0.0-beta18"
# Logging
slf4j = "2.0.6"
@@ -58,7 +58,7 @@ appDirs = "1.2.1"
multiplatformSettings = "1.0.0-alpha01"
# Utility
desugarJdkLibs = "1.2.2"
desugarJdkLibs = "2.0.2"
aboutLibraries = "10.5.2"
dateTime = "0.4.0"
immutableCollections = "0.3.5"

View File

@@ -27,6 +27,7 @@ import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.launch
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject
import org.lighthousegames.logging.logging
@@ -39,7 +40,7 @@ class DownloadsScreenViewModel @Inject constructor(
private val stopChapterDownload: StopChapterDownload,
private val reorderChapterDownload: ReorderChapterDownload,
private val contextWrapper: ContextWrapper,
standalone: Boolean
@Assisted standalone: Boolean
) : ViewModel(contextWrapper) {
private val uiScope = if (standalone) {
MainScope()

View File

@@ -48,6 +48,7 @@ import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.flow.toList
import kotlinx.coroutines.launch
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject
import org.lighthousegames.logging.logging
@@ -95,7 +96,7 @@ class LibraryScreenViewModel @Inject constructor(
private val updateCategory: UpdateCategory,
libraryPreferences: LibraryPreferences,
contextWrapper: ContextWrapper,
private val savedStateHandle: SavedStateHandle
@Assisted private val savedStateHandle: SavedStateHandle
) : ViewModel(contextWrapper) {
private val library = Library(MutableStateFlow(persistentListOf()), mutableMapOf())
val categories = library.categories.asStateFlow()

View File

@@ -14,13 +14,14 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.cancel
import kotlinx.coroutines.flow.asStateFlow
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject
import org.lighthousegames.logging.logging
class LibraryUpdatesViewModel @Inject constructor(
private val libraryUpdateService: LibraryUpdateService,
private val contextWrapper: ContextWrapper,
standalone: Boolean
@Assisted standalone: Boolean
) : ViewModel(contextWrapper) {
private val uiScope = if (standalone) {
MainScope()

View File

@@ -52,6 +52,7 @@ import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.onStart
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.launch
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject
import org.lighthousegames.logging.logging
@@ -75,7 +76,7 @@ class MangaScreenViewModel @Inject constructor(
private val batchChapterDownload: BatchChapterDownload,
uiPreferences: UiPreferences,
contextWrapper: ContextWrapper,
private val params: Params
@Assisted private val params: Params
) : ViewModel(contextWrapper) {
private val _manga = MutableStateFlow<Manga?>(null)
val manga = _manga.asStateFlow()

View File

@@ -65,6 +65,7 @@ import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.flow.take
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject
import org.lighthousegames.logging.logging
@@ -80,7 +81,7 @@ class ReaderMenuViewModel @Inject constructor(
private val updateChapterMeta: UpdateChapterMeta,
private val chapterCache: ChapterCache,
contextWrapper: ContextWrapper,
private val params: Params
@Assisted private val params: Params
) : ViewModel(contextWrapper) {
override val scope = MainScope()
private val _manga = MutableStateFlow<Manga?>(null)

View File

@@ -27,6 +27,7 @@ import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.stateIn
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject
import org.lighthousegames.logging.logging
@@ -51,8 +52,8 @@ class SourceScreenViewModel(
libraryPreferences: LibraryPreferences,
getSourcePager: (suspend (page: Int) -> MangaPage?) -> SourcePager,
contextWrapper: ContextWrapper,
savedStateHandle: SavedStateHandle,
params: Params
@Assisted savedStateHandle: SavedStateHandle,
@Assisted params: Params
) : this(
params.source,
getLatestManga,

View File

@@ -26,6 +26,7 @@ import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.mapLatest
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.supervisorScope
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject
import org.lighthousegames.logging.logging
@@ -40,8 +41,8 @@ class SourceFiltersViewModel(
getFilterList: GetFilterList,
setSourceFilter: SetSourceFilter,
contextWrapper: ContextWrapper,
savedStateHandle: SavedStateHandle,
params: Params
@Assisted savedStateHandle: SavedStateHandle,
@Assisted params: Params
) : this(
params.sourceId,
getFilterList,

View File

@@ -39,6 +39,7 @@ import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.supervisorScope
import kotlinx.coroutines.sync.Semaphore
import kotlinx.coroutines.sync.withPermit
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject
import org.lighthousegames.logging.logging
@@ -47,8 +48,8 @@ class GlobalSearchViewModel @Inject constructor(
private val getSearchManga: GetSearchManga,
catalogPreferences: CatalogPreferences,
contextWrapper: ContextWrapper,
private val savedStateHandle: SavedStateHandle,
params: Params
@Assisted private val savedStateHandle: SavedStateHandle,
@Assisted params: Params
) : ViewModel(contextWrapper) {
private val _query by savedStateHandle.getStateFlow { params.initialQuery }
val query = _query.asStateFlow()

View File

@@ -30,6 +30,7 @@ import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.flow.stateIn
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject
import org.lighthousegames.logging.logging
@@ -37,7 +38,7 @@ class SourceHomeScreenViewModel @Inject constructor(
private val getSourceList: GetSourceList,
catalogPreferences: CatalogPreferences,
contextWrapper: ContextWrapper,
private val savedStateHandle: SavedStateHandle
@Assisted private val savedStateHandle: SavedStateHandle
) : ViewModel(contextWrapper) {
private val _isLoading = MutableStateFlow(true)
val isLoading = _isLoading.asStateFlow()

View File

@@ -24,6 +24,7 @@ import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.mapLatest
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.supervisorScope
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject
import org.lighthousegames.logging.logging
@@ -31,7 +32,7 @@ class SourceSettingsScreenViewModel @Inject constructor(
private val getSourceSettings: GetSourceSettings,
private val setSourceSetting: SetSourceSetting,
contextWrapper: ContextWrapper,
private val params: Params
@Assisted private val params: Params
) : ViewModel(contextWrapper) {
private val _loading = MutableStateFlow(true)
val loading = _loading.asStateFlow()