Skip to content

Commit

Permalink
Clear cached avatar on DeleteContact
Browse files Browse the repository at this point in the history
  • Loading branch information
mixmasala committed Oct 18, 2022
1 parent e7ff5d7 commit 9b0ffba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions editcontact.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ func (p *EditContactPage) Event(gtx layout.Context) interface{} {
if p.remove.Clicked() {
// TODO: confirmation dialog
p.a.c.RemoveContact(p.nickname)
p.a.c.DeleteBlob("avatar://" + p.nickname)
// remove avatar cache
delete(avatars, p.nickname)
return EditContactComplete{nickname: p.nickname}
}
if p.apply.Clicked() {
Expand Down

0 comments on commit 9b0ffba

Please sign in to comment.