Skip to content
Snippets Groups Projects
Commit 860cf0c7 authored by Maxime Callet's avatar Maxime Callet Committed by Adrien Béraud
Browse files

Account: modify check when updating displayName

Change-Id: I7b9b6621f541b933cefeaeac1c6d81f23de38a58
parent 1e6f7d4e
No related branches found
No related tags found
No related merge requests found
......@@ -122,7 +122,7 @@ class JamiAccountSummaryPresenter @Inject constructor(
mCompositeDisposable.add(VCardUtils.loadLocalProfileFromDiskWithDefault(filesDir, accountId)
.doOnSuccess { vcard: VCard ->
val previousName = vcard.formattedName?.value
if (StringUtils.isEmpty(previousName) == StringUtils.isEmpty(username) || previousName == username)
if ( (StringUtils.isEmpty(previousName) && StringUtils.isEmpty(username)) || previousName == username)
throw IllegalArgumentException("Name didn't change")
vcard.setFormattedName(username)
vcard.removeProperties(RawProperty::class.java)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment