Commit graph

4769 commits

Author SHA1 Message Date
Nicolas Werner
868342ffc9
Allow swiping between views in single page mode
Allows access to spaces on mobile for example
2021-12-06 23:38:39 +01:00
Nicolas Werner
b2b9cccb5e
Fix a few clang tidy warnings 2021-12-06 22:22:37 +01:00
Thulinma
9996411d15 Added window role to image overlay 2021-12-05 12:08:43 +01:00
Weblate
f36b3836a6 Translated using Weblate (Dutch)
Currently translated at 100.0% (612 of 612 strings)

Co-authored-by: Jaron Viëtor <jaron@v8or.nl>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/nl/
Translation: Nheko/nheko
2021-12-05 00:13:12 -05:00
Nicolas Werner
6760397f6c
Fix sanitizer warning about signed shifts 2021-12-04 02:43:33 +01:00
DeepBlueV7.X
c7a29d1fb0
Merge pull request #833 from Bubu/clion_suggestions
Go through some CLion (clazy, clang-tidy) suggestions in InputBar{cpp.h}
2021-12-03 02:06:49 +01:00
Weblate
dfc510129f Translated using Weblate (Esperanto)
Currently translated at 99.8% (611 of 612 strings)

Co-authored-by: Tirifto <tirifto@posteo.cz>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/eo/
Translation: Nheko/nheko
2021-12-02 20:02:37 -05:00
Weblate
7b50c4ad2c Translated using Weblate (French)
Currently translated at 100.0% (612 of 612 strings)

Co-authored-by: Eldred HABERT <stuff@eldred.fr>
Translate-URL: https://weblate.nheko.im/projects/nheko/nheko-master/fr/
Translation: Nheko/nheko
2021-12-02 20:02:37 -05:00
Marcus Hoffmann
a01bc14db6 InputBar: run clang-format 2021-12-03 01:54:43 +01:00
Marcus Hoffmann
a9d8059fb2 InputBar: Mark some functions as [[nodiscard]]
This warns when you the return value of those functions isn't used.

Suggested-by: Clang-Tidy: Function X should be marked [[nodiscard]]
2021-12-03 01:37:00 +01:00
Marcus Hoffmann
9676b7709d InputBar: mark constrictor as explicit
Suggested-By:

Clang-Tidy: Single-argument constructors must be marked explicit to
avoid unintentional implicit conversions

More info: https://clang.llvm.org/extra/clang-tidy/checks/google-explicit-constructor.html
2021-12-03 01:37:00 +01:00
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