Skip to content

Commit 73354da

Browse files
authored
Show the delete (minus) icon for all deletable line items (#118)
1 parent 60eff6d commit 73354da

File tree

12 files changed

+62
-41
lines changed

12 files changed

+62
-41
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
55
### Added
66
### Changed
77
* ui: Show bin icon instead of minus if the quantity of the line item is 1
8+
* ui: Show the trash (minus) icon for all deletable line items
89

910
### Removed
1011
### Fixed

build.gradle.kts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,20 +117,13 @@ versionCatalogUpdate {
117117

118118
fun isNonStable(version: String): Boolean {
119119
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) }
120-
val isNotStable = listOf("ALPHA", "BETA", "RC", "DEV").any { version.toUpperCase().contains(it) }
121120
val regex = "^[0-9,.v-]+(-r)?$".toRegex()
122121
val isStable = stableKeyword || regex.matches(version)
123-
return isStable.not() && isNotStable
122+
return isStable.not()
124123
}
125124

126125
tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask> {
127-
resolutionStrategy {
128-
componentSelection {
129-
all {
130-
if (isNonStable(candidate.version) && !isNonStable(currentVersion)) {
131-
reject("Release candidate")
132-
}
133-
}
134-
}
126+
rejectVersionIf {
127+
isNonStable(candidate.version)
135128
}
136129
}

core/src/main/java/io/snabble/sdk/Snabble.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ object Snabble {
468468
val snabbleError = arrayOfNulls<Error>(1)
469469
setup(app, config)
470470
val observer = object : Observer<InitializationState> {
471-
override fun onChanged(t: InitializationState?) {
471+
override fun onChanged(t: InitializationState) {
472472
if (t == InitializationState.INITIALIZED || t == InitializationState.ERROR) {
473473
countDownLatch.countDown()
474474
initializationState.removeObserver(this)

gradle/libs.versions.toml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ gradlePlugin = "7.4.2"
66
desugarVersion = "1.1.5"
77
okhttpVersion = "4.10.0"
88
# @pin always, manually updated to ensure overall dependency support
9-
kotlin = "1.8.0"
9+
kotlin = "1.8.10"
1010
# @pin always, manually updated to ensure overall dependency support
11-
compose-compiler = "1.4.1"
11+
compose-compiler = "1.4.3"
1212
navigation = "2.5.3"
13-
# @#pin
13+
# @pin
1414
compose_version = "1.2.1"
1515
snabbleSdk = "0.69.6"
1616
androidx-camera = "1.2.1"
1717
androidx-compose-ui = "1.3.3"
1818
com-squareup-okhttp3 = "4.10.0"
1919
io-kotest = "5.5.5"
20-
org-jetbrains-dokka = "1.7.20"
20+
org-jetbrains-dokka = "1.8.10"
2121

2222
[libraries]
2323
airbnb-lottie = "com.airbnb.android:lottie:6.0.0"
@@ -34,22 +34,22 @@ androidx-core-ktx = "androidx.core:core-ktx:1.9.0"
3434
androidx-constraintlayout = "androidx.constraintlayout:constraintlayout:2.1.4"
3535
androidx-constraintlayoutCompose = "androidx.constraintlayout:constraintlayout-compose:1.0.1"
3636
# Compose previews won't work w/o this: https://issuetracker.google.com/issues/227767363
37-
androidx-customview = "androidx.customview:customview:1.2.0-alpha02"
37+
androidx-customview = "androidx.customview:customview:1.1.0"
3838
androidx-customview-poolingcontainer = "androidx.customview:customview-poolingcontainer:1.0.0"
3939
androidx-gridlayout = "androidx.gridlayout:gridlayout:1.0.0"
40-
androidx-lifecycle-common = "androidx.lifecycle:lifecycle-common:2.6.0-alpha02"
40+
androidx-lifecycle-common = "androidx.lifecycle:lifecycle-common:2.6.0"
4141
androidx-lifecycleExtension = "androidx.lifecycle:lifecycle-extensions:2.2.0"
42-
androidx-lifecycleLiveData = "androidx.lifecycle:lifecycle-livedata-ktx:2.5.1"
43-
androidx-lifecycle-process = "androidx.lifecycle:lifecycle-process:2.5.1"
44-
androidx-lifecycleRuntimeKtx = "androidx.lifecycle:lifecycle-runtime-ktx:2.6.0-alpha02"
45-
androidx-lifecycleRuntimeCompose = "androidx.lifecycle:lifecycle-runtime-compose:2.6.0-rc01"
46-
androidx-lifecycleViewmodelCompose = "androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1"
42+
androidx-lifecycleLiveData = "androidx.lifecycle:lifecycle-livedata-ktx:2.6.0"
43+
androidx-lifecycle-process = "androidx.lifecycle:lifecycle-process:2.6.0"
44+
androidx-lifecycleRuntimeKtx = "androidx.lifecycle:lifecycle-runtime-ktx:2.6.0"
45+
androidx-lifecycleRuntimeCompose = "androidx.lifecycle:lifecycle-runtime-compose:2.6.0"
46+
androidx-lifecycleViewmodelCompose = "androidx.lifecycle:lifecycle-viewmodel-compose:2.6.0"
4747
android-material = "com.google.android.material:material:1.8.0"
4848
androidx-navigation-fragmentKtx = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "navigation" }
4949
androidx-navigation-runtimeKtx = { module = "androidx.navigation:navigation-runtime-ktx", version.ref = "navigation" }
5050
androidx-navigation-uiKtx = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "navigation" }
5151
androidx-preferences = "androidx.preference:preference-ktx:1.2.0"
52-
androidx-recyclerview = "androidx.recyclerview:recyclerview:1.2.1"
52+
androidx-recyclerview = "androidx.recyclerview:recyclerview:1.3.0"
5353
androidx-startupRuntime = "androidx.startup:startup-runtime:1.1.1"
5454
androidx-swiperefreshlayout = "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
5555
androidx-viewpager2 = "androidx.viewpager2:viewpager2:1.0.0"
@@ -58,11 +58,11 @@ apache-commonsLang3 = "org.apache.commons:commons-lang3:3.12.0"
5858
caverock-androidsvgAar = "com.caverock:androidsvg-aar:1.4"
5959
compose-navigation = { module = "androidx.navigation:navigation-compose", version.ref = "navigation" }
6060
compose-material = "androidx.compose.material:material:1.3.1"
61-
compose-material3 = "androidx.compose.material3:material3:1.1.0-alpha07"
61+
compose-material3 = "androidx.compose.material3:material3:1.1.0-alpha08"
6262
compose-material3Themeadapter = "com.google.accompanist:accompanist-themeadapter-material3:0.28.0"
6363
compose-ui = { module = "androidx.compose.ui:ui", version.ref = "androidx-compose-ui" }
6464
compose-uiTestManifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "androidx-compose-ui" }
65-
compose-uiTestJunit = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "androidx-compose-ui" }
65+
compose-uiTestJunit = "androidx.compose.ui:ui-test-junit4:1.3.3"
6666
compose-uiTooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "androidx-compose-ui" }
6767
compose-uiToolingPreview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidx-compose-ui" }
6868
compose-uiUtil = { module = "androidx.compose.ui:ui-util", version.ref = "androidx-compose-ui" }
@@ -93,8 +93,8 @@ koin-androidxCompose = "io.insert-koin:koin-androidx-compose:3.4.2"
9393
koin-core = "io.insert-koin:koin-core:3.3.3"
9494
kotest-runnerJunit = { module = "io.kotest:kotest-runner-junit5", version.ref = "io-kotest" }
9595
kotest-assertionsCore = { module = "io.kotest:kotest-assertions-core", version.ref = "io-kotest" }
96-
koltin-reflect = "org.jetbrains.kotlin:kotlin-reflect:1.8.10"
97-
kotlin-stdlib = "org.jetbrains.kotlin:kotlin-stdlib:1.8.10"
96+
koltin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" }
97+
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
9898
kotlinx-serializationJson = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0"
9999
mock = "io.mockk:mockk:1.13.4"
100100
mockito-kotlin = "org.mockito.kotlin:mockito-kotlin:4.1.0"
@@ -152,7 +152,7 @@ koin = [
152152
[plugins]
153153
androidApplication = { id = "com.android.application", version.ref = "gradlePlugin" }
154154
androidLibrary = { id = "com.android.library", version.ref = "gradlePlugin" }
155-
dokka = "org.jetbrains.dokka:1.7.20"
155+
dokka = "org.jetbrains.dokka:1.8.10"
156156
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
157157
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
158158
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }

gradle/wrapper/gradle-wrapper.jar

34 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

gradlew

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146146
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
147+
# shellcheck disable=SC3045
148148
MAX_FD=$( ulimit -H -n ) ||
149149
warn "Could not query maximum file descriptor limit"
150150
esac
151151
case $MAX_FD in #(
152152
'' | soft) :;; #(
153153
*)
154154
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
155+
# shellcheck disable=SC3045
156156
ulimit -n "$MAX_FD" ||
157157
warn "Could not set maximum file descriptor limit to $MAX_FD"
158158
esac

kotlin-compose-sample/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ android {
4646
}
4747

4848
composeOptions {
49-
kotlinCompilerExtensionVersion = "1.4.1"
49+
kotlinCompilerExtensionVersion = "1.4.3"
5050
}
5151

5252
packagingOptions {

kotlin-sample/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ android {
4848
}
4949

5050
composeOptions {
51-
kotlinCompilerExtensionVersion = "1.4.1"
51+
kotlinCompilerExtensionVersion = "1.4.3"
5252
}
5353
}
5454

settings.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ pluginManagement {
44
gradlePluginPortal()
55
}
66
plugins {
7-
id("org.jetbrains.dokka") version "1.6.21"
7+
id("org.jetbrains.dokka") version "1.8.10"
88
id("com.android.application") version "7.4.1"
9-
id("org.jetbrains.kotlin.android") version "1.6.21"
9+
id("org.jetbrains.kotlin.android") version "1.8.10"
1010
}
1111
}
1212

0 commit comments

Comments
 (0)