The api thirdparty/protocols does (sometimes?) also return protocols with
no protocol definition e.g {xmpp: {}} with no values.
Since the no values are defined the parsing of the json fails.
This works around the problem by falling back to the default
implementation of "Protocol".
Fixes: https://gitlab.gnome.org/GNOME/fractal/issues/538
Before, when entering the media viewer, the MediaViewer struct was only
temporary, whereas the Data struct was kept alive. But the Data struct
was kept forever, even when exiting the media viewer. As a result,
the last media widget, i.e. Image or VideoPlayerWidget, seen in the
media viewer wasn't dropped either.
With this commit, the MediaViewer struct is kept as long as the
media viewer is open; the Data struct is kept with it. When the
user navigates out of the media viewer, both of them get dropped.
Therefore, the corresponding widget gets dropped, too.
This commit improves the video player in the following 3 ways:
- a mute button is added to the control box
- the control box gets hidden away unless the video widget was created
during the last second or the mouse was moved during the last second
- both hitting the space key and clicking anywhere on the video widget
switches between play and pause
Before, when changing from non-fullscreen mode to fullscreen mode or
vice versa, the video widget size was handled according to the mode
that was changed from. With this commit, it gets handled according to
the mode it is changed to.
This commit fixes the right click context menu options for videos. Now,
it contains "Reply", "Open With...", "Save Video As", "View Source" and
"Delete Message".
Furthermore, the auto video play widget of video messages in the room
history gets overlayed with
- a play icon in the center
- a message context menu button on the top right. On click, it opens
a popover. That popover contains the same options as the right click
context menu popover.
Before, when a user attached a video, the attachment was handled as
a file. With this commit, it gets handled as a video. As a consequence,
it's played in the room history and added to the media viewer.
This commit implements a video player for video messages. For any video
message in the room history, a video widget appears in the room history.
There, the video gets played muted in a loop until one of the following happens:
- the widget gets out of sight due to scrolling;
- the user navigates out of the room history, for example into room settings;
- Fractal gets unfocussed;
- the user leaves the room.
When the user clicks on the video widget, the media viewer is opened.
There, the user can play and pause the video unmuted and seek in it.
Before, when a new message divider was deleted after 5 seconds of its
creation, only its corresponding widget in the field listbox of List
got erased. With this commit, its corresponding element in the field
list of List gets erased as well.
Before, an audio message was directly streamed from the server.
The matrix server does not allow Range Requests. Therefore, whenever
the message was stored there, it was not possible to play the audio
from a different place than the beginning.
Now, an audio message is downloaded the same way an image is.
Therefore the user can jump to any position in the audio.
bindings we are pulling.
We are usinga slightly old bindings version and only enabling
up to feature 0_0_10. Given that the api of both the bindings
and libhandy itself is currently unstable the missmatch can
potentially cause issues.
Images sent from fractal was using the local path as thumbnail,
something like /tmp/fractal_RANDOM.png, that's the reason why the image
thumbs are not shown in the history.
This patch don't try to load thumbnails that are not mxc://,
http or https and will fallback to the msg full image instead.
Fix https://gitlab.gnome.org/GNOME/fractal/issues/572
We were updating a clone of extra_content struct so we never modified
the thumbnail_url field. This patch modifies the struct in place instead
of cloning.
See https://gitlab.gnome.org/GNOME/fractal/issues/572
None of the commands related to stickers management
are used from the app, and the functions are written
in a way that makes decoupling the backend really
difficult. It's best to remove everything altogether
and rewrite all the functions in a nicer way.
If a user redacts the first message in a group they will cause the
header to be deleted. This makes it impossible to tell who sent the rest
of the messages in the group.
Set the header as true for the next message if this is the case.
In case other messages in the group have already been deleted we loop
over the messages to find the next non-redacted one from our current
sender.
Signed-off-by: Alistair Francis <alistair@alistair23.me>
If the previous message has been redacted don't group the messages.
This fixes an issue where a user can post a single message, resuling in
their name and message appearing. Then a user can redact that message,
removing their name and message. Finally they can post a new message
where only the message but not the name appears.
This commit has the downside that if a user redacts a message in the
middle of multiple messages their name will appear redundantly. These
will be fixed by "refresing" the room, by either swapping rooms or
restarting Fractal.
Signed-off-by: Alistair Francis <alistair@alistair23.me>
This makes available the ffmpeg-related decoders to the gstreamer
instance in the Sdk. This means we can now play more audiofiles
with the audio player, and later on a wider variety of video
files.