update ktlint plugin to 11.3.1, format code (#3442)

This commit is contained in:
Konrad Pozniak 2023-03-13 13:16:39 +01:00 committed by GitHub
commit d839f18267
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
141 changed files with 589 additions and 428 deletions

View file

@ -72,7 +72,6 @@ class EditProfileViewModel @Inject constructor(
fun obtainProfile() = viewModelScope.launch {
if (profileData.value == null || profileData.value is Error) {
profileData.postValue(Loading())
mastodonApi.accountVerifyCredentials().fold(
@ -100,7 +99,6 @@ class EditProfileViewModel @Inject constructor(
}
fun save(newDisplayName: String, newNote: String, newLocked: Boolean, newFields: List<StringField>) {
if (saveData.value is Loading || profileData.value !is Success) {
return
}
@ -176,7 +174,8 @@ class EditProfileViewModel @Inject constructor(
val newProfileSource = profileData.value?.data?.source?.copy(note = newNote, fields = newFields)
val newProfile = profileData.value?.data?.copy(
displayName = newDisplayName,
locked = newLocked, source = newProfileSource
locked = newLocked,
source = newProfileSource
)
profileData.postValue(Success(newProfile))