Allow saving empty notes with empty nicknames.
This commit is contained in:
parent
d460fa7ed4
commit
2a5793d96e
1 changed files with 2 additions and 1 deletions
|
@ -16,6 +16,7 @@ import kotlinx.coroutines.Dispatchers
|
|||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.signal.core.util.BreakIteratorCompat
|
||||
import org.signal.core.util.isNotNullOrBlank
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase
|
||||
import org.thoughtcrime.securesms.profiles.ProfileName
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
|
@ -52,7 +53,7 @@ class NicknameViewModel(
|
|||
noteCharactersRemaining = NOTE_MAX_LENGTH - noteLength,
|
||||
formState = NicknameState.FormState.READY,
|
||||
hasBecomeReady = true,
|
||||
isEditing = !recipient.nickname.isEmpty
|
||||
isEditing = !recipient.nickname.isEmpty || recipient.note?.isNotNullOrBlank() == true
|
||||
)
|
||||
} else {
|
||||
state.value.copy(recipient = recipient)
|
||||
|
|
Loading…
Add table
Reference in a new issue