When the gui thread blocks for several seconds it's possible for the
ConnectionValidator to timeout and decide that the account is
unreachable. It will then terminate all sync runs.
Increasing the timeout makes this less likely to happen. The tradeoff is
that real disconnects will not be detected as quickly.
This does not address the root cause but makes the symptom less likely
to appear.
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>