aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-11-26Room: provide ability to find an event in the timeline by its idKitsune Ral
A new hashmap, eventsIndex, is provided, that allows you to find the event in the timeline if you have eventId. This hashmap uses the fact that deque iterators don't invalidate upon insertion of elements to either end of the deque. Thanks to that, promoteReadMarker() and doAddNewMessageEvents() have been considerably simplified; also, it should be easier now to calculate event indices without rolling back and forth over the timeline.
2016-11-26Room: use std::deque for the timelineKitsune Ral
2016-11-26CleanupKitsune Ral
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-25Merge pull request #48 from Fxrh/kitsune-unread-messages-in-libKitsuneRal
Unread messages implementation in the library
2016-11-14Merge branch 'pragma-once'Kitsune Ral
2016-11-14Removed no more used filesKitsune Ral
2016-11-07Fixed a crasher that slipped in the previous commitKitsune Ral
Room::Private::member() filters out non-members of the room, which is not the right thing when adding messages from a person that left the room, e.g.
2016-11-07Room::doAddNewMessages: Extend auto-promotion to all users, not only localKitsune Ral
Thanks to @maralorn for pointing out.
2016-11-07Merge pull request #49 from Fxrh/kitsune-cleanupKitsuneRal
Cleanup upon code inspection in CLion
2016-11-06Use #pragma once everywhereMalte Brandy
2016-11-06Room: extend promoteReadMarker over non-local users (again)Kitsune Ral
2016-11-03Auto-promote the read marker over locally-originated messagesKitsune Ral
2016-11-02Room: make read marker a Q_PROPERTY; markMessagesAsRead now uses eventId againKitsune Ral
The first change allows to use the read marker from QML (hint to Tensor). The second change is actually a fix for a case when markMessagesAsRead() is called with an iterator behind the last read event (in that case markMessagesAsRead() would post a receipt for that older event, which is not quite right).
2016-11-01Removed unused codeKitsune Ral
These parts are either deprecated or just unlikely to be reused in the current form. Breaks Quaternion master as of now (it #includes logmessage.h).
2016-11-01Receipt: eventId is extraneous inside the receipt, since receipts are ↵Kitsune Ral
associated with Event objects anyway
2016-11-01Moved MemberNameSorter from Quaternion to libKitsune Ral
This code is useful for any client that uses the Room class and needs to display the list of room members. Also removed an unused #include.
2016-11-01Removed unused #includesKitsune Ral
2016-10-31Code cleanup upon inspection in CLionKitsune Ral
These changes are most harmless; a no more used Private class removed, and an incorrect signal specification in connect() fixed. Also, one explicit #include has been added, just in case.
2016-10-28Relax logging a bitKitsune Ral
Kicking markMessagesAsRead() at each mouse move is still a bad idea - I'm looking at you Quaternion.
2016-10-28Implemented unread messages indication on the lib sideKitsune Ral
The implementation allows further extension to actually counting unread messages (in their Room::isEventNotable() sense - see the code) but so far just replicates what Quaternion previously provided. The only difference from the Quaternion implementation is that last own message is not marked as read immediately - so that we can allow the local user to send messages while staying with the read marker well above. This implies, though, that the read marker won't reset to the timeline bottom at any movement of the user - rather that it resets to the bottom of the current view (which is the ultimately correct behaviour, anyway).
2016-10-27Fixed a false alarm in Qt CreatorKitsune Ral
Qt Creator turns out to be watching for "at :" substring in logs to detect messages that refer to files - which is not our case. Removing a comma fixes the alarm.
2016-10-27Merge pull request #47 from Fxrh/kitsune-cmake-tweaksKitsuneRal
CMake tweaks
2016-10-27Set CMAKE_CXX_STANDARD variable instead of listing compiler featuresKitsune Ral
That list was bound to become outdated every now and then.
2016-10-27Use more compact syntax for find_package; display prefix path to QtKitsune Ral
Qt5Core_DIR shows a path to the .cmake file's directory, which is a little too much information. The same change will be made in Quaternion, with the Qt prefix having additional usage in installation.
2016-10-26Introduce cropedAvatarMalte Brandy
2016-10-24Crop avatar to ensure it has exactly the wanted size; Fixes memory leak #54Malte Brandy
2016-10-24Merge pull request #44 from Fxrh/kitsune-read-receiptsKitsuneRal
Room: added setLastReadEvent accessor and a signal for it; don't post receipts for own messages to the server
2016-10-23Room: Don't let the read marker (of any user) get back, only forwardKitsune Ral
2016-10-23A couple of fixes according to the PR reviewKitsune Ral
Room::markMessagesAsRead: use the iterator to the message, not after the message. Room::setLastReadEvent: moved to protected
2016-10-21Room::markMessagesAsRead correctly handles local user's messages nowKitsune Ral
setLastReadEvent() is called in any case (read marks a stored in a hashmap so it's a constant time operation anyway); postReceipt() is now called for the nearest previous non-local message.
2016-10-21Fixed building on VS2013Kitsune Ral
QJsonObject stock constructors are boring anyway - using QJsonObject::QJsonObject wasn't really necessary.
2016-10-20Room: added setLastReadEvent accessor and a signal for it; don't post ↵Kitsune Ral
receipts for own messages to the server As discussed with Matthew in #quaternion: https://matrix.to/#/!PCzUtxtOjUySxSelof:matrix.org/$14768896199130qcJqe:matrix.org
2016-10-17Merge pull request #43 from Fxrh/kitsune-request-paramsKitsuneRal
Merged as amended.
2016-10-17Changed the order of arguments in SyncJob::SyncJob()Kitsune Ral
2016-10-15BaseJob: Use saved parameters instead of overriding apiPath(), query() and ↵Kitsune Ral
data() in each job class
2016-10-14Merge pull request #42 from Fxrh/kitsune-use-qsizeFelix Rohrbach
MediaThumbnailJob: Use QSize instead of two separate int's for size
2016-10-14MediaThumbnailJob: Use QSize instead of two separate int's for sizeKitsune Ral
Connection::getThumbnail() is now overloaded to provide compatibility with the previous interface.
2016-10-11Merge pull request #32 from Fxrh/kitsune-memory-careFelix Rohrbach
Event objects leaks plugged
2016-10-11Removed long obsolete initialsyncjob.* files (fixes #37)Kitsune Ral
2016-10-07Fix building with VS2013Kitsune Ral
2016-10-07Fixed leaks of RoomMessageEvent contentKitsune Ral
2016-10-07Use Q_DECLARE_TYPEINFO correctlyKitsune Ral
The previous code had no effect because QVector<Receipt> was instantiated before Q_DECLARE_TYPEINFO occurence.
2016-10-07Fixed massive leaks of Event objectsKitsune Ral
2016-10-05Check there are no non-members "typing" or "having read" messagesKitsune Ral
Normally, this shouldn't happen anyway - just a double-check,
2016-10-04Changed angle brackets to parentheses for user disambiguationKitsune Ral
This fixes a case when another person mentions you by disambiguated name, and this is not highlighted because Riot uses () and Quaternion uses <> to decorate disambiguated names (as well as to check mentions).
2016-09-21Room: don't emit signals if there are no message events receivedKitsune Ral
2016-09-21Merge pull request #31 from Fxrh/kitsune-sender-in-all-eventsKitsuneRal
Push sender from RoomTopicEvent to Event
2016-09-21Merge pull request #30 from Fxrh/fix-messages-orderingKitsuneRal
Fix messages ordering
2016-09-21Push sender from RoomTopicEvent to EventKitsune Ral
Because it's supposed to exist in (at least) all events from /sync.