diff options
author | Michael Schuster <michael@schuster.ms> | 2020-02-14 04:10:01 +0300 |
---|---|---|
committer | Michael Schuster <michael@schuster.ms> | 2020-02-14 04:10:01 +0300 |
commit | abfebcf2917e971a4e8c279d3f2871c79e64583a (patch) | |
tree | 871350d0f6759b440e57e80ae2d96f068d0f1317 /src/gui/accountstate.cpp | |
parent | bbb310a853b930692dd69dd1f9b6038dece0479a (diff) |
Add UserInfo class and fetch quota via API instead of PropfindJob
The PropfindJob quota includes the size of shares and thus leads to confusion
in regard of the real space available, as shown in the UI.
This commit aims to streamline the behaviour with the Android and iOS apps,
which also utilize the API.
Details:
- Refactor the QuotaInfo class into UserInfo
- Use JsonApiJob (ocs/v1.php/cloud/user) instead of PropfindJob
- Let ConnectionValidator use the new UserInfo class to fetch
the user and the avatar image (to avoid code duplication)
- Allow updating the avatar image upon AccountSettings visibility,
using UserInfo's quota fetching
Signed-off-by: Michael Schuster <michael@schuster.ms>
Diffstat (limited to 'src/gui/accountstate.cpp')
-rw-r--r-- | src/gui/accountstate.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp index 1491db714..90eec6275 100644 --- a/src/gui/accountstate.cpp +++ b/src/gui/accountstate.cpp @@ -236,7 +236,7 @@ void AccountState::checkConnectivity() return; } - ConnectionValidator *conValidator = new ConnectionValidator(account()); + ConnectionValidator *conValidator = new ConnectionValidator(AccountStatePtr(this)); _connectionValidator = conValidator; connect(conValidator, &ConnectionValidator::connectionResult, this, &AccountState::slotConnectionValidatorResult); |