Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't poll avatar endpoint with ocis #11615

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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