Use more orEmpty extensions (#3399)
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/or-empty.html https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/or-empty.html
This commit is contained in:
parent
ed188783de
commit
ca29ee2b0b
13 changed files with 17 additions and 17 deletions
|
|
@ -153,9 +153,9 @@ class AccountManager @Inject constructor(db: AppDatabase) {
|
|||
it.displayName = account.name
|
||||
it.profilePictureUrl = account.avatar
|
||||
it.defaultPostPrivacy = account.source?.privacy ?: Status.Visibility.PUBLIC
|
||||
it.defaultPostLanguage = account.source?.language ?: ""
|
||||
it.defaultPostLanguage = account.source?.language.orEmpty()
|
||||
it.defaultMediaSensitivity = account.source?.sensitive ?: false
|
||||
it.emojis = account.emojis ?: emptyList()
|
||||
it.emojis = account.emojis.orEmpty()
|
||||
|
||||
Log.d(TAG, "updateActiveAccount: saving account with id " + it.id)
|
||||
accountDao.insertOrReplace(it)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue