Skip to content

Commit d70941d

Browse files
committedJan 12, 2021
[Jetsnack] Enable ktlint --android flag
Change-Id: I8ca3c1ab0592e4d1c5307ba5782ba519421ac58d
1 parent f9f1ab9 commit d70941d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed
 

‎Jetsnack/app/src/main/java/com/example/jetsnack/ui/home/cart/CartViewModel.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ import kotlinx.coroutines.flow.StateFlow
2828
* TODO: Move data to Repository so it can be displayed and changed consistently throughout the app.
2929
*/
3030
class CartViewModel : ViewModel() {
31-
private val _orderLines: MutableStateFlow<List<OrderLine>> = MutableStateFlow(SnackRepo.getCart())
31+
private val _orderLines: MutableStateFlow<List<OrderLine>> =
32+
MutableStateFlow(SnackRepo.getCart())
3233
val orderLines: StateFlow<List<OrderLine>> get() = _orderLines
3334

3435
fun removeSnack(snackId: Long) {

‎Jetsnack/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ subprojects {
6464
targetExclude("$buildDir/**/*.kt")
6565
targetExclude('bin/**/*.kt')
6666

67-
ktlint(Versions.ktlint)
67+
ktlint(Versions.ktlint).userData([android: "true"])
6868
licenseHeaderFile rootProject.file('spotless/copyright.kt')
6969
}
7070
}

0 commit comments

Comments
 (0)