aboutsummaryrefslogtreecommitdiff
path: root/room.cpp
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-03-23Room::downloadFile(): Events are constKitsune Ral
2018-03-23Room::downloadFile(): make sure to store the initiated file transfer anewKitsune Ral
QHash doesn't overwrite an entry if it already exists; this might lead to the target file name from the previous transfer kept in the table of file transfers. The commit fixes that.
2018-03-23Room::downloadFile(): don't start another job if the transfer is ongoingKitsune Ral
2018-03-23Room::downloadFile(): Make sure a generated file name is saneKitsune Ral
Closes #191.
2018-03-07Fix resetting the read marker if a read receipt comes from the syncKitsune Ral
Closes #184.
2018-03-06Make sure the read marker is reinstated after Quaternion restartKitsune Ral
2018-03-05Support server-side read marker (m.full_read)Kitsune Ral
Closes #183. There's also the m.read part but it can be done sometime later, as it's pure optimisation.
2018-03-05First pieces of server-side read marker supportKitsune Ral
2018-03-05Room: addTag() and removeTag()Kitsune Ral
Slightly changed TagRecord constructors to match.
2018-03-05Room::toJson(): Fix caching of tagsKitsune Ral
2018-03-05ReadMarkerEvent; TagEvent remade with less boilerplate codeKitsune Ral
tagevent.h -> accountdataevents.h now has a macro to define more simplistic events along the lines of simplestateevents.h but inheriting from Event instead. TagEvent and ReadMarkerEvent(m.fully_read) are defined using this macro. ReadMarkerEvent is also wired through event.* (but not further yet).
2018-03-05Support saving account data on the serverKitsune Ral
Closes #152. Saving of specific event types should be added separately.
2018-03-04Room::toJson(): Use QJsonObject/Array modern constructors; check execution timeKitsune Ral
Now that we're on Qt 5.6 we can afford brace-initialization of those objects.
2018-03-03Improve compatibility with gcc 4.9 to be able to build for Android with ↵Roman Plášil
QtCreator
2018-03-01Fix tags saving/restoring (finally)Kitsune Ral
Closes #134.
2018-02-28Profiling logs: added µs, less empty profiling log linesKitsune Ral
Closes #177.
2018-02-27Room: Save tags in the cache; isFavourite() and isLowPriority()Kitsune Ral
2018-02-26Room and Connection: support room tagsKitsune Ral
Closes #134.
2018-02-26Room: show 1-on-1 invitations in a better wayKitsune Ral
Previously it was just an "Empty room" name, now it's "Invitation from %1".
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-23Room: user() and memberJoinState(); code cleanupKitsune Ral
Room::user() came instead of Room::Private::member() and memberJoinState() came instead of Private::hasMember.
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-02-03Room: urlToDownload() and urlToThumbnail()Kitsune Ral
Closes #168.
2018-02-01On Windows, make sure the downloaded file has a proper extensionKitsune Ral
Closes #287.
2018-02-01Log transferred bytes in PROFILER categoryKitsune Ral
2018-02-01Room::fileNameToDownload: get a sensible initial name for the file pickerKitsune Ral
Works (at least, should work) with both Qt Widgets and QML.
2018-02-01Add GCC 4.9.2 to the workaround path for FileTransferInfo codeKitsune Ral
Closes #161. Doesn't make GCC 4.9.2 officially supported but libqmatrixclient can be compiled with it as of now.
2018-01-30Room: setName(), setCanonicalAlias()Kitsune Ral
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-25Room::toJson: fix invite state cachingKitsune Ral
Causes a cache version upgrade; the old cache stores the state in an incorrect place that won't be supported. Closes #159.
2018-01-25Room::Private::toJson: don't save zero numbersKitsune Ral
2018-01-22Room: emit addedMessages() before possible read marker auto-promotionKitsune Ral
Read marker auto-promotion may be bound to a dataChanged() signal in the client model, while a routine connection for addedMessages() is endInsertRows(). Emitting endInsertRows() after dataChanged() over the same rows has unpredictable consequences for representation of data in those rows - hence the fix.
2018-01-22Room::setLastReadEvent: don't update if the event is the sameKitsune Ral
2018-01-20Room: store the first displayed event as well; Room::*DisplayedMarker() methodsKitsune Ral
2018-01-18Typo fixKitsune Ral
2018-01-18Room: add properties for shown (room/event), message and members countKitsune Ral
Closes #151.
2018-01-18Move links pretty-printing code from Quaternion to libKitsune Ral
This code is useful for all clients, and extensions to pretty-printing can be later added either via making prettyPrint() virtual or even by providing a registry of additional "text transformers" or even "event content renderers" applied to visualise the event.
2018-01-17Fix a mistake reported by Clang static analyzerKitsune Ral
2018-01-17Fix an occasional crash introduced by the previous commitKitsune Ral
2018-01-17Room::getPreviousContent(): Don't skip if the last job just finishedKitsune Ral
working The sequence is: RoomMessagesJob::success -> addHistoricalMessageEvents -> MessageEventModel notification -> QML notification about model reset -> MessageEventModel completes updating -> QML updates from the model but by then scrolling has already stopped at the oldest (just loaded) event -> since there's no momentum, next batch is not fetched. In order to address this, two things are done: in QML, the current position is checked in modelReset() handler; in Room (this commit), prev_batch is updated before historical messages are added (and the model gets notified, respectively), to prevent firing another job with the old prev_batch.
2018-01-17Room::downloadFile(): make sure temporary file names don't clashKitsune Ral
Particularly in case when there are two events that have an image with the same file name (image.png).
2018-01-15One more fix, this time for MSVC 2015 onlyKitsune Ral
Making a structure from an initializer list seems to be a problem for it if initializers are defined in the structure.
2018-01-14RoomEvent-aware file up/downloads along with status trackingKitsune Ral
Closes #121; closes #122.
2018-01-12Qualify a bind() invocation with 'std::'; use an actual value instead of a ↵Kitsune Ral
placeholder An unqualified bind() seems to upset some build environments; also, use a User* value at hand instead of binding it at the moment of signal-slot triggering.
2018-01-06Add a missing #includeKitsune Ral
std::bind belongs to <functional>, don't rely on implicitly including it from other standard headers.