Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gajim
gajim
Commits
0b2826d9
Commit
0b2826d9
authored
May 14, 2022
by
Daniel Brötzmann
Browse files
fix: Add workspace avatar fallback for missing images
Fixes
#10833
parent
cf9e5fe9
Changes
1
Hide whitespace changes
Inline
Side-by-side
gajim/gtk/avatar.py
View file @
0b2826d9
...
...
@@ -467,9 +467,13 @@ def get_workspace_surface(self,
workspace_id
,
'avatar_sha'
)
if
avatar_sha
:
surface
=
self
.
_load_surface_from_storage
(
avatar_sha
,
size
,
scale
)
if
surface
is
None
:
return
None
return
clip
(
surface
,
'round-corners'
)
if
surface
is
not
None
:
return
clip
(
surface
,
'round-corners'
)
else
:
# avatar_sha set, but image is missing
# (e.g. avatar cache deleted)
app
.
settings
.
set_workspace_setting
(
workspace_id
,
'avatar_sha'
,
''
)
rgba
=
make_rgba
(
color
or
DEFAULT_WORKSPACE_COLOR
)
letter
=
name
[:
1
].
upper
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment