Commit graph

2287 commits

Author SHA1 Message Date
Nicolas Werner
d8ead9573b
Reduce allocations using QStringLiteral 2021-12-29 04:52:52 +01:00
Nicolas Werner
a3c4ebc460
use more literals 2021-12-29 00:36:43 +01:00
Nicolas Werner
f3e1941612
Add clazy to CI 2021-12-29 00:17:37 +01:00
Nicolas Werner
5743a6de04
Cleanup remaining clazy issues 2021-12-28 23:22:01 +01:00
DeepBlueV7.X
e7664a43da
Merge pull request #855 from rnhmjoj/master
Make nheko usable without a secret storage service
2021-12-28 21:51:35 +00:00
Nicolas Werner
0e9b0c80cd
more cleanups 2021-12-28 22:36:49 +01:00
Nicolas Werner
bb290f9fec
Fix more warnings and remove dead code 2021-12-28 22:30:12 +01:00
Nicolas Werner
409ff22d80
Remove unused button class 2021-12-28 20:14:42 +01:00
Nicolas Werner
5ca98829f7
Some qt6 prep 2021-12-28 20:09:08 +01:00
Nicolas Werner
2866826356
Misc clang-tidy fixes 2021-12-28 19:12:15 +01:00
Nicolas Werner
960cf2995e
Fixup clang-tidy suggestion 2021-12-28 18:44:26 +01:00
DeepBlueV7.X
5a21029423
Merge pull request #853 from MTRNord/MTRNord/clang-tidy
Apply selective clang-tidy suggestions
2021-12-28 17:36:20 +00:00
tastytea
850d139e3d
Make custom emoticons twice as high as the font. 2021-12-27 23:16:26 +01:00
tastytea
5ac1195402
MxcImageProvider: Only use scaledToHeight if width <= 0. 2021-12-27 22:59:51 +01:00
tastytea
7086e23bdd
Request inline images in the right size and anti-alias them
- If an inline image has specified a height, add parameters to the
  image:// URI.
- Add scaled to the parameters, the images would be cropped otherwise.
- Extract the height from image:// URI and use it for requestSize.
- Use scaledToHeight instead of scaled.
2021-12-27 22:47:51 +01:00
MTRNord
7b2f7e65fd Run linter 2021-12-27 20:49:27 +01:00
Nicolas Werner
7742f12f30
Use body in alt text of custom emoji 2021-12-27 19:08:13 +01:00
rnhmjoj
9363f0b7c7
Make nheko usable without a secret storage service
This change adds the ability to run Nheko without a secrets storage
service[1]. The secrets are stored in plaintext under the [secrets]
section of nheko.conf. Since this is a "I know what I'm doing" type
of feature, it's disabled by default and can only be enabled with an
hidden setting `run_without_secure_secrets_service=true`.

Fixes issue #705.

[1]: https://freedesktop.org/wiki/Specifications/secret-storage-spec
2021-12-27 10:45:46 +01:00
Nicolas Werner
0897e4c062
Fix inclusion condition for overriden pack types 2021-12-27 06:40:47 +01:00
Nicolas Werner
ea6b19b307
Add an ugly custom emote completer using ~ 2021-12-27 06:23:36 +01:00
MTRNord
049613211a Apply (selective) Clang-tidy const function and new const pointer suggestions on TimelineModel 2021-12-23 02:55:25 +01:00
MTRNord
a872bdf8c5 Apply (selective) Clang-tidy move and some new detected const pointer suggestions on TimelineModel 2021-12-23 02:46:33 +01:00
MTRNord
02fcd0e7cf Apply (selective) Clang-tidy and clazy suggestions on TimelineModel 2021-12-23 02:33:46 +01:00
Nicolas Werner
eb1e54c8df
Make edits replace the previous notification on Linux 2021-12-22 00:18:56 +01:00
Nicolas Werner
1ea9dc469b
Use global threadpool 2021-12-21 15:57:46 +01:00
Nicolas Werner
8edc46dc16
Cleanup jdenticon code in the same way as blurhashes 2021-12-21 15:06:34 +01:00
Nicolas Werner
04cccb8283
Cleanup blurhash formatting 2021-12-21 12:34:52 +01:00
Nicolas Werner
d424145ee4
Modernize blurhashprovider implementation
Might fix #844

See
https://code.qt.io/cgit/qt/qtdeclarative.git/commit/examples/quick/imageresponseprovider/imageresponseprovider.cpp?h=5.15&id=b1f238568214e6587b829d6695677e55a99b1d40
for context.
2021-12-21 12:17:12 +01:00
Nicolas Werner
6be752e163
Set the app_id on wayland 2021-12-19 22:54:50 +01:00
Nicolas Werner
9b25ef3c0d
Set notification category 2021-12-19 09:36:00 +01:00
Nicolas Werner
c03e4c1261
Make Nheko show up in system notification settings on Linux
relates to #845
2021-12-19 09:35:59 +01:00
Nicolas Werner
09aded2bc8
Fix crash when receiving matrix uri
It seems like handling the message in a blocking manner is a no-go. I
have no idea how to fix that, so just use a queued connection for now...
(ASAN does not cooperate and just hides the crash D:)

fixes #842
2021-12-17 05:58:09 +01:00
DeepBlueV7.X
2ffd476e8f
Merge pull request #841 from LorenDB/qolImprovements
Quality-of-life improvements
2021-12-16 01:15:21 +01:00
Nicolas Werner
6d69248109
Strip space chars from recovery passphrase 2021-12-15 18:26:14 +01:00
Joseph Donofry
cce5d0534f
Use icns on macOS 2021-12-14 17:05:48 -05:00
Loren Burkholder
45b150fb58 make lint 2021-12-13 19:08:54 -05:00
Loren Burkholder
c09c0d35b8 Make opening room members from rooms settings dialog work 2021-12-13 19:08:54 -05:00
DeepBlueV7.X
0a3e647509
Merge pull request #835 from Thulinma/imagewindowrole
Added window role to image overlay
2021-12-14 01:02:47 +01:00
Nicolas Werner
d46e517e3a
Only show room pack button, when you can actually create one 2021-12-13 23:25:42 +01:00
Nicolas Werner
9b9d4bec70
Fix turnserver check not being started when restoring from cache 2021-12-13 18:32:54 +01:00
Nicolas Werner
bb600dd3d1
Show some avatar for image packs 2021-12-13 06:00:32 +01:00
Nicolas Werner
dae032172d
Add recently used reactions
fixes #435
2021-12-13 00:43:05 +01:00
Nicolas Werner
89e58f78f1
Fix a few shadowing warnings
fixes #824
2021-12-11 06:19:54 +01:00
Nicolas Werner
75b112f0c8
Support pinned messages
fixes #519
2021-12-11 06:10:41 +01:00
Nicolas Werner
cf31fff5fe
Fix blurry thumbnails AGAIN 2021-12-08 23:10:19 +01:00
Nicolas Werner
6367d94623
Fix lint 2021-12-08 02:44:58 +01:00
Nicolas Werner
07b5f0805f
Fix display of images, that can't be thumbnailed 2021-12-08 02:43:08 +01:00
Nicolas Werner
30791f7890
Get rid of threadpool for images 2021-12-08 02:43:03 +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
Nicolas Werner
6760397f6c
Fix sanitizer warning about signed shifts 2021-12-04 02:43:33 +01: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
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
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
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
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
c4ea429273
fix lint 2021-11-24 05:26:46 +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
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
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
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
Nicolas Werner
34a1b6267b
Make user colors a bit more vibrant 2021-11-19 23:58:20 +01: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
57fb0d79f9
Fix colors and alignment in dialogs 2021-11-18 22:33:45 +01:00
Loren Burkholder
8830ce25d1 Don't add a user twice 2021-11-16 18:40:48 -05:00
Loren Burkholder
b1c1274d96 Allow removing users from the invite dialog 2021-11-16 18:40:48 -05:00
Loren Burkholder
f3aeb4b044
Switch icon theme to Fluent icons 2021-11-17 00:37:26 +01:00
DeepBlueV7.X
be53fd9b00
Merge pull request #812 from Nheko-Reborn/jdenticon-packaging
Jdenticon packaging
2021-11-15 14:29:06 +01:00
Nicolas Werner
61d2d1c665
Support exif rotation on received videos
fixes #674
2021-11-15 03:36:30 +01:00
Nicolas Werner
715e2244b4
Cleanup qt-jdenticon loading 2021-11-15 01:23:15 +01:00
Nicolas Werner
0a6ac211f1
Fix being dropped into an empty room after a join 2021-11-14 22:39:42 +01:00
Nicolas Werner
d26fe37010
Disallow displaynames with only spaces or control characters 2021-11-14 17:37:19 +01:00
Nicolas Werner
38e3498978
Prevent edits from removing quotes at the beginning of a message 2021-11-13 03:21:42 +01:00
Nicolas Werner
b0530089ab
Fix some colors switched to yellow by accident 2021-11-13 03:21:42 +01:00
Nicolas Werner
1ab4d35579 Merge branch 'video_player_enhancements' into 'master'
Video player enhancements

See merge request nheko-reborn/nheko!15
2021-11-12 00:19:25 +00:00
Nicolas Werner
d6f4f3a647
Fix secrets status not shown after startup 2021-11-11 21:40:23 +01:00
Nicolas Werner
a99eff7c0c
Fix SSO login showing password prompt 2021-11-11 20:20:15 +01:00
Nicolas Werner
f9362c75cf
Fix no replies being rendered for edits sent from Element in encrypted rooms 2021-11-11 00:41:21 +01:00
Joseph Donofry
c68c8de74f
Merge remote-tracking branch 'nheko-im/master' into video_player_enhancements 2021-11-09 18:34:40 -05:00
Nicolas Werner
d11fcb0ff6
Fix parsing some exotic image packs 2021-11-09 20:22:02 +01:00
Joseph Donofry
c93a7b2435
Merge remote-tracking branch 'nheko-im/master' into video_player_enhancements 2021-11-08 18:32:19 -05:00
Nicolas Werner
c4c13a1da9
Fix redaction of edited messages 2021-11-08 19:32:14 +01:00
Nicolas Werner
ff560a09f5
Improve fetching of device keys after login 2021-11-08 17:01:22 +01:00
Nicolas Werner
809be93e20
Fix self verification status never updating 2021-11-07 21:27:58 +01:00
Nicolas Werner
7de24a4271
Don't try to load verification status before db is ready 2021-11-07 20:27:56 +01:00
Nicolas Werner
5ca1fb18bb
Move away from using an event loop to access secrets
Fixes messages in room flickering and being stuck

fixes #760
relates to #770
relates to #789
2021-11-07 03:52:57 +01:00
Nicolas Werner
d112d6b11f
Fix crash when clearing empty timeline 2021-11-06 00:40:39 +01:00
Nicolas Werner
410ec00848
Fix crash in debug code for matrix uri handler
fixes #776
fixes #590
2021-11-04 23:10:03 +01:00
Joseph Donofry
4bd0ec8939
Fix syntax issue 2021-11-03 23:54:51 -04:00
Joseph Donofry
8e433a7ed2
PlayableMediaMessage fixes on macOS 2021-11-03 23:06:32 -04:00
Nicolas Werner
373e124bf7
Fix translation nits 2021-11-04 01:10:56 +01:00
Nicolas Werner
e1b9a0c619
Update translations 2021-11-03 23:44:55 +01:00
Nicolas Werner
1a163f49e2
Fix unjoinable invites on mobile as well as unclickable previews 2021-11-03 22:35:54 +01:00
Nicolas Werner
211fd9d76c
Fix registration on matrix.org
This was a bit of a journey:
https://github.com/matrix-org/matrix-doc/pull/3471
But it should work now and we now use the UIAHandler everywhere.

fixes #670
2021-11-03 18:39:51 +01:00
Joe Donofry
e3002f7993 Fix macOS m.image notif crash 2021-11-03 02:42:19 +00:00
Nicolas Werner
a9dde2ef68 Merge branch 'macos_api_updates' into 'master'
Update macOS notifications to use UserNotifications framework

See merge request nheko-reborn/nheko!13
2021-11-02 01:33:36 +00:00
Joseph Donofry
912df2920e
Update macOS notifications to use UserNotifications framework 2021-11-01 20:48:51 -04:00
Nicolas Werner
ae121f6021
Clear @room warning after sending message
fixes #751
2021-11-02 00:41:07 +01:00
Nicolas Werner
12832b3c64
Fix loading spinner when switching to a fully loaded room
fixes #754
2021-11-02 00:28:39 +01:00
Nicolas Werner
8beeba8e48
Fix hidden spaces hiding themselves
fixes #745
2021-11-02 00:15:58 +01:00
Nicolas Werner
417cc07172
Fix crash on logout 2021-11-01 22:35:48 +01:00
Nicolas Werner
2aabe9dcac
Prompt user when there are unverified devices 2021-11-01 22:20:15 +01:00
Nicolas Werner
5688b2647e
Add self verification after login 2021-10-30 00:23:07 +02:00
Thulinma
662cb573e1 Allow changing device names, display last seen time and IP 2021-10-20 18:31:57 +02:00
Nicolas Werner
2902bbb7e7
Fix calculating hidden space children 2021-10-20 15:05:00 +02:00
Nicolas Werner
2981f71d22
lint using clang11 2021-10-17 17:33:59 +02:00
Nicolas Werner
6793bdf3fd
lint 2021-10-17 17:20:51 +02:00
Nicolas Werner
147dc9d4da
Use allow list for URI schemes 2021-10-17 17:18:14 +02:00
Nicolas Werner
a5030bdd4d
move device verification management to its own file 2021-10-17 17:18:14 +02:00
Nicolas Werner
550c80525a
Move voip and encryption stuff into their own directories 2021-10-17 17:18:14 +02:00
Thulinma
649c5ff86d Add support for listing devices that do not support encryption, add support for logging out devices.
Ticks off another box in #23!
2021-10-17 00:00:14 +02:00
Loren Burkholder
14488a8fe7 Use the same leave room dialog everywhere
This ports the leave room dialog to QML, everywhere. There are now no differences between the various leave dialogs.
2021-10-11 19:00:40 -04:00
Loren Burkholder
cd39e015d4 Remove unimplemented function declaration 2021-10-11 18:57:36 -04:00
DeepBlueV7.X
088765b427
Merge pull request #741 from LorenDB/qmlJoinRoomDlg
QML the join room dialog
2021-10-11 19:53:17 +00:00
DeepBlueV7.X
281d764aa3
Merge pull request #755 from Nheko-Reborn/bootstrapping
Support bootstrapping crosssigning
2021-10-09 23:35:09 +00:00
Loren Burkholder
e9ed12e27b QML the join room dialog 2021-10-09 17:14:33 -04:00
DeepBlueV7.X
7eb9071b50
Merge pull request #743 from LorenDB/qmlLogout
QML the logout dialog
2021-10-09 20:57:38 +00:00
Loren Burkholder
2f7ce48666 make lint 2021-10-09 16:48:30 -04:00
Nicolas Werner
ad1e6c8298
Support bootstrapping crosssigning
Showing the bootstrap state and showing there are unverified devices is
still missing.
2021-10-09 05:01:53 +02:00
DeepBlueV7.X
569606f35b
Simplify device list refresh logic 2021-10-07 20:01:55 +02:00
Nicolas Werner
47db1e5c65
Remove duplicated verification status calculation 2021-10-07 19:55:27 +02:00
Thulinma
456a41bcdf Added support for refreshing the device list, marking current device with a checkmark instead of a lock 2021-10-06 22:52:19 +02:00
Loren Burkholder
81406171a0 QML the logout dialog 2021-10-05 20:12:24 -04:00
Nicolas Werner
4dd5f9841d
Add additional check for invalid megolm sessions 2021-10-04 21:46:31 +02:00
Loren Burkholder
a6c3e3562c Fix some strings and translation stuff 2021-10-01 12:29:54 -04:00
Thulinma
94441e68fd Support pasting image/svg+xml format straight from supporting applications 2021-09-28 01:42:35 +02:00
Thulinma
c4b788917f Fixes for pasting images, especially under windows where the image mime type detection doesn't work as expected 2021-09-28 00:54:00 +02:00
Thulinma
6941c3d3d7 Fix --help and --version command line options when Nheko is already running. Also adds an info message when it sends a URI to another instance 2021-09-28 00:45:00 +02:00
Joseph Donofry
526c1cdcc4 Add Unicode 14.0 emoji 2021-09-25 02:19:44 -04:00
Nicolas Werner
a54f828fb4
Fix a few verification typos 2021-09-20 01:15:51 +02:00
Nicolas Werner
cfca7157b9
Change indentation to 4 spaces 2021-09-18 00:45:50 +02:00