mirror of
https://github.com/mihonapp/mihon.git
synced 2025-02-22 15:04:14 +01:00
Compare commits
8 Commits
fcb01b5bcf
...
339dc33f58
Author | SHA1 | Date | |
---|---|---|---|
|
339dc33f58 | ||
|
223af5508f | ||
|
d42f776c5c | ||
|
5c0dc3e05a | ||
|
bebf80dfae | ||
|
86dd809f4d | ||
|
1ff88dd927 | ||
|
be5d467955 |
6
.github/workflows/build_pull_request.yml
vendored
6
.github/workflows/build_pull_request.yml
vendored
@ -23,19 +23,19 @@ jobs:
|
||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/actions/wrapper-validation@16bf8bc8fe830fa669c3c9f914d3eb147c629707 # v4.0.1
|
||||
uses: gradle/actions/wrapper-validation@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
|
||||
|
||||
- name: Dependency Review
|
||||
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
|
||||
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: adopt
|
||||
|
||||
- name: Set up gradle
|
||||
uses: gradle/actions/setup-gradle@16bf8bc8fe830fa669c3c9f914d3eb147c629707 # v4.0.1
|
||||
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
|
||||
|
||||
- name: Build app and run unit tests
|
||||
run: ./gradlew spotlessCheck assembleStandardRelease testReleaseUnitTest testStandardReleaseUnitTest
|
||||
|
6
.github/workflows/build_push.yml
vendored
6
.github/workflows/build_push.yml
vendored
@ -20,20 +20,20 @@ jobs:
|
||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||
|
||||
- name: Validate Gradle Wrapper
|
||||
uses: gradle/actions/wrapper-validation@16bf8bc8fe830fa669c3c9f914d3eb147c629707 # v4.0.1
|
||||
uses: gradle/actions/wrapper-validation@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
|
||||
|
||||
- name: Setup Android SDK
|
||||
run: |
|
||||
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "build-tools;29.0.3"
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
|
||||
uses: actions/setup-java@2dfa2011c5b2a0f1489bf9e433881c92c1631f88 # v4.3.0
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: adopt
|
||||
|
||||
- name: Set up gradle
|
||||
uses: gradle/actions/setup-gradle@16bf8bc8fe830fa669c3c9f914d3eb147c629707 # v4.0.1
|
||||
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0
|
||||
|
||||
- name: Build app and run unit tests
|
||||
run: ./gradlew spotlessCheck assembleStandardRelease testReleaseUnitTest testStandardReleaseUnitTest
|
||||
|
@ -107,7 +107,7 @@ class FetchInterval(
|
||||
interval.absoluteValue.takeIf { interval < 0 }
|
||||
?: increaseInterval(interval, timeSinceLatest, increaseWhenOver = 10),
|
||||
)
|
||||
return latestDate.plusDays((cycle + 1) * interval.toLong()).toEpochSecond(dateTime.offset) * 1000
|
||||
return latestDate.plusDays((cycle + 1) * interval.absoluteValue.toLong()).toEpochSecond(dateTime.offset) * 1000
|
||||
}
|
||||
|
||||
private fun increaseInterval(delta: Int, timeSinceLatest: Int, increaseWhenOver: Int): Int {
|
||||
|
@ -1,5 +1,5 @@
|
||||
[versions]
|
||||
compose-bom = "2024.09.00"
|
||||
compose-bom = "2024.09.01"
|
||||
accompanist = "0.36.0"
|
||||
|
||||
[libraries]
|
||||
|
@ -10,7 +10,7 @@ compose-compiler-gradle = { module = "org.jetbrains.kotlin:compose-compiler-grad
|
||||
|
||||
immutables = { module = "org.jetbrains.kotlinx:kotlinx-collections-immutable", version = "0.3.8" }
|
||||
|
||||
coroutines-bom = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-bom", version = "1.8.1" }
|
||||
coroutines-bom = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-bom", version = "1.9.0" }
|
||||
coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core" }
|
||||
coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android" }
|
||||
coroutines-guava = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-guava" }
|
||||
|
@ -10,7 +10,7 @@ sqlite = "2.4.0"
|
||||
voyager = "1.0.0"
|
||||
spotless = "6.25.0"
|
||||
ktlint-core = "1.3.1"
|
||||
firebase-bom = "33.2.0"
|
||||
firebase-bom = "33.3.0"
|
||||
|
||||
[libraries]
|
||||
desugar = "com.android.tools:desugar_jdk_libs:2.1.2"
|
||||
@ -22,7 +22,7 @@ okhttp-core = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp_ve
|
||||
okhttp-logging = { module = "com.squareup.okhttp3:logging-interceptor", version.ref = "okhttp_version" }
|
||||
okhttp-brotli = { module = "com.squareup.okhttp3:okhttp-brotli", version.ref = "okhttp_version" }
|
||||
okhttp-dnsoverhttps = { module = "com.squareup.okhttp3:okhttp-dnsoverhttps", version.ref = "okhttp_version" }
|
||||
okio = "com.squareup.okio:okio:3.9.0"
|
||||
okio = "com.squareup.okio:okio:3.9.1"
|
||||
|
||||
conscrypt-android = "org.conscrypt:conscrypt-android:2.5.3"
|
||||
|
||||
|
@ -149,23 +149,25 @@ private fun <T> WheelPicker(
|
||||
}
|
||||
|
||||
val scope = rememberCoroutineScope()
|
||||
val processManualInput: () -> Unit = {
|
||||
scope.launch {
|
||||
items
|
||||
.indexOfFirst { it.toString() == value.text }
|
||||
.takeIf { it >= 0 }
|
||||
?.apply {
|
||||
internalOnSelectionChanged(this)
|
||||
lazyListState.scrollToItem(this)
|
||||
}
|
||||
showManualInput = false
|
||||
}
|
||||
}
|
||||
|
||||
BasicTextField(
|
||||
modifier = Modifier
|
||||
.align(Alignment.Center)
|
||||
.showSoftKeyboard(true)
|
||||
.clearFocusOnSoftKeyboardHide {
|
||||
scope.launch {
|
||||
items
|
||||
.indexOfFirst { it.toString() == value.text }
|
||||
.takeIf { it >= 0 }
|
||||
?.apply {
|
||||
internalOnSelectionChanged(this)
|
||||
lazyListState.scrollToItem(this)
|
||||
}
|
||||
|
||||
showManualInput = false
|
||||
}
|
||||
},
|
||||
.clearFocusOnSoftKeyboardHide(processManualInput),
|
||||
onKeyboardAction = { processManualInput() },
|
||||
state = value,
|
||||
lineLimits = TextFieldLineLimits.SingleLine,
|
||||
keyboardOptions = KeyboardOptions(
|
||||
|
Loading…
x
Reference in New Issue
Block a user