aboutsummaryrefslogtreecommitdiff
path: root/lib/user.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2018-08-11 19:06:20 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2018-08-11 19:06:20 +0900
commitb3559aa9ac082abe96da2bae084d0645b93fb658 (patch)
treee46f11654c5dbeddf0a68a23b1e34d93d0133f77 /lib/user.cpp
parent082f233dc9f429d06548fba90c8129ef3f83a4b4 (diff)
downloadlibquotient-b3559aa9ac082abe96da2bae084d0645b93fb658.tar.gz
libquotient-b3559aa9ac082abe96da2bae084d0645b93fb658.zip
Reverse direct chats map
Speeds up lookup of user(s) in a direct chat room. Also: "The other one's" avatar is used to set the avatar of direct chats only, not any room with 2 participants.
Diffstat (limited to 'lib/user.cpp')
-rw-r--r--lib/user.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/user.cpp b/lib/user.cpp
index 12977b8a..b9f493c5 100644
--- a/lib/user.cpp
+++ b/lib/user.cpp
@@ -299,7 +299,7 @@ bool User::setAvatar(QIODevice* source)
std::bind(&Private::setAvatarOnServer, d.data(), _1, this));
}
-void User::requestDirectChat() const
+void User::requestDirectChat()
{
connection()->requestDirectChat(this);
}
@@ -356,7 +356,7 @@ QImage User::avatar(int width, int height, const Room* room)
}
QImage User::avatar(int width, int height, const Room* room,
- Avatar::get_callback_t callback)
+ const Avatar::get_callback_t& callback)
{
return avatarObject(room).get(d->connection, width, height,
[=] { emit avatarChanged(this, room); callback(); });