Do not show profile name changes on first update.

This commit is contained in:
Cody Henthorne
2020-07-17 09:42:13 -04:00
parent 7a019eee19
commit 9440dfb66c
2 changed files with 2 additions and 2 deletions

View File

@@ -383,7 +383,7 @@ public class RetrieveProfileJob extends BaseJob {
Log.i(TAG, "Profile name updated. Writing new value.");
DatabaseFactory.getRecipientDatabase(context).setProfileName(recipient.getId(), ProfileName.fromSerialized(plaintextProfileName));
if (!recipient.isGroup() && !recipient.isLocalNumber()) {
if (!(recipient.isGroup() || recipient.isLocalNumber() || TextUtils.isEmpty(previousProfileName))) {
//noinspection ConstantConditions
DatabaseFactory.getSmsDatabase(context).insertProfileNameChangeMessages(recipient, newProfileName, previousProfileName);
}