Clear profile avatar when we discover that it has been removed
This commit is contained in:
parent
299fe2af36
commit
b50bf58418
1 changed files with 9 additions and 4 deletions
|
@ -4589,12 +4589,17 @@ export class ConversationModel extends window.Backbone
|
|||
}
|
||||
|
||||
async setProfileAvatar(avatarPath: undefined | null | string): Promise<void> {
|
||||
if (!avatarPath) {
|
||||
return;
|
||||
if (isMe(this.attributes)) {
|
||||
if (avatarPath) {
|
||||
window.storage.put('avatarUrl', avatarPath);
|
||||
} else {
|
||||
window.storage.remove('avatarUrl');
|
||||
}
|
||||
}
|
||||
|
||||
if (isMe(this.attributes)) {
|
||||
window.storage.put('avatarUrl', avatarPath);
|
||||
if (!avatarPath) {
|
||||
this.set({ profileAvatar: undefined });
|
||||
return;
|
||||
}
|
||||
|
||||
const avatar = await window.textsecure.messaging.getAvatar(avatarPath);
|
||||
|
|
Loading…
Add table
Reference in a new issue