Update plugin ktlint to v12.1.0 (#2200)

* Update plugin ktlint to v12.1.0

* Run `./gradlew ktlintFormat` and fix some issues manually.

* Fix other issues reproted by Ktlint

* Limit false positives, KtLint removes unnecessary curly brace in String templates.

* Remove useless Unit

* Minor improvements over ktlint changes

* Restore `AlertDialogContent` behaviour

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
renovate[bot] 2024-01-10 16:22:24 +01:00 committed by GitHub
parent 675cc525cf
commit 7e9cda3aa9
442 changed files with 1091 additions and 1081 deletions

View file

@ -25,8 +25,7 @@ import kotlinx.coroutines.flow.asStateFlow
import javax.inject.Inject
@SingleIn(AppScope::class)
class AccountProviderDataSource @Inject constructor(
) {
class AccountProviderDataSource @Inject constructor() {
private val accountProvider: MutableStateFlow<AccountProvider> = MutableStateFlow(
defaultAccountProvider
)

View file

@ -50,9 +50,11 @@ fun AccountProviderView(
modifier: Modifier = Modifier,
onClick: () -> Unit,
) {
Column(modifier = modifier
.fillMaxWidth()
.clickable { onClick() }) {
Column(
modifier = modifier
.fillMaxWidth()
.clickable { onClick() }
) {
HorizontalDivider()
Column(
modifier = Modifier

View file

@ -54,9 +54,11 @@ fun ChangeServerView(
onLearnMoreClicked = {
onLearnMoreClicked()
eventSink.invoke(ChangeServerEvents.ClearError)
}, onDismiss = {
eventSink.invoke(ChangeServerEvents.ClearError)
})
},
onDismiss = {
eventSink.invoke(ChangeServerEvents.ClearError)
}
)
}
}
}

View file

@ -20,6 +20,6 @@ import io.element.android.features.login.api.oidc.OidcAction
sealed interface OidcEvents {
data object Cancel : OidcEvents
data class OidcActionEvent(val oidcAction: OidcAction): OidcEvents
data class OidcActionEvent(val oidcAction: OidcAction) : OidcEvents
data object ClearError : OidcEvents
}

View file

@ -90,9 +90,9 @@ class HomeserverResolver @Inject constructor(
if (data.contains(".")) {
// TLD detected?
} else {
add("${data}.org")
add("${data}.com")
add("${data}.io")
add("$data.org")
add("$data.com")
add("$data.io")
}
// Always try what the user has entered
add(data)

View file

@ -30,6 +30,6 @@ import kotlinx.serialization.Serializable
*/
@Serializable
data class WellKnownBaseConfig(
@SerialName("base_url")
val baseURL: String? = null
@SerialName("base_url")
val baseURL: String? = null
)

View file

@ -21,6 +21,6 @@ import kotlinx.serialization.Serializable
@Serializable
data class WellKnownSlidingSyncConfig(
@SerialName("url")
val url: String? = null,
@SerialName("url")
val url: String? = null,
)

View file

@ -220,7 +220,9 @@ private fun LoginForm(
Icon(imageVector = CompoundIcons.Close, contentDescription = stringResource(CommonStrings.action_clear))
}
}
} else null,
} else {
null
},
)
var passwordVisible by remember { mutableStateOf(false) }

View file

@ -144,7 +144,9 @@ fun SearchAccountProviderView(
)
}
}
} else null,
} else {
null
},
supportingText = {
Text(text = stringResource(id = R.string.screen_account_provider_form_notice), color = MaterialTheme.colorScheme.secondary)
}

View file

@ -140,7 +140,6 @@ private fun OverallContent(
.padding(bottom = 8.dp),
)
}
}
}