diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-02-23 11:16:10 +0900 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2018-02-23 13:42:44 +0900 |
commit | 9474a9afeb7ff63538ee85b4b59e172e5d32db32 (patch) | |
tree | 6a33ebfa8752ada4c8ff7d1b3ced49612e6040fb /user.h | |
parent | 76b1d775edae36dd2f36fdd4886c6c956bf6b49b (diff) | |
download | libquotient-9474a9afeb7ff63538ee85b4b59e172e5d32db32.tar.gz libquotient-9474a9afeb7ff63538ee85b4b59e172e5d32db32.zip |
Avatar: provide common logic for uploading; don't store Connection
Although the setting part of the work is class(User or Room)-specific, the uploading part is common, so Avatar provides it now.
Also: there's no need to store Connection, as it's only used in get() and upload() - just pass it as the parameter to the methods.
Diffstat (limited to 'user.h')
-rw-r--r-- | user.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -84,7 +84,8 @@ namespace QMatrixClient const Avatar& avatarObject() const; Q_INVOKABLE QImage avatar(int dimension); - Q_INVOKABLE QImage avatar(int requestedWidth, int requestedHeight); + Q_INVOKABLE QImage avatar(int width, int height); + QImage avatar(int width, int height, Avatar::get_callback_t callback); QString avatarMediaId() const; QUrl avatarUrl() const; |