Age | Commit message (Collapse) | Author |
|
Should improve compatibility with compilers that don't like conversions
between different std::unique_ptr<> types.
|
|
When there are too many rooms to process, this gives at least some
bandwidth for the GUI in the meantime.
|
|
|
|
To make it easy to use User objects and fetch room and user avatars from QML. Closes #155.
|
|
To make debugging (including QML debugging) more convenient.
|
|
Also switch prev_content() from accidental snake case to camel case (old name still provided for compatibility).
|
|
This is needed for QML integration. Closes #155.
|
|
|
|
|
|
Closes #160.
|
|
Bonus: slightly more accurate comment in Connection::forgetRoom
|
|
Causes a cache version upgrade; the old cache stores the state in an
incorrect place that won't be supported. Closes #159.
|
|
Closes #157.
|
|
|
|
|
|
|
|
Requires deleting the cache :(
|
|
Otherwise an attempt to use a possibly insecure link goes to Connection::getThumbnail(), leading to an assertion failure in splitMediaId(). See also the discussion in QMatrixClient/Quaternion#265.
|
|
|
|
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.
|
|
|
|
|
|
|
|
Similar to hasFileContent(), allows to ascertain that an event has TextContent without checking against all possible msgtypes.
|
|
|
|
Closes #151.
|
|
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.
|
|
|
|
|
|
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.
|
|
Particularly in case when there are two events that have an image with
the same file name (image.png).
|
|
For QML to easily make URLs to thumbnails.
|
|
Given that it's a sidedoor anyway, it should at least be straightforward to use.
|
|
|
|
Making a structure from an initializer list seems to be a problem for it if initializers are defined in the structure.
|
|
MSVC is not good at dealing with type parameter packs of member functions, which is what the whole mixin magic in UrlBasedContent<> relied on. So it's one more level of inheritance instead of mixins now.
|
|
Closes #121; closes #122.
|
|
The whole inheritance/templating structure has been considerably simplified by using a trick with mixin classes; thanks to that, *Info classes are no more templated, they are just mixed together by the almighty UrlBasedContent<> template (but the same can easily be done outside of it, as LocationContent implementation shows). RoomMessageEvent has gained hasFileContent(); it's also possible to easily get a FileInfo core object just by calling msgEvent->content()->fileInfo().
|
|
|
|
|
|
Connection::getThumbnail(QString,...) is better fitting to retrieve
images for QML image providers - one doesn't need to create a QUrl
(which if made naively ends up being incorrect) and also doesn't need to
stack up "mxc://" before the mediaId. Just call Connection::getThumbnail
with the id the QML engine gives you.
|
|
Instead of exposing a QIODevice as GetContentJob does it gets a filename
and saves the incoming payload into it.
|
|
To support the upcoming DownloadFileJob
|
|
|
|
|
|
|
|
Fixes some signedness warnings
|
|
|
|
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.
|
|
"crop" thumbnail type didn't seem to be ever used. Once GTAD is able to generate enums, the respective code will show up in GetContentThumbnailJob and this parameter can be reintroduced in MediaThumbnailJob. As of now, just rely on the default "scale" value.
|