Browse Source

Fix clearing username

master
Eduard Kuzmenko 4 years ago
parent
commit
914bb4de64
  1. 2
      src/components/appSelectPeers.ts
  2. 2
      src/components/sidebarLeft/tabs/editProfile.ts

2
src/components/appSelectPeers.ts

@ -478,7 +478,7 @@ export default class AppSelectPeers { @@ -478,7 +478,7 @@ export default class AppSelectPeers {
div.dataset.key = '' + peerId;
if(typeof(peerId) === 'number') {
if(title === undefined) {
title = new PeerTitle({peerId, onlyFirstName: true}).element;
title = new PeerTitle({peerId, onlyFirstName: true, dialog: true}).element;
}
avatarEl.setAttribute('peer', '' + peerId);

2
src/components/sidebarLeft/tabs/editProfile.ts

@ -135,7 +135,7 @@ export default class AppEditProfileTab extends SliderSuperTab { @@ -135,7 +135,7 @@ export default class AppEditProfileTab extends SliderSuperTab {
}));
}
if(this.usernameInputField.isValid() && this.usernameInputField.input.classList.contains('valid')) {
if(this.usernameInputField.isValid() && !this.usernameInputField.input.classList.contains('error')) {
promises.push(appUsersManager.updateUsername(this.usernameInputField.value));
}

Loading…
Cancel
Save