diff --git a/app/src/main/java/com/keylesspalace/tusky/util/Either.kt b/app/src/main/java/com/keylesspalace/tusky/util/Either.kt index 3baf5059..3b26c3da 100644 --- a/app/src/main/java/com/keylesspalace/tusky/util/Either.kt +++ b/app/src/main/java/com/keylesspalace/tusky/util/Either.kt @@ -38,7 +38,7 @@ sealed interface Either { fun asRight(): R = (this as Right).value companion object { - inline fun Either.map(crossinline mapper: (R) -> N): Either { + inline fun Either.map(mapper: (R) -> N): Either { return if (this.isLeft()) { Left(this.asLeft()) } else { diff --git a/app/src/main/java/com/keylesspalace/tusky/viewmodel/AccountsInListViewModel.kt b/app/src/main/java/com/keylesspalace/tusky/viewmodel/AccountsInListViewModel.kt index 3c5229eb..5cfb2a31 100644 --- a/app/src/main/java/com/keylesspalace/tusky/viewmodel/AccountsInListViewModel.kt +++ b/app/src/main/java/com/keylesspalace/tusky/viewmodel/AccountsInListViewModel.kt @@ -118,7 +118,7 @@ class AccountsInListViewModel @Inject constructor(private val api: MastodonApi) } } - private inline fun updateState(crossinline fn: State.() -> State) { + private inline fun updateState(fn: State.() -> State) { _state.value = fn(_state.value) } } diff --git a/app/src/main/java/com/keylesspalace/tusky/viewmodel/ListsViewModel.kt b/app/src/main/java/com/keylesspalace/tusky/viewmodel/ListsViewModel.kt index d9fdbd59..4a9a6a48 100644 --- a/app/src/main/java/com/keylesspalace/tusky/viewmodel/ListsViewModel.kt +++ b/app/src/main/java/com/keylesspalace/tusky/viewmodel/ListsViewModel.kt @@ -143,7 +143,7 @@ internal class ListsViewModel @Inject constructor(private val api: MastodonApi) } } - private inline fun updateState(crossinline fn: State.() -> State) { + private inline fun updateState(fn: State.() -> State) { _state.value = fn(_state.value) }