Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
-
0b2826d9
by wurstsalat at 2022-05-14T16:42:23+02:00
1 changed file:
Changes:
| ... | ... | @@ -467,9 +467,13 @@ def get_workspace_surface(self, |
| 467 | 467 | workspace_id, 'avatar_sha')
|
| 468 | 468 | if avatar_sha:
|
| 469 | 469 | surface = self._load_surface_from_storage(avatar_sha, size, scale)
|
| 470 | - if surface is None:
|
|
| 471 | - return None
|
|
| 472 | - return clip(surface, 'round-corners')
|
|
| 470 | + if surface is not None:
|
|
| 471 | + return clip(surface, 'round-corners')
|
|
| 472 | + else:
|
|
| 473 | + # avatar_sha set, but image is missing
|
|
| 474 | + # (e.g. avatar cache deleted)
|
|
| 475 | + app.settings.set_workspace_setting(
|
|
| 476 | + workspace_id, 'avatar_sha', '')
|
|
| 473 | 477 | |
| 474 | 478 | rgba = make_rgba(color or DEFAULT_WORKSPACE_COLOR)
|
| 475 | 479 | letter = name[:1].upper()
|