Fix the 6 issues reported by Sonar.

This commit is contained in:
Benoit Marty 2023-06-16 18:08:20 +02:00
parent 8b2121ae99
commit 2452d8aa91
7 changed files with 24 additions and 7 deletions

View file

@ -20,6 +20,7 @@ import android.net.Uri
import io.element.android.features.createroom.impl.configureroom.RoomPrivacy
import io.element.android.features.createroom.impl.di.CreateRoomScope
import io.element.android.features.createroom.impl.userlist.UserListDataStore
import io.element.android.libraries.androidutils.file.safeDelete
import io.element.android.libraries.di.SingleIn
import kotlinx.collections.immutable.toImmutableList
import kotlinx.coroutines.flow.Flow
@ -36,7 +37,7 @@ class CreateRoomDataStore @Inject constructor(
private val createRoomConfigFlow: MutableStateFlow<CreateRoomConfig> = MutableStateFlow(CreateRoomConfig())
private var cachedAvatarUri: Uri? = null
set(value) {
field?.path?.let { File(it) }?.delete()
field?.path?.let { File(it) }?.safeDelete()
field = value
}

View file

@ -80,8 +80,7 @@ fun ConfirmAccountProviderView(
id = if (state.isAccountCreation) {
R.string.screen_account_provider_signup_subtitle
} else {
// Use same value for now.
R.string.screen_account_provider_signup_subtitle
R.string.screen_account_provider_signin_subtitle
},
)
)

View file

@ -6,6 +6,7 @@
<string name="screen_account_provider_form_notice">"Enter a search term or a domain address."</string>
<string name="screen_account_provider_form_subtitle">"Search for a company, community, or private server."</string>
<string name="screen_account_provider_form_title">"Find an account provider"</string>
<string name="screen_account_provider_signin_subtitle">"This is where you conversations will live — just like you would use an email provider to keep your emails."</string>
<string name="screen_account_provider_signin_title">"Youre about to sign in to %s"</string>
<string name="screen_account_provider_signup_subtitle">"This is where you conversations will live — just like you would use an email provider to keep your emails."</string>
<string name="screen_account_provider_signup_title">"Youre about to create an account on %s"</string>