Commit graph

1851 commits

Author SHA1 Message Date
Adrien Plazas
97c1612c58 main_window: Allow swiping back when folded
This makes going back to the rooms list more comfortable on phones.
2020-02-10 10:08:32 +00:00
Adrien Plazas
546b3c831b main_window: Use the 'over' leaflet transition
This is a new transition and the recommended one for this case.
2020-02-10 10:08:32 +00:00
Adrien Plazas
6cf0575dab Bump libhandy to 0.0.13
This is needed to access HdySwipeGroup and new features of HdyLeaflet.
2020-02-10 10:08:32 +00:00
Alexandre Franke
9c01631199 API: handle empty next_batch fields
Fixes #574
2020-02-10 07:15:30 +00:00
Piotr Drąg
b7d20767fd Update Polish translation 2020-02-09 12:15:48 +01:00
Alexandre Franke
f0578db53d Update French translation 2020-02-07 22:25:16 +00:00
sonjita
9df03e4043 Fix crashes when hitting page up in room history
Before, the video player implementation made Fractal crash when pressing
the page up/down button in the room history. This commit fixes that bug.
2020-02-07 10:02:14 +00:00
Alejandro Domínguez
0db947a00a API: Implement types for room management, no events yet 2020-02-06 09:55:26 +01:00
Kukuh Syafaat
8abca3efba Update Indonesian translation 2020-02-05 11:40:53 +00:00
Julian Sparber
3bceb012a0
Fix Error searching for rooms at startup
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
2020-02-03 14:57:56 +01:00
Daniel Mustieles
e6b0af2bf5 Update Spanish translation 2020-02-03 11:43:57 +00:00
yatinmaan
260ef54be8 message: Add size field to thumbnail_info 2020-02-03 09:31:18 +00:00
yatinmaan
ff429b8b22 attach: Fix filename for pasted images 2020-02-03 09:31:18 +00:00
Piotr Drąg
f398a9ae7a Update Polish translation 2020-02-02 12:46:37 +01:00
Daniel Mustieles
5f333c6706 Update Spanish translation 2020-01-28 15:05:14 +00:00
sonjita
4dfa5989f2 Drop Data struct when exiting media viewer
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.
2020-01-27 17:57:39 +01:00
sonjita
46ef6934bb Improve video player in media viewer
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
2020-01-27 10:46:31 +01:00
sonjita
1024dd5b72 Fix fullscreen mode switch in media viewer
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.
2020-01-27 10:46:31 +01:00
sonjita
3640d6469e Improve design of video messages in room history
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.
2020-01-27 10:46:31 +01:00
sonjita
08ee5dba9e Handle outgoing video messages as videos
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.
2020-01-27 10:46:31 +01:00
sonjita
a42873052e Implementation of video player
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.
2020-01-27 10:46:21 +01:00
sonjita
91552b1d69 Fix deletion of new message divider
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.
2020-01-23 20:49:38 +00:00
sonjita
487509fdff Get rid of option in some return types
Before some functions returned Option<T> even though T could be
returned directly.
2020-01-23 20:49:38 +00:00
sonjita
b5b5a2ab7d Download of audio messages
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.
2020-01-23 20:49:38 +00:00
Daniel García Moreno
4fca2f0ca7 flatpak: set RUSTFLAGS to ""
Building with gnome-builder fails, this patch add the RUSTFLAGS that
will fix the 'error-format' problem.
2020-01-23 18:05:58 +01:00
Daniel García Moreno
4836df0177 fractal-gtk: Remove not needed use to clean warnings 2020-01-23 18:04:17 +01:00
Jordan Petridis
4df16251f4
flatpak: use the version of libhandy that corresponds to the
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.
2020-01-23 16:57:54 +02:00
Kukuh Syafaat
6b81bf806b Update Indonesian translation 2020-01-14 13:12:28 +00:00
Daniel García Moreno
61fa72f173 Image: Don't try to load thumbs from non remote paths
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
2020-01-09 10:36:43 +01:00
Daniel García Moreno
ffc09548ed API: Fix thumbnail_url modification on image upload
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
2020-01-09 10:11:45 +01:00
Efstathios Iosifidis
d281f076ca Add Greek translation 2020-01-07 10:48:56 +00:00
Daniel García Moreno
ca75ac7a1b actions: Unwrap roomid variant for change_avatar
The room id in this action method is a Variant and to get the real
string we should call the get_str method instead of the to_string.

Fix https://gitlab.gnome.org/GNOME/fractal/issues/546
2020-01-07 08:25:36 +01:00
Alejandro Domínguez
0ab93cd856 Backend: Remove sticker_widget field
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.
2019-12-29 23:56:49 +01:00
Alejandro Domínguez
4b6cce3eb5 Backend: Remove scalar_url and scalar_token fields 2019-12-29 23:56:49 +01:00
Alejandro Domínguez
49de0df18d Remove since from Backend 2019-12-29 23:56:49 +01:00
Alejandro Domínguez
219b77803f Remove user_id from Backend 2019-12-29 23:56:49 +01:00
Çağatay Yiğit Şahin
cb3fec53a2 Add Turkish translation 2019-12-27 16:05:50 +00:00
Alejandro Domínguez
5571bb4cb6 AppOp: Store all login-dependent data into an optional field 2019-12-23 01:25:31 +01:00
Daniel García Moreno
28c4ce4100 Merge branch 'Stunkymonkey/fractal-fix-ranges' 2019-12-22 10:11:09 +01:00
Daniel García Moreno
1fc1f3ef2c Merge branch 'Stunkymonkey/fractal-clap-fixes' 2019-12-22 10:07:57 +01:00
Alistair Francis
ba7ec75868 fractal-gtk: room_history: Set header for new messages
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>
2019-12-20 22:55:31 -08:00
Felix Buehler
f2e378448f [fractal-gtk] fix overlapping range 2019-12-20 22:32:25 +01:00
Felix Buehler
7498c8de1f [fractal-gtk] display correct fractal version 2019-12-20 22:28:23 +01:00
Alistair Francis
c95bd28dbe fractal-matrix-api: Handle a redacted message event
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2019-12-19 20:20:14 -08:00
Alistair Francis
386f26c11a fractal-gtk: appop: Allow removing a message
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2019-12-19 20:20:14 -08:00
Alistair Francis
b04127d0c2 fractal-gtk: room_history: Allow removing a message
Signed-off-by: Alistair Francis <alistair@alistair23.me>
2019-12-19 20:20:14 -08:00
Alistair Francis
ef4a8abd9b fractal-gtk: room_history: Don't group messages if redacted
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>
2019-12-19 20:20:14 -08:00
Jordan Petridis
1674e6350f
Flatpak: depend on the ffmpeg-full extension
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.
2019-12-16 22:10:35 +02:00
Anders Jonsson
dac8a72f77 Update Swedish translation 2019-12-15 20:52:25 +00:00
Daniel García Moreno
a5bdd29211 Merge branch 'paysonwallach/fractal-patch-1' 2019-12-10 08:24:32 +01:00