Commit graph

1172 commits

Author SHA1 Message Date
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
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
Julian Hofer
0beb9ab262 Switch order of if blocks to increase readability
Several if statements in the code started with the negation
of the boolean condition to check,
which makes it harder to comprehend the code.
2019-12-03 07:21:28 +00:00
sonjita
d78b52a371 Save language chosen for spell check for each room
Before, when a user changed the language for spell check,
that language was saved by gtk application-wide.

With this commit, the language chosen by the user for spell check gets saved
in the Matrix account data of the particular room the language was chosen in;
and, by syncronizing, it also gets saved in the new field `language` of Room.
When the user enters a room, gspell gets set for the language saved
for that room.
2019-12-03 07:09:36 +00:00
Daniel García Moreno
1dac3f21d4 New release 4.2.2 2019-11-30 10:51:52 +01:00
Alexandre Franke
65a40d4fb0 Update release notes for 4.2.2 2019-11-27 22:21:53 +01:00
Payson Wallach
4bce11601c (#431) Check vector length before accessing element 2019-11-14 22:44:14 -06:00
Alejandro Domínguez
9101aa43de Use Url where possible 2019-11-06 22:08:48 +01:00
Alejandro Domínguez
1b183d3469 API: Remove access_token from BackendData 2019-11-06 22:08:48 +01:00
Alex Monday
f0e6e408d3 app.css: Use opacity for .direct-chat icon instead of hardcoded color 2019-11-06 07:22:23 +00:00
Federico Mena Quintero
31f177f5c1 Get rid of "warning: cannot borrow *self as mutable"
warning: cannot borrow `*self` as mutable because it is also borrowed as immutable
   --> fractal-gtk/src/appop/room.rs:137:17
    |
136 |             if let Some(ref active_room) = self.active_room {
    |                         --------------- immutable borrow occurs here
137 |                 self.set_active_room_by_id(active_room.clone());
    |                 ^^^^                       ----------- immutable borrow later used here
    |                 |
    |                 mutable borrow occurs here
2019-11-05 18:42:03 +00:00
Federico Mena Quintero
03129a931f (#548) - Don't use String::truncate() incorrectly
This was truncating a string at a hardcoded length of 80, which is not
necessarily an UTF-8 character boundary.

Fixes https://gitlab.gnome.org/GNOME/fractal/issues/548
2019-11-05 18:42:03 +00:00
Alexandre Franke
2884fba6c3 Update French translation 2019-10-30 09:06:13 +00:00
Julian Hofer
531790b67c Slightly shorten the command chain in backend_loop
Exchange 'loop' with 'while let Ok(recv)' in order to get rid
of the 'Ok's at the beginning of nearly every pattern
2019-10-27 23:41:28 +01:00
Christopher Davis
d5214a1d5e fractal-gtk: Send redaction events
When moving our architecture to using GAction, the delete
action was forgotten. This meant that while "Delete Message"
showed in the UI, the button did nothing.

Fixes #515
2019-10-26 01:09:42 -07:00
Alexandre Franke
2b9349d224 Update French translation 2019-10-25 10:48:15 +00:00
Rafael Fontenelle
a04fe36293 Update Brazilian Portuguese translation 2019-10-24 14:04:58 +00:00
Piotr Drąg
68d4a4c6fa Update Polish translation 2019-10-24 15:52:19 +02:00
Alejandro Domínguez
09eca65e11 API, BackendData: remove server_url field 2019-10-23 21:08:12 +02:00
Daniel Mustieles
d4bad28fd3 Updated Spanish Translation 2019-10-23 12:16:04 +02:00
sonjita
23285c155b Fixed strings for extraction by gettext 2019-10-21 13:28:01 +02:00
Alejandro Domínguez
40b7ef9f0e API: Implement (de)serializers for Url and Host types
This guarantees that the (de)serialized structs which
contain URLs in any of their fields will always have
a valid URL string and not just a generic one.
2019-10-21 10:36:31 +02:00
sonjita
063e5504a0 Reload settings when verification dialog is closed
When a user wants to add a phone number or email addess, a verifikation token is sent to them and a dialog is opened to enter it.
Before the commit, after closing the verification dialog, the settings dialog was not refreshed.
Therefore the added <phone number / email adress> would stay in the input
with a spinner spinning next to it until another action was taken.

With this commit, closing the verification dialog refreshes the settings window.
2019-10-18 16:48:02 +02:00
sonjita
05ecf239b5 Fix error handling of token request verification
Same situation for email token request verification and phone token request verification:
Before, the user was always shown the error message "Couldn’t add the <email address / phone number.>",
also when the error was due to the fact that the <email / phone> was already in use.

With this commit, that bug is fixed: when the <email / phone> is already in use,
the user is shown the error message "<Email / Phone number> is already in use"
2019-10-18 16:48:02 +02:00
sonjita
aff0d6bcbe Fix deserialization of enum Medium
Before, "Medium" was renamed to "lowercase".
With this commit, "Email" and "MsIsdn" are renamed to "email" and "msisdn", respectively.

This commit fixes the bug due to which account settings wouldn't load.
2019-10-17 18:54:48 +02:00
sonjita
91a1e66a85 Display error when settings can't load
Before, when an error occurred trying to load account settings,
the user would see a spinner until pressing the "go back" button manually.

With this commit, when an error occurs trying to load account settings,
an error dialog opens. Furthermore the "go back" button is activated automatically.
In particular, when the user closes the error dialog,
they find themselves back in the state they came from.
2019-10-17 18:54:48 +02:00
sonjita
69aa16fe5e Reduce number of typing events sent to server
Before, a typing event was sent to the server on every single key release.
A lot of sent typing events were redundant due to the timeout functionality
implemented in the matrix propocol for typing events.
With this commit, this overload of events sent to the server gets avoided by
only sending a new typing event, if the last one was sent more than three seconds ago.
2019-10-17 16:22:54 +00:00
Piotr Drąg
6580761f5c Update Polish translation 2019-10-14 16:07:55 +02:00
Daniel Mustieles
54e63ac2c4 Update Spanish translation 2019-10-14 06:54:16 +00:00
Alejandro Domínguez
696c2e526d AppOp: Change identity_url field type to Url 2019-10-12 18:50:39 +02:00
Alejandro Domínguez
cfa70a3396 AppOp: Change server_url field type to Url 2019-10-12 18:50:39 +02:00
Daniel García Moreno
8c56b17f0d Merge branch 'http_only_homeserver'
https://gitlab.gnome.org/GNOME/fractal/merge_requests/467
2019-10-12 12:39:28 +02:00
Alexandre Franke
2f65437657 message: add <br> for newlines 2019-10-12 10:31:47 +00:00
Alejandro Domínguez
54db180a28 GUI: Remove App/AppInner struct duplication 2019-10-12 09:43:43 +00:00
Damir Jelić
78a3ef7d0f login: Don't remove the Homeserver schema unconditionally.
The current Homeserver URL parsing logic unconditionally removes the URL
schema if it's either "http://" or "https://", then prepends
the "https://" schema back immediately after.

While this correctly adds a "https://" schema for an URL without a
schema, it disallows connections to a non-TLS host. Synapse, rightfully
so, disallows non-TLS connections. Connecting to such a host might be
desirable anyway to connect to a logging/debugging reverse proxy such as
mitmproxy or to connect to Pantalaimon, a reverse proxy that enables
client-transparent E2E encryption.

Closes: https://gitlab.gnome.org/GNOME/fractal/issues/520
2019-09-29 12:11:32 +02:00
Daniel García Moreno
81b3f52219 Make entry editable by default when no power_levels
For new rooms we're not receiving power_levels event, so we need to
assume that the user can write.

This is a quick fix to allow edit new rooms, but it could be better to
request power_levels to the backend when we've no this information so we
can disable the text entry if the user has no permissions to do that,
but without the information we should assume that the user is able to
write because it's the usual case.

Fix https://gitlab.gnome.org/GNOME/fractal/issues/539
2019-09-28 10:31:46 +02:00
Alejandro Domínguez
e964b5ec5e BKResponse, user: remove error variants and compose over Result instead 2019-09-25 17:49:04 +02:00
Alejandro Domínguez
07b7224612 BKResponse, sync: remove error variants and compose over Result instead 2019-09-25 17:49:04 +02:00
Alejandro Domínguez
a37d3a2ca7 BKResponse, room: remove error variants and compose over Result instead 2019-09-25 17:49:04 +02:00
Alejandro Domínguez
ebd60d48c2 BKResponse, register: remove error variants and compose over Result instead 2019-09-25 17:37:24 +02:00
Alejandro Domínguez
b3e487b559 BKResponse, media: remove error variants and compose over Result instead 2019-09-25 17:37:24 +02:00
Alejandro Domínguez
93431f5a27 BKResponse, directory: remove error variants and compose over Result instead 2019-09-25 17:21:00 +02:00
Alejandro Domínguez
61b631795c API, util.rs: remove cache_path(), use cache_dir_path() directly 2019-09-25 07:04:57 +00:00
Milo Casagrande
390c3605bc Add Italian translation 2019-09-23 08:31:54 +00:00
Bilal Elmoussaoui
c48bbaabef GSchema: fix schema path typo
This will cause a reset to all the user's settings.
2019-09-23 07:10:10 +00:00
Asier Sarasua Garmendia
69c089d9fb Update Basque translation 2019-09-22 16:46:40 +00:00