aboutsummaryrefslogtreecommitdiff
path: root/user.h
AgeCommit message (Collapse)Author
2018-03-24Dealing with direct chatsKitsune Ral
Receiving and caching m.direct (and other non-room account data along the way); Connection::addToDirectChats/removeFromDirectChats (might get siblings in Room eventually but not now), Connection/User::requestDirectChat. Closes #163.
2018-02-24User: store avatars on the heap; use two containers to store ↵Kitsune Ral
avatars-to-rooms mapping Because they are uncopiable, unlike pointers to them; and a combination of QHash of avatars and a QMultiHash of rooms is much more convenient than a std::vector<std::pair<...>>.
2018-02-24User/Room: signal that a user/member is about to change the nameKitsune Ral
Enables to address QMatrixClient/Quaternion#284. Also fixes a gibberish condition in Room::Private::renameMember() that led to improper warnings and a too early return.
2018-02-24Support per-room user traitsKitsune Ral
User::Private stores two new maps (for display names and avatars respectively) and is able to retrieve and store names/avatars on a per-room basis. The "most used" trait is stored separately and room lists are not kept for it (because most people have a single name and a single avatar across all or most rooms). TODO: The avatar container should be replaced with something less clumsy; the current code doesn't even compile with MSVC. A "handle" copyable structure that would hold the Avatar is one of options. Closes #141.
2018-02-23Avatar: provide common logic for uploading; don't store ConnectionKitsune Ral
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.
2018-01-30User: fullName, isGuest, better doc commentsKitsune Ral
User::fullName() is used in Room::roomMembername now. That string construction may be further cached now if it ever becomes a bottleneck.
2018-01-25Room, User: expose avatarMediaId(); declare User for the metatype systemKitsune Ral
To make it easy to use User objects and fetch room and user avatars from QML. Closes #155.
2018-01-25Room, User: const-tighten up the code, set QObject namesKitsune Ral
To make debugging (including QML debugging) more convenient.
2018-01-25Expose avatar URLs of Room and User as Q_PROPERTYKitsune Ral
This is needed for QML integration. Closes #155.
2018-01-14User: Q_PROPERTYs; setAvatar()Kitsune Ral
2017-12-28Switch from QPixmap to QImage; add convenience avatar() overloads to Room ↵Kitsune Ral
and User The switch is necessary because MediaThumbnailJob is supposed to return something that can be worked on in non-GUI threads (as is the case of QML image providers), and QPixmap is not supposed for usage out of the main thread.
2017-10-27Support m.room.avatar eventsKitsune Ral
The events are detected in /sync output, and avatars for rooms are loaded from respective URLs. Clients can use Room::avatar() method to request a pixmap of a certain size, and react to avatarChanged() in order to update the UI when new pixmaps/avatars arrive. avatarChanged() signal is overloaded with two tasks - the first firing merely indicates that a new avatar is available (without actual pixmap yet available) while the second firing means that an actual pixmap has arrived (all this is entirely transparent for clients, they just should update their pixmaps from Room::avatar() every time when Room::avatarChanged() is emitted).
2017-10-26Move out the avatar code from UserKitsune Ral
Avatars are also a property of rooms, and the supporting code is basically the same. The only thing different will be emitted signals, and the cleanest thing to support that (aside from making Avatar a QObject) seems to be to parameterise the thumbnail-updating logic with a continuation invoked upon completion of the thumbnail job.
2017-10-17Fixed a blunder leading to users not having namesKitsune Ral
If all users suddenly don't have names, update to this commit, delete your cache and run again. Issue since 2bf912d6e6ddd9ff81a92ff28ac8c4c1d8f2d7e1.
2017-10-14Support of changing the display nameKitsune Ral
Note that although the mechanism is generic enough to change any user's display name, The Spec states that power rules are very strict about it.
2017-09-20User: no more croppedAvatar(); added avatarUrl() accessorKitsune Ral
avatarUrl() is not yet invokable from QML; I'm considering to make all the simple things in User Q_PROPERTies instead.
2017-06-07Adjust whitespaceRoman Plášil
2017-06-07Split user's bridge (IRC, Gitter) into a separate field in user model objectRoman Plášil
2016-11-25Merge pull request #46 from maralorn/crop-avatarKitsuneRal
Crop avatar to ensure it has exactly the wanted size; Fixes memory leak #45
2016-11-06Use #pragma once everywhereMalte Brandy
2016-10-26Introduce cropedAvatarMalte Brandy
2016-05-02Supply more information with User::nameChanged signalKitsune Ral
2016-04-22Allow login with token.David A Roberts
2016-04-05Imported the current source tree from Quaternion/lib.Kitsune Ral