Commit graph

3858 commits

Author SHA1 Message Date
Marcus Hoffmann
8aa4a60d12 InputBar: use X.empty() instead of !X.size()
Suggested-by:

Clang-Tidy: The 'empty' method should be used to check for emptiness instead of 'size'
2021-12-03 01:37:00 +01:00
Marcus Hoffmann
abcbcecac1 InputBar: use auto type
Suggested-by:

Clang-Tidy: Use auto when initializing with new to avoid duplicating the type name
2021-12-03 01:37:00 +01:00
Marcus Hoffmann
313bd649dd InputBar: use multi-arg string replacement
This could actually change the behaviour here (could, because I don't
know if we can hit this special case) but this should hopefully the
correct way of doing this.

There's some detailed explanation of the difference here:
https://doc.qt.io/qt-5/qstring.html#arg-14

> This is the same as str.arg(a1).arg(a2), except that the strings
> a1 and a2 are replaced in one pass. This can make a difference if
> a1 contains e.g. %1:

```
QString str;
str = "%1 %2";

str.arg("%1f", "Hello");        // returns "%1f Hello"
str.arg("%1f").arg("Hello");    // returns "Hellof %2"
```

Suggested-by:

Clazy: Use multi-arg instead
2021-12-03 01:37:00 +01:00
Marcus Hoffmann
02aa87590b InputBar: use character argument instead of string
Suggested-by:

Clang-Tidy: 'find' called with a string literal consisting of a
single character; consider using the more effective overload
accepting a character
2021-12-03 01:37:00 +01:00
Marcus Hoffmann
6d8d38490a InputBar: apply clang-tidy const reference suggestions
All suggested by:

Clang-Tidy: The parameter 'X' is copied for each invocation
but only used as a const reference; consider making it a const reference
2021-12-03 01:37:00 +01:00
Marcus Hoffmann
abf4b3a0a3 InputBar: use QFileInfo::exists()
Suggested by:

Clazy: Use the static QFileInfo::exists() instead. It's documented to be faster.
2021-12-03 01:37:00 +01:00
Marcus Hoffmann
5441ea8840 InputBar: remove unused imports 2021-12-03 01:37:00 +01:00
Marcus Hoffmann
b7213ab179 add clion/idea dir to gitignore 2021-12-03 01:37:00 +01:00
Nicolas Werner
943a20fc37
Navigate to subspaces by clicking on them 2021-12-02 03:53:12 +01:00
Weblate
2a3492be69 Translated using Weblate (Finnish)
Currently translated at 92.9% (569 of 612 strings)

Co-authored-by: Priit Jõerüüt <nhkwlate@joeruut.com>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/fi/
Translation: Nheko/nheko
2021-12-01 04:17:36 -05:00
Weblate
fcd5977c5d Translated using Weblate (Estonian)
Currently translated at 100.0% (612 of 612 strings)

Co-authored-by: Priit Jõerüüt <nhkwlate@joeruut.com>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/et/
Translation: Nheko/nheko
2021-12-01 04:17:36 -05:00
Nicolas Werner
b774a671da
Remember all the collapsed trees 2021-12-01 03:46:55 +01:00
Nicolas Werner
aa5d2098d0
Don't waste space for non existing subspaces 2021-12-01 00:46:02 +01:00
Nicolas Werner
fee2f5c701
Don't pad, just fill 2021-12-01 00:33:22 +01:00
Nicolas Werner
65152252a4
Leaves can't collapse 2021-12-01 00:24:57 +01:00
Nicolas Werner
fe49beb68e
Hide me underneath the space tree 2021-12-01 00:04:01 +01:00
Nicolas Werner
b505fa42d5
Fix crash on redactions without because 2021-11-29 14:55:40 +01:00
Weblate
0d43eb1e11 Translated using Weblate (English)
Currently translated at 100.0% (606 of 606 strings)

Co-authored-by: Joseph Donofry <rubberduckie3554@gmail.com>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/en/
Translation: Nheko/nheko
2021-11-29 04:35:16 -05:00
Nicolas Werner
6266c917c0
Cleanup error logging a bit 2021-11-29 06:20:43 +01:00
Nicolas Werner
6779f0e509
Delete rooms even if we fail to leave 2021-11-29 06:06:51 +01:00
Nicolas Werner
a703e6f041
Remove double padding on redactions 2021-11-29 03:10:35 +01:00
Nicolas Werner
a5bfc833e4
Fix source translation 2021-11-29 02:01:28 +01:00
Nicolas Werner
87d99779eb Merge branch 'redaction_updates' into 'master'
Change QML UI for redactions

See merge request nheko-reborn/nheko!16
2021-11-29 00:59:58 +00:00
Joe Donofry
b920f8d7ca Change QML UI for redactions 2021-11-29 00:59:57 +00:00
Nicolas Werner
bd020bb473
If the locale is set to C, force english locale
This fixes date formatting as well as count based translations.
2021-11-27 03:16:53 +01:00
Nicolas Werner
eb6320862e
Use old flatpak runtime to prevent crashes on arm 2021-11-27 02:15:14 +01:00
Weblate
a9941c902b Translated using Weblate (Italian)
Currently translated at 43.0% (261 of 606 strings)

Co-authored-by: Elia Tomasi <elia.tomasi@pm.me>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/it/
Translation: Nheko/nheko
2021-11-25 00:36:17 -05:00
Nicolas Werner
0620632d6a
Properly fix #825
We should read the message before sending the ack!
2021-11-24 05:42:31 +01:00
Nicolas Werner
c4ea429273
fix lint 2021-11-24 05:26:46 +01:00
Nicolas Werner
07e187d4d8
Fix crash in SingleApplication when other end exits immediately
In those cases the emit might cause the server to remove the connection
and we are working with a dangling pointer. We can't call putChar on
that, so acknowledge the message immediately and then emit the message.
2021-11-24 05:21:30 +01:00
Nicolas Werner
ff502f306c
Initialize client lazily
This prevents a use after free in the coeurl logging, if we exit immediately.
2021-11-24 05:20:27 +01:00
Nicolas Werner
bf68aa28d8
Fix loading on Gnome when in flatpak
See https://gitlab.gnome.org/GNOME/libsecret/-/issues/49

fixes #816
2021-11-24 04:53:12 +01:00
Nicolas Werner
5bc9d885de Merge branch 'more-random-colors' into 'master'
Use a more random hash to generate user colors

See merge request nheko-reborn/nheko!17
2021-11-24 03:42:49 +00:00
Nicolas Werner
2324d2de05
Fix colors of sidebar in replies 2021-11-24 04:09:22 +01:00
Nicolas Werner
0f2faff4e7
Use a more random hash to generate user colors
Fixes an issue where most uses just had their color determined by their
username length and distributes the colors a bit more evenly.
2021-11-24 01:33:22 +01:00
Nicolas Werner
aea7461cba
Fix one more wrong background color 2021-11-22 22:16:55 +01:00
Nicolas Werner
a13f492e7d
Make clang-format <13 and clang-format >=13 behave the same
I think old clang-format is just buggy in those cases, so we should
reenable those blocks, once everyone has 13 or up.
2021-11-22 00:33:43 +01:00
DeepBlueV7.X
b1092c0f2f
Merge pull request #822 from Nheko-Reborn/dm-filter
Add a filter for direct chats
2021-11-21 22:46:51 +01:00
Nicolas Werner
71d7ff3a90
Try to tame Windows headers
See also:
https://stackoverflow.com/questions/1394910/how-to-tame-the-windows-headers-useful-defines
2021-11-21 21:19:56 +01:00
Nicolas Werner
70592911a1
Return nullopt for state events in rooms we are not in 2021-11-21 20:10:43 +01:00
Nicolas Werner
e7d4aec6ec
Only mark as direct, if invite was direct 2021-11-21 07:06:37 +01:00
Nicolas Werner
3d92e8ae60
Mark rooms as direct chats
Either by accepting an invite or manually using /converttodm and revert
with /converttoroom.
2021-11-21 06:13:45 +01:00
Nicolas Werner
4dc5b647c6
Pretty error printing 2021-11-21 06:10:24 +01:00
Nicolas Werner
5ef3250994
Add a filter for direct chats
fixes #317
2021-11-20 22:48:04 +01:00
Weblate
a6e633cdab Translated using Weblate (French)
Currently translated at 100.0% (606 of 606 strings)

Co-authored-by: Mayeul Cantan <mayeul.cantan@gmail.com>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/fr/
Translation: Nheko/nheko
2021-11-20 06:05:59 -05:00
Nicolas Werner
97aadee01c
Pass correct background color to username separator 2021-11-20 00:32:03 +01:00
Nicolas Werner
34a1b6267b
Make user colors a bit more vibrant 2021-11-19 23:58:20 +01:00
Joseph Donofry
44cd873c12
Update macOS icon package to macOS-y style. Thanks quinn 2021-11-19 17:36:57 -05:00
Nicolas Werner
b439e1fa41
Preliminary gstreamer 1.20 compatibility
The transceiver was made private in
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2241

The direction property was added here:
28b0be4036
2021-11-19 18:19:16 +01:00
Nicolas Werner
c0b2e8f9b7
Fix jdenticon plugin not loading 2021-11-19 02:50:20 +01:00