Skip to content

Commit

Permalink
chore: Bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
arkon authored and Claudemirovsky committed Dec 17, 2023
1 parent 1f7ae8e commit e92943a
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/dependency-review-action@v3

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: gradle/wrapper-validation-action@v1

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.unit.dp
import androidx.compose.ui.util.fastForEach
import androidx.lifecycle.asFlow
import androidx.work.WorkInfo
import androidx.work.WorkQuery
import cafe.adriel.voyager.core.model.ScreenModel
import cafe.adriel.voyager.core.model.rememberScreenModel
import cafe.adriel.voyager.navigator.LocalNavigator
import cafe.adriel.voyager.navigator.currentOrThrow
import eu.kanade.domain.ui.UiPreferences
import eu.kanade.presentation.components.AppBar
import eu.kanade.presentation.components.AppBarActions
import eu.kanade.presentation.util.Screen
import eu.kanade.presentation.util.ioCoroutineScope
import eu.kanade.tachiyomi.util.lang.toDateTimestampString
import eu.kanade.tachiyomi.util.system.copyToClipboard
import eu.kanade.tachiyomi.util.system.workManager
import kotlinx.collections.immutable.persistentListOf
Expand All @@ -39,6 +40,9 @@ import tachiyomi.i18n.MR
import tachiyomi.presentation.core.components.material.Scaffold
import tachiyomi.presentation.core.i18n.stringResource
import tachiyomi.presentation.core.util.plus
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.util.Date

class WorkerInfoScreen : Screen() {

Expand Down Expand Up @@ -119,26 +123,19 @@ class WorkerInfoScreen : Screen() {
private val workManager = context.workManager

val finished = workManager
.getWorkInfosLiveData(
WorkQuery.fromStates(
WorkInfo.State.SUCCEEDED,
WorkInfo.State.FAILED,
WorkInfo.State.CANCELLED,
),
.getWorkInfosFlow(
WorkQuery.fromStates(WorkInfo.State.SUCCEEDED, WorkInfo.State.FAILED, WorkInfo.State.CANCELLED),
)
.asFlow()
.map(::constructString)
.stateIn(ioCoroutineScope, SharingStarted.WhileSubscribed(), "")

val running = workManager
.getWorkInfosLiveData(WorkQuery.fromStates(WorkInfo.State.RUNNING))
.asFlow()
.getWorkInfosFlow(WorkQuery.fromStates(WorkInfo.State.RUNNING))
.map(::constructString)
.stateIn(ioCoroutineScope, SharingStarted.WhileSubscribed(), "")

val enqueued = workManager
.getWorkInfosLiveData(WorkQuery.fromStates(WorkInfo.State.ENQUEUED))
.asFlow()
.getWorkInfosFlow(WorkQuery.fromStates(WorkInfo.State.ENQUEUED))
.map(::constructString)
.stateIn(ioCoroutineScope, SharingStarted.WhileSubscribed(), "")

Expand All @@ -153,6 +150,16 @@ class WorkerInfoScreen : Screen() {
appendLine(" - $it")
}
appendLine("State: ${workInfo.state}")
if (workInfo.state == WorkInfo.State.ENQUEUED) {
appendLine(
"Next scheduled run: ${Date(workInfo.nextScheduleTimeMillis).toDateTimestampString(
UiPreferences.dateFormat(
Injekt.get<UiPreferences>().dateFormat().get(),
),
)}",
)
appendLine("Attempt #${workInfo.runAttemptCount + 1}")
}
appendLine()
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/androidx.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", version.ref
lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "lifecycle_version" }
lifecycle-runtimektx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycle_version" }

workmanager = "androidx.work:work-runtime-ktx:2.8.1"
workmanager = "androidx.work:work-runtime:2.9.0"

paging-runtime = { module = "androidx.paging:paging-runtime", version.ref = "paging_version" }
paging-compose = { module = "androidx.paging:paging-compose", version.ref = "paging_version" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/compose.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
compiler = "1.5.4"
compiler = "1.5.5"
compose-bom = "2023.12.00-alpha02"
accompanist = "0.33.2-alpha"

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ conscrypt-android = "org.conscrypt:conscrypt-android:2.5.2"

quickjs-android = "app.cash.quickjs:quickjs-android:0.9.2"

jsoup = "org.jsoup:jsoup:1.16.2"
jsoup = "org.jsoup:jsoup:1.17.1"

disklrucache = "com.jakewharton:disklrucache:2.0.2"
unifile = "com.github.tachiyomiorg:unifile:7c257e1c64"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit e92943a

Please sign in to comment.