fix an issue where linking a device will remove the username on main device

This commit is contained in:
Ryan Zhao 2022-12-15 15:23:41 +11:00
parent a14b2c0960
commit 751eb8ce66

View file

@ -318,7 +318,7 @@ public enum MessageReceiver {
var updatedProfile: Profile = profile
// Name
if let name = name, name != profile.name {
if let name = name, !name.isEmpty, name != profile.name {
let shouldUpdate: Bool
if isCurrentUser {
shouldUpdate = given(UserDefaults.standard[.lastDisplayNameUpdate]) {