Skip to content

Commit

Permalink
Don't poll avatar endpoint with ocis
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOneRing committed May 7, 2024
1 parent f821cc5 commit 5d0dbac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/unreleased/11615
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Enhancement: Don't poll the Avatar endpoint with ocis

Ocis has no Avatar implemented yet and when it will be added we will require a different approach.

https://github.com/owncloud/client/pull/11615
3 changes: 2 additions & 1 deletion src/gui/fetchserversettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ void FetchServerSettingsJob::runAsyncUpdates()

// ideally we would parent them to the account, but as things are messed up by the shared pointer stuff we can't at the moment
// so we just set them free
if (_account->capabilities().avatarsAvailable()) {
if (_account->capabilities().spacesSupport().enabled && _account->capabilities().avatarsAvailable()) {
// the avatar job uses the legacy webdav url and ocis will require a new approach
auto *avatarJob = new AvatarJob(_account, _account->davUser(), 128, nullptr);
connect(avatarJob, &AvatarJob::avatarPixmap, this, [this](const QPixmap &img) { _account->setAvatar(img); });
avatarJob->start();
Expand Down

0 comments on commit 5d0dbac

Please sign in to comment.