Compare commits

...

4562 Commits

Author SHA1 Message Date
James Graham
6d2fda878c Fix the Timeline Feezes.
This was caused whe TextComponent was changed from a TextEdit to a TextArea for the rich chat bar. This causes freezing for ..... reasons. Changin it back fixes the freezes.

The upshot of this is we now have to implement placeholder text ourselves. So I copied how it is done in TestArea in QQC2 desktop style with some minor logic changes for us.
2026-02-28 17:06:30 +00:00
l10n daemon script
150b9c4038 GIT_SILENT Sync po/docbooks with svn 2026-02-28 01:48:45 +00:00
James Graham
7550b2b000 Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Tobias Fella <fella@posteo.de>
2026-02-27 14:15:30 +00:00
James Graham
daa66c4abc Treat all text in a code block as plain, i.e. don't format based on markdown. 2026-02-27 14:15:30 +00:00
James Graham
e0b229e040 Focus the charbar when clicking the reply button. 2026-02-27 13:29:04 +00:00
James Graham
c07db82552 When completing treat all text as plain so don't upgrade to markdown. 2026-02-27 13:06:26 +00:00
l10n daemon script
4c1301da51 GIT_SILENT Sync po/docbooks with svn 2026-02-27 01:49:53 +00:00
l10n daemon script
adf0544eb0 GIT_SILENT made messages (after extraction) 2026-02-27 00:43:33 +00:00
Tobias Fella
44ec1e3529 Cleanup logging in RoomListModel 2026-02-26 23:41:20 +01:00
Tobias Fella
7cfac2151e Cleanup logging in TimelineMessageModel 2026-02-26 23:41:20 +01:00
Tobias Fella
3f577adf34 Cleanup logging in MessageContentModel 2026-02-26 23:41:20 +01:00
Tobias Fella
0375ef99a5 Clean up chatbarcache 2026-02-26 23:41:18 +01:00
James Graham
23c0bdb647 Improve the label for showing the rich text controls and tell users what pressing enter will do. 2026-02-26 19:51:40 +00:00
James Graham
611374d4dd Fix funny behaviour when pasting. basically we should start but not end a cursor edit block. 2026-02-26 19:26:26 +00:00
James Graham
c3ea0db82d Make sure that the clickable area of the chatbar fill the whole space 2026-02-26 17:44:40 +00:00
Tobias Fella
eb58d96d77 Remove duplicate regexes 2026-02-26 16:04:35 +00:00
Tobias Fella
9cad195704 Fix many clazy warnings 2026-02-26 14:52:14 +00:00
James Graham
c08693c508 Fix the parsing of the chat cache so the lists are no longer broken and add tests. 2026-02-26 06:15:42 +00:00
James Graham
7f91c57945 Make sure that when a heading is fully deleted the style is returned to paragraph 2026-02-26 06:08:14 +00:00
l10n daemon script
8b9e470907 GIT_SILENT Sync po/docbooks with svn 2026-02-26 01:48:01 +00:00
Darshan Phaldesai
63ddfb6cb8 SendBar: make overflowWidth bigger.
also fix initial state for rich text button
2026-02-25 22:26:27 +00:00
Darshan Phaldesai
ce84562829 chatbar: make emojidialog dynamically loaded 2026-02-25 22:26:27 +00:00
Darshan Phaldesai
7eda07d788 chatbar: remove redundant code 2026-02-25 22:26:27 +00:00
Darshan Phaldesai
3105fb8aa8 chatbar: move richtext back to main chat 2026-02-25 22:26:27 +00:00
Darshan Phaldesai
e3fdcb8779 chatbar: move emojis back to main panel 2026-02-25 22:26:27 +00:00
leia uwu
594018b188 restore window maximized state on toggle
Otherwise the window will have a maximized size but not maximized state after toggling it from system tray
2026-02-25 14:33:50 +00:00
l10n daemon script
774eb6a505 GIT_SILENT Sync po/docbooks with svn 2026-02-25 01:50:06 +00:00
l10n daemon script
f9a6533ca9 GIT_SILENT made messages (after extraction) 2026-02-25 00:46:42 +00:00
Azhar Momin
c804b9ce14 Send typing notifications from ChatBar again 2026-02-24 22:03:46 +00:00
James Graham
d1acb97fe2 - Make sure that when adding characters before/after a link that it doesn't take the link style
- Make sure that when double clicking a link with a space the whole text is selected
- Make sure that shift selection with arrows works
- Make sure that ctrl left right (word jump) moves across the whole link even if multiple words
2026-02-24 16:54:57 +00:00
James Graham
0a99e90591 Treat links as a single character for the purposes of delete, backspace, left and right.
When backspacing at a link the first key selects the whole link the second deletes. Similar for delete, left and right.
2026-02-24 16:54:56 +00:00
James Graham
c6313d2951 Hook sending messages back up 2026-02-24 16:54:56 +00:00
James Graham
d2d48110cb Use the rich text char format to store mentions rather than a separate structure in ChatBarCache.
This removes mentions from ChatBarCache and instead sets mentions as an anchor using the QTextCursor. Saving and restoring the chatbar text content is then done using QTextDocumentFragments which retain the rich text formatting.
2026-02-24 16:54:48 +00:00
l10n daemon script
a235f39c84 GIT_SILENT Sync po/docbooks with svn 2026-02-24 01:47:14 +00:00
l10n daemon script
8e1303edbe GIT_SILENT made messages (after extraction) 2026-02-24 00:44:31 +00:00
l10n daemon script
f66acb5f78 GIT_SILENT Sync po/docbooks with svn 2026-02-23 01:46:24 +00:00
l10n daemon script
0fe4ae82ea GIT_SILENT made messages (after extraction) 2026-02-23 00:44:25 +00:00
James Graham
8e516422b7 Make sure the default menu of textArea isn't thrown for non editable TextComponents.
Note: I know this is horrible but it's all we got until discussions in QQC2-Desktop-Style are resolved.
2026-02-22 18:07:27 +00:00
l10n daemon script
1dc566f9a9 GIT_SILENT Sync po/docbooks with svn 2026-02-22 01:48:38 +00:00
l10n daemon script
cdfda55ac1 GIT_SILENT made messages (after extraction) 2026-02-22 00:45:12 +00:00
Joshua Goins
a27c8971b9 Fix TimelineEnd/TimelineBeginning models properly this time
Amends 3b00e14a9d with a fix that's more
sensible, as we need to take into account the various checks before
mindlessly inserting roles.
2026-02-21 12:41:55 -05:00
Tobias Fella
b7688d4373 Remove dependency on KStatusNotifierItem
We had two implementations of the system tray icon for no particularly good reason
2026-02-21 17:09:22 +00:00
James Graham
73e6a536db Make sure that we only insert a new block for headers. This makes sure that hitting return in a list just adds the next list item. 2026-02-21 14:42:02 +00:00
Joshua Goins
a60d6c4a60 Add report buttons to spaces
This allows you to report harmful spaces that you already joined in,
similar to the current UX for rooms.

Note that you can't report subspaces or rooms within said spaces yet,
that requires hover actions (or ideally a context menu) that don't exist
yet.

See #707
2026-02-20 23:28:16 -05:00
l10n daemon script
b49ce25246 GIT_SILENT Sync po/docbooks with svn 2026-02-21 01:49:38 +00:00
l10n daemon script
6c52cccf20 GIT_SILENT made messages (after extraction) 2026-02-21 00:44:35 +00:00
Joshua Goins
1eba52bb7a Add a way to block invites from all users
This is a useful safety feature, not just for people under attack but
also if you have no use for this feature. Currently this is gated for
servers that support Matrix CSAPI 1.18.

Fixes #662
2026-02-20 18:57:21 -05:00
Joshua Goins
3b00e14a9d Fix the TimelineEnd delegate not appearing when going back in history
It was possible to make this appear if you switched rooms while you had
all history loaded, but now it should show up naturally.
2026-02-20 18:38:45 -05:00
Joshua Goins
f6abbda1e3 Don't claim this is "the beginning of the chat" if a predecessor exists
This could be percieved as confusing since we show a nice blue banner
saying where to find the previous conversation.
2026-02-20 18:38:45 -05:00
Tobias Fella
2d0fa43f4f Minor refactoring 2026-02-21 00:26:31 +01:00
Tobias Fella
502e300d5f Remove leftover warning 2026-02-21 00:17:54 +01:00
Joshua Goins
b7ea6f265e Fix-up ImageComponent's hide media functionality
The Z-level for the "Hide media" and other overlay controls were lost
during the rich text refactor, and now restored. I also made it so the
blurhash is now used when the media is hidden, and when hiding media it
no longer allows you to jumpscare yourself by maximizing the media when
you probably didn't actually want to.

When the media doesn't have blurhash, it falls back to black.
2026-02-20 16:02:49 -05:00
James Graham
5f0f9135fe Stop pester in console when changing rooms regarding missing authors. 2026-02-20 17:45:28 +00:00
Tobias Fella
b0dce5fd0a Fix TimelineEndDelegate and SuccessorDelegate 2026-02-20 17:28:17 +00:00
Tobias Fella
2c5bef6e96 Close pinned message when leaving room
BUG: 516350
2026-02-20 17:04:04 +00:00
Tobias Fella
aaaaf91248 Don't try opening last room when this room is not available
When switching connection to a connection that is not loaded or where we have left the last room, trying to resolve it will not do anything, causing the room from the previous connection to stay open
2026-02-20 16:08:25 +00:00
Tobias Fella
7e3db19ead Require libQuotient 0.9.5 2026-02-20 15:32:41 +00:00
Tobias Fella
f0ea5d1e90 Disable FreeBSD CI 2026-02-20 15:22:41 +01:00
Tobias Fella
d2a6d8e447 Fix opening QR code 2026-02-20 12:46:58 +01:00
l10n daemon script
57c20d4c5a GIT_SILENT Sync po/docbooks with svn 2026-02-20 02:06:24 +00:00
l10n daemon script
d7d348322f GIT_SILENT made messages (after extraction) 2026-02-20 00:45:13 +00:00
Joshua Goins
ae9b2abdc7 Reduce layout shift when loading mutual rooms in user profiles
Instead of making the visibility of this section in user profiles
dependent on the model, its now checking if you can check mutual rooms
and using a busy indicator. There's also a label for when you have no
rooms in common, which is a rare case (for example, banned or left
users.)
2026-02-19 18:11:03 -05:00
Joshua Goins
3a964bae20 Move more security and safety-relevant options to a better suited page
This includes the "show link previews", and "enable typing
notifications" options. I also re-arranged the Security & Safety page
into more sensible groups, and in preparation for more invite options.
2026-02-19 18:09:16 -05:00
Joshua Goins
4078d3f2dc Remove attach dialog
This was used when you pressed the "Attach file/image" button but had an
image copied to your clipboard - allowing you to select from either
source. This is a weird thing to ask, the button should always prompt
you with a file dialog.

It's still possible to paste an image from your clipboard with CTRL+V,
but there isn't a way to do it via right-click yet.

Fixes #712
2026-02-19 17:17:00 -05:00
Joshua Goins
53989ff4fe Improve messaging around various encryption key options
Element has landed on calling these "recovery keys" and we should do the
same. Since these have had various names throughout the years and in
previous versions of NeoChat, they are still mentioned.

I also renamed "Secret Backup" to "Key Storage" which is also Element
terminology.
2026-02-19 17:10:27 -05:00
Azhar Momin
2d33cbf6b1 Show thread root event instead of latest thread event 2026-02-19 16:34:33 -05:00
Azhar Momin
b42a82a455 Fix segfault in ContentProvider
QCache in ContentProvider handles cleanup for ThreadModel.
Setting NeoChatRoom as parent for ThreadModel caused it to
be deleted outside of QCache control leading to a double-free.
2026-02-19 16:34:33 -05:00
l10n daemon script
99aed0993e GIT_SILENT Sync po/docbooks with svn 2026-02-19 01:51:57 +00:00
l10n daemon script
7ede740aa8 GIT_SILENT made messages (after extraction) 2026-02-19 00:45:31 +00:00
Darshan Phaldesai
7137b60da9 compactLayout: add spacing around messages and chatbar 2026-02-18 12:08:05 -05:00
l10n daemon script
30462ddebb GIT_SILENT Sync po/docbooks with svn 2026-02-18 01:55:53 +00:00
Joshua Goins
428a196f8d Disable send message when there's nothing to actually send
Now there's a way to check if the message content model has any useful
data inside of it.

BUG: 516118
FIXED-IN: 26.04
2026-02-17 12:16:09 -05:00
l10n daemon script
2d2291fd78 GIT_SILENT Sync po/docbooks with svn 2026-02-17 01:47:55 +00:00
l10n daemon script
646f5476c3 GIT_SILENT made messages (after extraction) 2026-02-17 00:44:41 +00:00
Joshua Goins
03382496b9 Fix tooltip and checked state of message overflow button
This was incorrectly labeled as "Format Text" during the rich text
refactor, but this is for attaching stuff to messages.

I also fixed the checked state not resetting when the menu was closed.

BUG: 516117
BUG: 516119
FIXED-IN: 26.04
2026-02-16 19:11:04 -05:00
Tobias Fella
52302f0f5c Fix binding loops 2026-02-17 00:06:58 +01:00
Joshua Goins
b1595a4556 Ensure most of our dialogs have cancel buttons on the right
This is standard for KDE dialogs, but we weren't super consistent about
it. Most of this is porting to DialogButtonBox, and using buttonRole. I
also made sure the close button is hidden in cases where we have a
cancel button already.

I also took the time to clean out some cruft like manually calling
close() and such. I probably missed a lot more spots, but this is a good
improvement.
2026-02-16 16:31:10 -05:00
Joshua Goins
436b3a1008 Use the same spacing in chat bar as we do for messages
This fixes the odd spacing around some components like replies,
especially after d2aa8d672d.
2026-02-16 21:13:17 +00:00
Joshua Goins
44ff2daad2 Remove unwanted padding from TextComponent
This fixes the padding for TextComponent as well, which was needed
post-rich text refactor.
2026-02-16 21:13:17 +00:00
Volker Krause
9f64457521 Optimize compile time of emoji data maps
Compiling the two files including the emoji data now doesn't take
significantly longer anymore than before. Size of the .text section
also drops by more than 1Mb, while runtime or memory cost remains
unchanged.

There's more that could be done here, but not having to wait minutes
for those files to build is worth it on its own already.
2026-02-16 14:38:14 -05:00
James Graham
d2aa8d672d Remove unwanted padding from ReplyComponent 2026-02-16 19:09:39 +00:00
Joshua Goins
942221b59f Don't attempt to navigate to a component that doesn't exist
Check for the size of our component list before trying to access it.

BUG: 516107
FIXED-IN: 26.04
2026-02-16 13:46:25 -05:00
James Graham
7e6b79d5d4 Release threads removing the feature flag.
This mr performs some final cleanup to make sure the threads are sized correctly and it all works with the new chatbar
2026-02-16 11:16:32 -05:00
Darshan Phaldesai
85b731e9fb TypingPane: fix spacing between elements 2026-02-16 11:16:05 -05:00
James Graham
38b3e65618 Make sure that when we post a message we refocus the now empty chatbar 2026-02-16 07:28:54 +00:00
James Graham
89e5a605c4 Basically we were applying the default values onComponentComplete therefore overriding any user value.
This patch applies the default on creation before properties are set so the user can now override.
2026-02-16 06:39:34 +00:00
James Graham
a438173403 Change the behaviour of chatmarkdownhelper to only work when a single character is added.
This is because if pasting a link for example * or _ could be treated as formatting. We now assume that any pasted text is done as plain text and is wanted as is.
2026-02-16 06:17:57 +00:00
l10n daemon script
98a224ebdf GIT_SILENT Sync po/docbooks with svn 2026-02-16 01:48:30 +00:00
l10n daemon script
7b8576e203 GIT_SILENT made messages (after extraction) 2026-02-16 00:45:45 +00:00
Joshua Goins
f1b5ad7392 Allow focusing and navigating the space drawer with a keyboard
CCBUG: 511591
2026-02-15 08:03:37 -05:00
Joshua Goins
78beb9ffff When favoriting/reprioritizng a room, make sure to re-sort the list
This fixes some odd issues like newly favorited rooms being sent to the
bottom of the room list, and so on.
2026-02-15 08:03:37 -05:00
Joshua Goins
431dbf6457 Stop tree view from attempting to expand sections too early
This fixes a consistent bug for me, where the expandRecursively call
(somehow) predates the room list being populated. Which resulted in some
or all sections being collapsed on start-up.
2026-02-15 08:03:37 -05:00
l10n daemon script
e1b267622d GIT_SILENT Sync po/docbooks with svn 2026-02-15 01:53:30 +00:00
James Graham
47a8221f53 Fix rebase issues and restore mic button 2026-02-14 20:12:21 +00:00
James Graham
c554c40b3b Fix markdown helper test 2026-02-14 19:53:05 +00:00
James Graham
0341da5868 Cleanup chatkeyhelp and tests 2026-02-14 19:53:05 +00:00
James Graham
c5457a893f Fix tests 2026-02-14 19:53:05 +00:00
James Graham
9f6853f771 Make sure that char format is properly maintained for multiple formats when swithching to quote and back 2026-02-14 19:53:05 +00:00
James Graham
526cb07840 Note where nestedlisthelper has been changed 2026-02-14 19:53:05 +00:00
James Graham
dcc394677e Restore image editor 2026-02-14 19:53:05 +00:00
James Graham
a9a73ab24d Disallow event menu in edit mode 2026-02-14 19:53:05 +00:00
James Graham
2289dbb3fe Restore placeholder messages 2026-02-14 19:53:05 +00:00
James Graham
7758175334 Don't allow links when rich formatting is diabled 2026-02-14 19:53:05 +00:00
James Graham
c79753716c Don't follow link in the chatbar 2026-02-14 19:53:05 +00:00
James Graham
3aa4a915b1 Fix cancel reply 2026-02-14 19:53:05 +00:00
James Graham
60cf12524f Improve images in the chatbar
- Don't show the hide button
- Shrink them to better fit
- Allow a little more maxh height in the chatbar for attachments
- Make sure that the button states work properly when adding and removing images
2026-02-14 19:53:04 +00:00
James Graham
f02366ee48 Improve file attachments
-Don't show download and save in chatbar
-Add a remove button
-Add missing properties to model
2026-02-14 19:53:04 +00:00
James Graham
13d7f9b322 Make sure that the style menu shows the right style name for code and quote.
Also when in quote mode the valid styles are now transformed to how they look in quote to show they are valid. Clicking quote style again in a quote block will return to paragrpah style from heading now
2026-02-14 19:53:04 +00:00
James Graham
7afce01a23 Fold extra send icons when thin for mobile 2026-02-14 19:53:04 +00:00
James Graham
0d1f5c950d Change link button tooltip text to Edit link when a link already exists 2026-02-14 19:53:04 +00:00
James Graham
690bc0d385 Revert to Paragraph format after a heading 2026-02-14 19:53:04 +00:00
James Graham
c32235ffe3 Improve application of text formats from buttons.
- If the bar is empty they are now applied as normal
- If there is a selection or the cursor is next to a word it is applied to it.
- If there is no selected text and no word it is applied properly to the next char
2026-02-14 19:53:04 +00:00
James Graham
dff6ab66f1 Comment updates 2026-02-14 19:53:03 +00:00
James Graham
80047acf87 Improve the code for completions 2026-02-14 19:52:46 +00:00
James Graham
234d823366 Really reenable editing messages, don't just do half a job. 2026-02-14 19:52:46 +00:00
James Graham
a3cd0c0e8d Fix memory leak 2026-02-14 19:52:46 +00:00
James Graham
cad90d0c4c Reenable message edits 2026-02-14 19:52:46 +00:00
James Graham
6e28ada1a4 Fix room switch so that if there is no saved text the user ends up with an empty chatbar 2026-02-14 19:52:46 +00:00
James Graham
007ebbc003 Fix merge issues 2026-02-14 19:52:46 +00:00
James Graham
289c6c4f20 Fix delete when selecting text 2026-02-14 19:52:45 +00:00
James Graham
39573c1650 Make the scroll bar of the chat bar move properly as you type. 2026-02-14 19:52:45 +00:00
James Graham
b7a329c199 Fix reply component 2026-02-14 19:52:45 +00:00
James Graham
6b318ec754 Update the look of the chatbar to be floating with the rich text controls on top and send buttons inline 2026-02-14 19:52:45 +00:00
James Graham
79de8a792c Simplify and fix chat markdown helper and add additional tests 2026-02-14 19:52:45 +00:00
James Graham
b45ded678e Fix multi line quotes 2026-02-14 19:52:45 +00:00
James Graham
f4cb660422 Disallow formatting when there is an attachment and when adding one if there is rich formatting warn the user it will be removed and remove if they accept. 2026-02-14 19:52:45 +00:00
James Graham
d64e6fc206 Change editing so that going up or down from a code or quote a para will be added if one doesn't exist so that the block can te typed around 2026-02-14 19:52:45 +00:00
James Graham
d0abfe60f9 Restore missing functionality 2026-02-14 19:52:45 +00:00
James Graham
d10fe4a684 Add more tests 2026-02-14 19:52:45 +00:00
James Graham
9ea76ca5d0 Move the remaining functionality of ChatDocumentHandler to ChatTextItemHelper or split into own objects 2026-02-14 19:52:45 +00:00
James Graham
22d7d90cf4 Separate ChatButtonHelper from ChatDocumentHandler 2026-02-14 19:52:45 +00:00
James Graham
45163944d0 Add tests for ChatMarkdownHelper and rework how formats are applied to make it more robust. 2026-02-14 19:52:45 +00:00
James Graham
f31e9062e6 Move ChatDocumentHandler to use QmlTextItemWrapper and create test 2026-02-14 19:52:45 +00:00
James Graham
416d85af3b Spearate completion from ChatDocumentHandler 2026-02-14 19:52:44 +00:00
James Graham
02bed79265 Fix link insertion 2026-02-14 19:52:44 +00:00
James Graham
aadc441686 Add qml test for chatdocumenthandler 2026-02-14 19:52:44 +00:00
James Graham
4db1e1c437 Add automatic markdown formatting 2026-02-14 19:52:44 +00:00
James Graham
11bf741554 Improve the style picker 2026-02-14 19:52:44 +00:00
James Graham
c128450cf5 Add ChatBarMessageContentModel and hook up 2026-02-14 19:52:43 +00:00
Tobias Fella
9cbe9f7280 Start implementing rich-text editor 2026-02-14 19:45:15 +00:00
James Graham
1f723d1fdf Allow replying to messages within a thread 2026-02-14 14:07:48 -05:00
Tobias Fella
b88e27d6d5 Refactor NeoChatRoom a bit 2026-02-14 12:23:50 -05:00
Joshua Goins
4e616d53b2 Fix the emoticon editor page
It wasn't possible to edit the shortcode or description anymore, because
signals weren't hooked up. I also added a separator to help separate
some of these controls visually.
2026-02-14 12:23:31 -05:00
Joshua Goins
57b6dbcbde Don't open room-specific profile in account menu
This should be your main profile, since visually and functionally this
is "outside" the current room.

Since the workaround is a bit estoeric, I added a comment so I remember
why I did this later.
2026-02-14 12:23:20 -05:00
Joshua Goins
49646c63f8 Improve read marker delegate, add button to mark as read
I added an icon to the read marker (to help distinguish it from
text-heavy chat rooms), and fixed up the padding. I also find myself
reaching to right-click rooms often to mark them as read, so why not do
this from the read marker itself?
2026-02-14 12:23:10 -05:00
Joshua Goins
9d2a427619 Improve the search pages, especially in error and searching states
Someone hit a nasty bug while attempting to find a KDE room on the
kde.org server, the error wouldn't come up normally and the dialog would
be blank. That's because that specific placeholder message doesn't
appear until you type something into the search field, which is weird.

There is a few other oddities with SearchPage that I squashed, including
showing the loading placeholder in more appropiate situations.
2026-02-14 11:04:29 -05:00
Tobias Fella
593ad27e8c Implement sending voice messages 2026-02-14 11:04:22 -05:00
Joshua Goins
3d07f723c8 Make member list sorted a bit more efficient
I don't have any hard numbers on what difference this makes, but it's
definitely a positive improvement. I noticed and fixed a few issues that
were made more glaring by recent changes in libQuotient:

1. Room::memberJoined is called during the historical loading or
whatever, when we only need that *after* stuff is settled.
2. We really don't need to sort the room's members immediately - it's
only relevant when UserListModel is used (and I think this was previous
behavior?) So now its done lazily.
3. We do not want to call Room::effectivePowerLevel willy-nilly. It may
become a more expensive lookup, and it's also varying levels of wasteful
depending on which sorting algorithm the STL uses. It doesn't cost much
for us to keep a temporary cache for the lambda function to use.
2026-02-14 09:55:05 -05:00
Joshua Goins
d47a4eb0de Fix weird scrolling behavior in room list
You may have noticed that the room list acts a bit... odd. You usually
can't scroll all the way down with a scrollwheel, it just
stops. It's possible to continue a little bit more with the scrollbar.
And sometimes the scrollbar doesn't know how big it's actually supposed
to be, commonly occuring when switching from a large room list to a
smaller one.

I narrowed it down the same usual problem with views in QtQuick:
variable sized delegates! Using GammaRay I figured out that for the
delegates currently in use they're slightly different: 46 pixels for
regular room delegates, 42 pixels for section headers and the "Find your
Friends" button was also different.

*Technically* TableView (and by extension TreeView) is supposed to allow
variable-sized delegates, and we should be able to advertise that with
rowHeightProvider. I tried a bunch of different solutions and none of
them worked reliably, so I took the usual sledgehammer approach of
making all of the delegates the same size.

This fixes all of the obvious bugs with the room list I could see, with
the one visual downside of making the section headers slightly taller.
But since I spent some time improving the tap targets, this is only a
visual change and not a functional one.

I also made sure to test it in compact mode, and everything shrinks as
expected.
2026-02-14 09:54:42 -05:00
l10n daemon script
11f8407ef7 GIT_SILENT Sync po/docbooks with svn 2026-02-14 01:52:45 +00:00
Joshua Goins
e4c9230c09 Re-settle the timeline view when replying to messages
Or changing the height of the chatbar in other ways, which I'm sure is
going to become more common with our new rich text system.
2026-02-13 19:58:40 -05:00
Joshua Goins
318432d561 Fix undefined reference in Bubble
This tends to spam the logs while loading/unloading timelines.
2026-02-13 19:58:19 -05:00
Joshua Goins
afa699381b Change loading delegate to animated progress bar
Gives a nicer visual indication instead of static text, in my opinion.
2026-02-13 19:58:19 -05:00
l10n daemon script
244ef77c4a GIT_SILENT Sync po/docbooks with svn 2026-02-13 01:47:10 +00:00
Joshua Goins
847db41fb3 Hide rooms with custom defined types in quick switcher
This matches the behavior in other room lists. I also tried to normalize
the constructor with SortFilterRoomTreeModel.
2026-02-12 16:33:22 -05:00
Joshua Goins
115d4e7466 Reduce the tap target of RoomTreeSection
For some reason I don't understand, the ItemDelegate used for these
sections are ginormous. There is quite a bit of padding which confuses
users as its unexpectedly used for the tap area.

I changed it so we only listen for taps inside of the contentItem
itself, which is a more suitable area.
2026-02-12 07:29:45 -05:00
Joshua Goins
346d311909 Replace 👀 with ❤️ in the quick reactions bar
I personally use this emoji more than the other, and have seen it more
in the wild too.
2026-02-12 07:29:33 -05:00
Joshua Goins
cff27ca7db Add user ID to the account editor page
For some reason this was never featured here, and it's always useful to
have another place to check and/or copy this ID.
2026-02-12 07:29:20 -05:00
Joshua Goins
35daae6b5d Replace "Show QR Code" in account menu with "Open Profile" action
When you just want to share or view your own profile, the UX has proven
to be a bit confusing. You could try to scroll to find a previous
message of yours, or hopelessly go down the rabbithole of settings (none
of which provide a copyable user ID currently.) Lets cut down on the
slack by providing a way to instantly open your profile from anywhere.

This replaces the "Show QR Code" action because this is duplicative
within the profile itself.
2026-02-12 07:29:10 -05:00
l10n daemon script
94fb429c47 GIT_SILENT Sync po/docbooks with svn 2026-02-12 01:47:38 +00:00
Joshua Goins
9f4146e5b1 Fix the emoticon editor looking visually broken
We need to set a minimum width/height here since the Image isn't
technically loaded, when creating a new one.
2026-02-11 18:52:21 -05:00
Darshan Phaldesai
a9b4a900c9 Move notification button to UserInfo
Move notifications button to a more appropriate position next to username. It used to live in the room/spaces bar, which doesn't make sense context wise. Also the mobile view moves to a bottom navbar anyway.

This is just a copy-paste of the adjacent settings tool button with appropriate icon and callback.
2026-02-11 08:56:04 -05:00
Joshua Goins
18d7d2f736 Add a way to open settings on mobile again
This is visible on desktop, but wasn't accessible on mobile.
2026-02-11 08:55:08 -05:00
Joshua Goins
be65d506c4 Fix the mobile title sometimes disappearing
I was depending on an implicit connection property from somewhere.
2026-02-11 08:55:08 -05:00
Azhar Momin
f5d726989f Add support for copying & deleting multiple messages at once
BUG: 496458
2026-02-11 08:00:09 -05:00
l10n daemon script
0f634ff795 GIT_SILENT Sync po/docbooks with svn 2026-02-11 01:47:49 +00:00
Darshan Phaldesai
1289194b3f Messages: Make the Date/Timestamps more usable
Previously timestamps were in the right-hand side of the messages which made it very hard to relate timestamps with their corresponding messages. 
Moving them right next to the name makes much better UX wise (and surprisingly didn't make the UI too crowded). I have tested this in dark light and bubbles mode, and it all looks good and comfortable to me.

I have also tweaked how the timestamps are formatted. 
- For messages on the same day, it will skip the date part.
- For recent days, it uses relative timestamp (yesterday, XX:XX) 
- For everything before its shows short form date and time

The tooltip now uses Long Format of Date and Time.
2026-02-10 19:32:36 -05:00
Tobias Fella
8ca1b8b1d3 Adapt to libquotient api changes 2026-02-10 12:48:50 +00:00
Joshua Goins
793f81e733 Focus code and location chooser maximize components too
I did this for images a while back, but not for these. Otherwise you
can't press escape or perform other key navigation functions easily.

BUG: 515462
FIXED-IN: 25.12.2
2026-02-09 21:32:24 -05:00
Tobias Fella
4c31f42144 Fix type name for NeoChatDateTime
QML doesn't want it to start with an uppercase letter
2026-02-09 21:22:23 -05:00
Azhar Momin
6b664b0547 Fix context menu not appearing in room media scroll view
MessageDelegate calls model.findEvent(root.eventId), which existed in
MessageFilterModel but was missing in MediaMessageFilterModel. This adds
a findEvent() implementation to MediaMessageFilterModel so the context
menu works correctly in the media scroll view.
2026-02-09 21:09:37 -05:00
l10n daemon script
44f78353ab GIT_SILENT Sync po/docbooks with svn 2026-02-10 01:45:39 +00:00
l10n daemon script
3b2df95df7 GIT_SILENT Sync po/docbooks with svn 2026-02-09 01:43:37 +00:00
James Graham
8edb248647 Fix use after free in message delegate. We can't delete the incubator in the completed callback because it then returns to the incubator we just deleted. 2026-02-08 18:21:12 +00:00
l10n daemon script
07bc06f4ff GIT_SILENT Sync po/docbooks with svn 2026-02-08 01:44:05 +00:00
l10n daemon script
0d9988013b GIT_SILENT Sync po/docbooks with svn 2026-02-07 01:44:26 +00:00
Tobias Fella
c1720bbaa7 Fix various qml warnings 2026-02-06 14:45:03 +01:00
Tobias Fella
692ce82717 Fix minor warnings 2026-02-06 14:19:08 +01:00
Tobias Fella
ac04fa6a13 Fixes 2026-02-06 14:18:54 +01:00
Tobias Fella
39aaced0f9 Fix unqualified access 2026-02-06 14:17:55 +01:00
Tobias Fella
9887665560 Prevent shadowing 2026-02-06 14:17:20 +01:00
Tobias Fella
c590cb76a0 Use Application.layoutDirection 2026-02-06 14:14:31 +01:00
Tobias Fella
f9b0c56fa0 Prevent shadowing 2026-02-06 14:12:55 +01:00
Tobias Fella
aa7ab6b2ec Fix minor warnings 2026-02-06 14:12:24 +01:00
Tobias Fella
ac6a5663a1 Use required properties 2026-02-06 14:11:23 +01:00
Tobias Fella
f09dc79995 Remove unused import 2026-02-06 14:09:34 +01:00
Tobias Fella
693b2e74fe SupportDialog: Set ComponentBehavior 2026-02-06 14:07:08 +01:00
Tobias Fella
3a54d58516 Fix pageStack warnings 2026-02-06 14:05:23 +01:00
Tobias Fella
6abb117989 Set componentBehavior 2026-02-06 14:03:47 +01:00
Tobias Fella
b2dee6a96b Fix unqualified access 2026-02-06 14:02:41 +01:00
Tobias Fella
1e1ba1dca3 Cast qml object where necessary 2026-02-06 13:58:55 +01:00
Tobias Fella
55676b06c2 QrScannerPage: Prevent shadowing 2026-02-06 13:57:20 +01:00
Tobias Fella
513496cf85 Add translation context 2026-02-06 13:56:26 +01:00
Tobias Fella
69215401dd Use let instead of var 2026-02-06 13:55:45 +01:00
Tobias Fella
d5ec37e1af Fix some unqualified access warnings 2026-02-06 13:53:20 +01:00
Tobias Fella
6a45e2532c Prevent more shadowing 2026-02-06 13:50:40 +01:00
Tobias Fella
322926e31c Remove invalid anchors 2026-02-06 13:49:44 +01:00
Tobias Fella
29592a7f92 Prevent shadowing 2026-02-06 13:48:54 +01:00
Tobias Fella
8fc8baa2d2 Fix a few minor qml warnings 2026-02-06 12:53:07 +01:00
l10n daemon script
de7f2654f4 GIT_SILENT Sync po/docbooks with svn 2026-02-06 01:55:03 +00:00
l10n daemon script
ccf9ed66f8 GIT_SILENT Sync po/docbooks with svn 2026-02-04 01:55:11 +00:00
Azhar Momin
259c60f669 Fix barcode tooltip text
This was missed in e5a48bae01
2026-02-03 20:19:41 +05:30
l10n daemon script
2ca121ede9 GIT_SILENT Sync po/docbooks with svn 2026-02-03 01:50:48 +00:00
l10n daemon script
fba01c17ae GIT_SILENT Sync po/docbooks with svn 2026-02-02 01:46:05 +00:00
Joshua Goins
5de394b4b7 Don't scroll the timeline when reacting to messages
BUG: 515306
FIXED-IN: 25.12.2
2026-02-01 19:01:32 -05:00
Joshua Goins
edd64d9b8f Improve UserListModel performance and other preparations
In a future patch I want to add support for viewing banned/invited
users, and it's also been mentioned that UserListModel is quite slow
too.

The biggest cost is sorting the member list (power level and
alphabetically) and this happened in a few different ways:
* When the member list updated
* The user switches rooms
* Misc events such as the palette changing

But this was pretty inefficient, because internally Quotient::Room keeps
a list of members, and we kept re-sorting that same list. Our
connections were also too broad and despite having signals for members
joining and leaving we just reloaded the entire list anyway.

So my new solution is to keep the list persistently sorted in
NeoChatRoom, and reload that in UserListModel. This model also keeps
track of *all* members - including ones that left - which will be used
for the aforementioned feature. So UserFilterModel now filters out only
the joined members, and that will be configurable in the future.

I also added two new roles to UserListModel for membership and color
respectively (which makes some dead code useful again) and fixed us
overwriting the built-in Qt roles accidentally.
2026-02-01 17:43:53 -05:00
l10n daemon script
5c614e59f2 GIT_SILENT Sync po/docbooks with svn 2026-02-01 01:45:02 +00:00
Joshua Goins
853d48e768 Improve the structure of the welcome page slightly
I don't really like these pages in NeoChat much, there's only a few
buttons, and they really blend together. In an attempt to alleviate
this problem, I did the following:

* Added icons to the Login and Register actions, which does complement
the other buttons on this page.
* Removed the icons from the "Continue" and "Go back" buttons, which did
nothing but add confusing arrows.
* Moved the "Go back" button, fixed the capitalization and moved it to a
separate FormCard.
* Made it so the "Settings" button is only shown on the initial page, to
reduce the amount of UI clutter while logging in.
2026-01-31 13:18:23 -05:00
l10n daemon script
295ecf0f18 GIT_SILENT Sync po/docbooks with svn 2026-01-31 01:43:41 +00:00
l10n daemon script
7c0ab697d7 GIT_SILENT Sync po/docbooks with svn 2026-01-30 01:54:31 +00:00
l10n daemon script
75fceaccea GIT_SILENT Sync po/docbooks with svn 2026-01-29 01:55:50 +00:00
James Graham
275d221f75 Improve time handling in NeoChat
This introduces a new NeoChatDateTime object that wraps a QDateTime. The intent is that it can be passed to QML and has a series of functions that format the QDateTime into the various string representations we need.

This means we only have to send the single object to QML and then the correct string can be grabbed from there, simplifying the backend. It is also easy to add a new representation if needed as a function with a QString output and Q_PROPERTY can be added and then it will be available.
2026-01-28 16:16:40 +00:00
Joshua Goins
72416884d4 Add comment about push rule check in contextAwareNotificationCount()
I thought this was unnecessary as the push rules should take care of it
for us, but that's not entirely true. I added a comment to reflect this
reality.
2026-01-28 15:58:46 +01:00
Tobias Fella
537ce772af Remove leak in ChatDocumentHandler 2026-01-28 12:29:18 +00:00
Tobias Fella
37b8d8d813 Remove unused variables in linkpreviewertest 2026-01-28 12:29:18 +00:00
Tobias Fella
d64e22c270 Fix leak in actionstest 2026-01-28 12:29:18 +00:00
Tobias Fella
fa4533e757 Refactor ChatBarCacheTest 2026-01-28 12:29:18 +00:00
Tobias Fella
8b6f5447e1 Refactor NeoChatRoomTest 2026-01-28 12:29:18 +00:00
Tobias Fella
6dce1564b7 Fix memory leaks 2026-01-28 12:29:18 +00:00
Tobias Fella
7313386903 Enable lsan on CI 2026-01-28 12:29:18 +00:00
l10n daemon script
c0f5db7fd2 GIT_SILENT Sync po/docbooks with svn 2026-01-28 01:46:58 +00:00
Joshua Goins
551d827dee Use correct terminology when leaving space
BUG: 514888
FIXED-IN: 26.04
2026-01-27 12:05:42 -05:00
Joshua Goins
332a822996 Remove single tap to maximize code component
This is just more ergonomic (in my opinion) as you usually want to
select some text from a code block, instead of maximizing it. There's
already an easy-to-access button for maximizing if you want to.

BUG: 499048
FIXED-IN: 25.12.2
2026-01-27 12:05:22 -05:00
Joshua Goins
f145bbe8db Fix transparency blur not applying to the timeline anymore
We still had the default opaque background for RoomPage. I added a
comment too so it isn't removed accidentally in the future.

BUG: 513363
FIXED-IN: 25.12.2
2026-01-27 12:05:03 -05:00
l10n daemon script
381b119ad1 GIT_SILENT Sync po/docbooks with svn 2026-01-27 01:46:07 +00:00
Albert Astals Cid
b64dcdb004 GIT_SILENT Update Appstream for new release
(cherry picked from commit 4c4f406c41)
2026-01-27 02:13:43 +01:00
l10n daemon script
b33f1cf5e1 GIT_SILENT Sync po/docbooks with svn 2026-01-26 01:43:12 +00:00
James Graham
f22cafbce1 Revert "Improve time handling in NeoChat"
This reverts commit 92c58b0ea0.
2026-01-25 13:07:53 +00:00
James Graham
92c58b0ea0 Improve time handling in NeoChat
This introduces a new NeoChatDateTime object that wraps a QDateTime. The intent is that it can be passed to QML and has a series of functions that format the QDateTime into the various string representations we need.

This means we only have to send the single object to QML and then the correct string can be grabbed from there, simplifying the backend. It is also easy to add a new representation if needed as a function with a QString output and Q_PROPERTY can be added and then it will be available.
2026-01-25 13:04:58 +00:00
l10n daemon script
c797ecea3d GIT_SILENT Sync po/docbooks with svn 2026-01-25 01:44:45 +00:00
l10n daemon script
b65590a9b9 GIT_SILENT made messages (after extraction) 2026-01-25 00:44:24 +00:00
Joshua Goins
2bacbe7ac7 Improve the bottom mobile navigation bar
The previous set of actions seems like a random selection, how many
rooms is someone creating to be that important?

I have redone it to have way fewer actions, mostly notification and
settings.
2026-01-24 10:55:36 -05:00
Joshua Goins
74c12e89ea Improve other space button texts
Remove some extra verbiage, ensuring ellipses and so on.

CCBUG: 497044
2026-01-24 10:52:31 -05:00
Joshua Goins
02b95c921d Add ellipses to "Remove" button in space hierarchy
This can be somewhat unclear if NeoChat prompts you (it does!)

CCBUG: 497044
2026-01-24 10:52:31 -05:00
Joshua Goins
7f58ee3793 Improve space suggestions editing
This is confusing to users as there may be two "remove" icons, but one
of them is actually for suggestions.

BUG: 497044
FIXED-IN: 26.04
2026-01-24 10:52:31 -05:00
l10n daemon script
7312bf183d GIT_SILENT Sync po/docbooks with svn 2026-01-24 01:44:54 +00:00
Tobias Fella
40b7853338 Fix binding loop 2026-01-23 23:15:00 +01:00
Azhar Momin
ade5750550 Add a button to mark spaces as read
[BUG: 508122](https://bugs.kde.org/show_bug.cgi?id=508122)
2026-01-23 15:29:51 -05:00
l10n daemon script
fb8ee02e3b GIT_SILENT Sync po/docbooks with svn 2026-01-23 01:45:20 +00:00
Tobias Fella
8b27323488 Extend testing 2026-01-22 23:33:45 +00:00
Tobias Fella
96d24f5c3a Minor fixes to various models 2026-01-22 23:33:45 +00:00
Tobias Fella
45cee495a5 Adapt LineModel to being autotested 2026-01-22 23:33:45 +00:00
Tobias Fella
53dc9c1944 Use getter and setter for property in LiveLocationsModel 2026-01-22 23:33:45 +00:00
Tobias Fella
1fb215dae7 Add test that runs each model with a QAbstractItemModelTester 2026-01-22 23:33:45 +00:00
Tobias Fella
971875c8a2 PowerLevelModel: Use Qt::UserRole for role value
Otherwise it's equal to Qt::DecorationRole, which QAbstractItemModelTester expects to be convertible to certain types
2026-01-22 23:33:45 +00:00
Tobias Fella
9ad64b990d NotificationsModel: Don't crash if connection is nullptr
This can legitimately happen
2026-01-22 23:33:45 +00:00
Tobias Fella
1ceffe6a2e Start adapting to libquotient crypto api changes 2026-01-22 23:26:55 +00:00
l10n daemon script
9810b3dee0 GIT_SILENT Sync po/docbooks with svn 2026-01-22 02:00:17 +00:00
Tobias Fella
76954c162a NotificationsManager: Improve some comments
(as suggested by CLion)
2026-01-21 16:11:07 +00:00
Tobias Fella
0a7978f4f5 NotificationsManager: Improve function parameters 2026-01-21 16:11:07 +00:00
Tobias Fella
bf41e1083d NotificationsManager: Make a function static 2026-01-21 16:11:07 +00:00
Tobias Fella
593f772845 NotificationsManager: Minor refactoring 2026-01-21 16:11:07 +00:00
Tobias Fella
98a277ac63 const auto a few things 2026-01-21 16:11:07 +00:00
Tobias Fella
cfe5182a65 Remove redundant check 2026-01-21 16:11:07 +00:00
Joshua Goins
9ace01f74a Fix closeToYEnd check
The comparison operator was reversed, and this was seen with mark as
read being broken and buttons showing up at the wrong times.
2026-01-21 08:21:56 -05:00
l10n daemon script
4632a9f9bb GIT_SILENT Sync po/docbooks with svn 2026-01-21 01:49:34 +00:00
Azhar Momin
a92587cc50 Fix some typos 2026-01-20 17:42:51 +00:00
Tobias Fella
889b7dd2e6 Fix crash when logging out active connection 2026-01-20 14:40:57 +00:00
Tobias Fella
44fa196a26 Use QPointer to store room in WidgetModel 2026-01-20 14:05:30 +00:00
Tobias Fella
2bc8c6a379 Fix various qml warnings 2026-01-20 13:48:46 +00:00
l10n daemon script
3f1ba8d067 GIT_SILENT Sync po/docbooks with svn 2026-01-20 01:53:20 +00:00
Azhar Momin
a1c9b63d1e Fix emojis being too small in EmojiDelegate
BUG: 514170
2026-01-19 09:40:18 +00:00
l10n daemon script
73fdc72ce7 GIT_SILENT Sync po/docbooks with svn 2026-01-19 01:44:12 +00:00
Tobias Fella
08fc8be09c Cleanup README.md a bit 2026-01-18 22:51:55 +01:00
Carl Schwan
e5a48bae01 UserDetailDialog: Remove double QR code action
Now it's part of the header
2026-01-18 22:08:56 +01:00
Carl Schwan
581f5be410 UserDetailDialog: Improve consistency
Use same spacing and sizing as GroupChatDrawerHeader and add a QR code
to share the contact.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-18 21:58:34 +01:00
l10n daemon script
f4e857519b GIT_SILENT Sync po/docbooks with svn 2026-01-18 01:50:53 +00:00
Joshua Goins
93e932c09c Add hack to fix crash when sending long text reactions
This is some bug in Flow (that is really hard to debug, I can't get it
to exit at all) but we can work around it for a minor visual impact. It
seems to me allow the reaction list to become slightly larger, but
that's about it.

BUG: 504344
FIXED-IN: 25.12.2
2026-01-17 15:01:44 -05:00
Joshua Goins
3b8930c2bc Cleanup few remaining atYEnd usages in TimelineView
These were either mistakes or rebase errors, but we should be using
closeToYEnd here.
2026-01-17 13:49:40 -05:00
Joshua Goins
7e34570a05 Improve placeholder text for WidgetsPage
This shortens the text and adds an icon.
2026-01-17 13:49:29 -05:00
Joshua Goins
0b5de13c36 Improve Shared Location messaging
This changes the icon for the shared locations page, adds better
placeholder text and so on.
2026-01-17 13:49:29 -05:00
Joshua Goins
6eb2b2e739 Add hack to fix room sidebar not sticking to the top
This is similar to the TimelineView hacks, but this time its the header
item that's changing height as our room topics and such wrap.
2026-01-17 13:49:18 -05:00
Joshua Goins
be89362fdd Fix left padding for "Rooms" label in the room list
This now emulates the default Kirigami heading behavior now, with the
correct amount of padding.
2026-01-17 13:14:05 -05:00
Joshua Goins
e53c84d30c Fix Quick Switcher not being activatable by Enter/Return key 2026-01-17 13:13:52 -05:00
Joshua Goins
a90c26f566 Don't show the Share action for non-file messages
This only shares files, if you try it on anything else it crashes
NeoChat.
2026-01-17 13:13:43 -05:00
Darshan Phaldesai
c2ae5afa73 ReactionComponent: visual changes to make it look consistent 2026-01-17 12:19:46 -05:00
Joshua Goins
5f20a86b62 Reduce the amount of items in the account menu
The devices entry gone (not even Element has this) and so is the logout
action. The Switch account menu item is moved to the bottom so its
easier to access by mouse. The "Open Secret Backup" is moved under
Security settings where it lives next to the other crypto-related
settings.
2026-01-17 11:03:38 -05:00
l10n daemon script
f2d3c9706e GIT_SILENT Sync po/docbooks with svn 2026-01-17 01:44:32 +00:00
Joshua Goins
39de4d10e4 Add hack around the timeline never settling just right
This is due to some kind of bug in ListView that never resettles
properly for bottom-to-top views. This can arise when the pinned message
is loaded (because that squishes the view) or the window is resized
(because that also resizes the view.)

We can work around it by assuming the following:
1. The RoomPage knows the window is resizing because it gets its height
changed before TimelineView.
2. The first height change can be a marker to position the view at the
beginning.

This fixes the issue for me, I did the following in order to test this:
* Switch between many rooms, especially ones with a pinned message. Now
all of them start at the bottom as they should.
* Resize the window, ensure that if you scrolled it stays around that
position - otherwise it sticks at the bottom.
2026-01-16 18:34:05 -05:00
Joshua Goins
4c37dcf518 Improve reliability of restoring the last space and room (again)
I found that 50% of the time, NeoChat won't restore the last space but
instead get stuck at Home. Even worse, it will overwrite Home's last
opened room with the one from the space - resulting in really buggy
behavior.

The reason why this happens is partly due to the space hierarchy cache
(I think) but that's not the real problem in my opinion. During
setCurrentSpace, we needlessly update the last space & room config
despite us being the ones already reading it.

In addition to that I also refactored this code a bit to be more
consolidated and readable.
2026-01-16 18:14:07 -05:00
Joshua Goins
3c77711417 Add hack around atYEnd
This fixes the annoying "I just scrolled down to the bottom, how come
NeoChat doesn't think I did?"

From what I can tell this is also ListView bug (or something caused by
our style/Kirigami) that creates cases like contentY being -643.2 (for a
ListView of height 643) thus that's not "at Y's end". For our case
though, we don't care and can safely round it.
2026-01-16 17:07:03 -05:00
Yuri Chornoivan
136063bd37 Fix minor typo 2026-01-16 05:29:13 +02:00
l10n daemon script
730a9e97fd GIT_SILENT Sync po/docbooks with svn 2026-01-16 01:53:34 +00:00
Joshua Goins
d5260376d2 Support replying and editing messages directly from room search
There's two parts to making this work mainly:
1. Use getEvent instead of findInTimeline so the related event is
actually found.
2. Close the dialog once a reply relation is found, so you can easily
reply in the chat bar.
2026-01-15 20:13:50 -05:00
Joshua Goins
dc935e09b7 Use countedNotifications instead of our own calculations w/ DMs
This fixes an odd disconnect you can sometimes see when the notification
isn't an invite or a "direct chat notification", which conflicts with
what we use to control the tooltip and visibility.
2026-01-15 16:51:57 -05:00
Joshua Goins
5759f7d82b Add a way to view server support information
This is useful if your server has said information, for matrix.org
includes abuse and administrator e-mails.

See #707
2026-01-15 16:21:03 -05:00
Joshua Goins
ed4b77c184 Remove the three item hamburger menu, re-distribute remaining items
There are only three, somewhat odd menu items remaining in this menu.
(Two if you don't have a camera.)

* Find your Friends, which is already accessible in a few other places
and currently has dubious utility.
* Create a Room, which also is barely used and can be combined with the
Create Space button in the space drawer.
* Scan a QR code, which can be placed in the account menu. I know this
isn't the most ideal place, but I can't think of anything better at the
moment.
2026-01-15 16:18:57 -05:00
Tobias Fella
716ee2e494 When "always allow verifying devices" option is enabled, show a less confusing message in the devices page 2026-01-15 09:12:17 -05:00
Joshua Goins
c15860cac3 Give DelegateContextMenu an actual room
This allows me to hide the "Reply" action for read-only rooms. Don't ask
me how it even worked before, I don't know.
2026-01-15 09:00:35 -05:00
Joshua Goins
f5c991c55c Pass room through the model, not when creating the delegate
This is another thing that enables us to view multiple rooms in a single
timeline. Specifically, this improves the experience in room search
going across room versions and getting a correct readOnly status (for
hiding certain hover actions.)
2026-01-15 09:00:35 -05:00
Joshua Goins
41609749d8 Fix a crash when grabbing relationAuthor
There's a bug in how we're using this function in room search, but we
definitely don't want it to crash. The event is technically not in the
timeline, so we were dereferencing an invalid iterator or whatever.
2026-01-15 09:00:35 -05:00
Joshua Goins
644df80090 Don't show "Configure Web Shortcuts" if there are none
This prevents some weird edge cases where the Configure action is
visible, but nothing is actually searchable - like for images.
2026-01-15 09:00:23 -05:00
Joshua Goins
e3307326ef Close the message menu after selecting a quick reaction
And also ensure the "select an emoji" menu doesn't close the message
menu after *not* choosing an emoji, so it acts more like a submenu.
2026-01-15 09:00:13 -05:00
Joshua Goins
74d4e786d3 Clarify where reports are sent to
Contrary to popular belief (unfortunately) these reports are *only* sent
to your own server, which is then opaquely handled in some unknownable
way.

See #707
2026-01-15 09:00:02 -05:00
Joshua Goins
1e461658b8 Hide "Reply in Thread" message action if we don't have threads enabled 2026-01-15 08:16:41 -05:00
l10n daemon script
f305cb849f GIT_SILENT Sync po/docbooks with svn 2026-01-15 01:52:21 +00:00
l10n daemon script
e1bbbfe4fd GIT_SILENT Sync po/docbooks with svn 2026-01-14 01:44:13 +00:00
Kai Uwe Broulik
7a2211f8e0 RoomPage: Fix selected text and hovered link in context menu
They were not forwarded to the menu.
Also, "isThread" argument is no longer there in the signal.
2026-01-13 17:37:30 -05:00
Azhar Momin
4155e9116a Fix some runtime qml warnings 2026-01-13 17:35:02 -05:00
Azhar Momin
a989ef42b2 Fix pushDialogLayer failing in DelegateContextMenu 2026-01-13 17:35:02 -05:00
Joshua Goins
2babf44b28 Grab the correct room in MessageModel::data
Not all events that are processed in this model belong to the room, e.g.
searching through multiple room versions. Now the model finds the
correct room based on the reported room in the event.

This fixes searching through upgraded rooms, and unblocks searching
through multiple rooms in the future.
2026-01-13 09:25:49 -05:00
Joshua Goins
89e42dbc53 Decrypt when downloading single events from the server
This fixes issues like not being able to view pinned messages in
encrypted rooms.
2026-01-13 07:52:07 -05:00
l10n daemon script
ba57570dbf GIT_SILENT Sync po/docbooks with svn 2026-01-13 09:49:08 +00:00
Joshua Goins
1a500a087b Separate priviled members list, and more useful permissions
Having both the member list and permission controls is troublesome, and
scales the larger your moderation team is. We eventually may want to
manage banned/muted users too so I think it warrants having a new page.
I also moved the search field to the top so it's more accessible.

As for permissions, I tried to improve the UX generally while not
changing it too heavily. First the easy change is to the text, hopefully
the sections should be clearer (especially for "state" events.) The
bigger change here is the new sections, I tried to make it more useful
and organized. Additionally, I added more permissions like sharing live
locations and polls so they're more easily configurable.

One other change is that permissions are visible regardless of whether
you can set them or not, matching Element's behavior.
2026-01-11 21:14:15 -05:00
l10n daemon script
e54955ec0c GIT_SILENT Sync po/docbooks with svn 2026-01-12 01:55:14 +00:00
Joshua Goins
8608b3b62e Remove extra arguments in StateComponent's viewEventMenu call 2026-01-11 18:30:02 -05:00
Joshua Goins
fea0cfbf4e Fix opening message menus for popup windows
We were previously assuming that we always want to parent these menus to
RoomPage, but that only exists on the main window. If you tried to open
the menu for say - the search window - then it would confusingly still
open on the main menu.

Thankfully the way to fix this is simple, by passing a parent QtObject
around.
2026-01-11 18:30:02 -05:00
Joshua Goins
5b6e5a25e5 Allow opening message menus for out-of-room events
These are more common than we thought, good examples are pinned or
searched messages - which are not going to be in the room's history
unless you happen to have them loaded. But currently our message menu
infrastructure expects them to be, since its looked up by the room +
event ID.

To fix this is simple, we now move the job of finding the event to the
caller which may use a model instead. I didn't fix all existing
call-sites yet, mainly the message menu opening one since that was the
most obvious bug. But this opens up the door for other assumptions about
room history to be fixed too.

I had to do a bit of C++ re-jiggering in order to expose useful
functions to QML.
2026-01-11 18:30:02 -05:00
Joshua Goins
58b47b8711 Rename indexforEventId to indexForEventId
This is a simple change to ensure its properly camelCase.
2026-01-11 18:30:02 -05:00
Joshua Goins
b45967508c Fix reply colors being broken if you're faster than the server
This is that bug that causes reply colors to be white, and this error to
print in the log:

qrc:/qt/qml/org/kde/neochat/messagecontent/ReplyComponent.qml:41: TypeError: Cannot read property 'color' of null

The reason why this happens is inside of EventMessageContentModel, it
needs to be able to find the relevant event in the room to fetch the
room member (and then their color.) Dependent on many variables to
align, this can happen easily if you are faster than your server giving
you said events.

But this is an easy fix, we obviously get the event afterwards and just
need to re-evaluate the the author property. I also made sure it falls
back to some color instead of white, which will also quiet the error.
2026-01-11 16:27:44 -05:00
Lorenz Wildberg
2ec1fa92fa fix bug: room settings don't open 2026-01-11 16:08:57 +01:00
l10n daemon script
7602a56594 GIT_SILENT Sync po/docbooks with svn 2026-01-11 01:44:50 +00:00
Joshua Goins
e8da02be7d Add dialog to see who has read this message
You were previously relegated to looking at any avatars or a buggy
tooltip, but suffer no longer! If you tap on a message's read marker, a
dialog will pop up listing the users who have read it.

Uou can also view their profiles from here, etc.
2026-01-10 13:33:23 -05:00
Veres Károly
71c84be4b4 Null check decoded messages in loadPinnedMessage
`decryptMessage` returns null if it fails to decode the passed message. This value
then got fed into `EventHandler::richBody` which logged a warning and cleared `m_pinnedMessage`.
If we instead retain the value as an `EncryptedEvent`, the UI will pin the encrypted event
placeholder instead of hiding the existence of pins.
2026-01-10 14:48:09 +00:00
Veres Károly
b684fb451d Null check pinned messages after decryption when filling PinnedMessageModel.
`room()->decryptMessage()` returns null if the message fails to decode. Since elements of `m_pinnedEvents`
get directly dereferenced in getEventForIndex, storing null values leads to a segfault.
In this case we should retain the EncryptedEvent to let the UI report the error.
2026-01-10 14:48:09 +00:00
Joshua Goins
3a416990ca Make clicking room list section headers more reliable
ListSectionHeader itself is an ItemDelegate, which eats up input events.
We can work around this by also listening to onClicked there too.
2026-01-09 23:01:11 -05:00
Joshua Goins
9b7d16973d Improve the Advanced Room settings page more
I added a separator, made it so the "Copy Room ID to clipboard" button
is always shown, and made it more obvious that "Upgrade Room" prompts
you first.
2026-01-09 23:01:02 -05:00
Joshua Goins
dd59e63574 Refer to user's power level as "Power Level", not "Role"
This is a more accurate name for this.
2026-01-09 23:00:52 -05:00
Joshua Goins
7f7e48dfd4 Fix undefined references in UserDetailDialog
This can happen when viewing non-room profiles.
2026-01-09 23:00:52 -05:00
Joshua Goins
7119132e4b Add a way to add private notes for users on their profile
This is a common feature in other chat applications (like Discord) as a
way to keep track of important information. While there isn't a standard
API for this, we can use account data to store notes.
2026-01-09 21:06:10 -05:00
l10n daemon script
6001cc6d4f GIT_SILENT Sync po/docbooks with svn 2026-01-10 01:53:22 +00:00
l10n daemon script
989f1ad020 GIT_SILENT Sync po/docbooks with svn 2026-01-09 01:43:14 +00:00
l10n daemon script
a119563ba7 GIT_SILENT Sync po/docbooks with svn 2026-01-08 01:44:03 +00:00
Joshua Goins
5e473aae0a Avoid assert check when switching to main profile
This can happen if the user doesn't have an avatar set, as there's an
assert check inside of makeMediaUrl. We can avoid this by checking if
the string is empty before calling that.
2026-01-07 17:05:13 -05:00
Joshua Goins
aa0272a02d Remove some duplicate buttons from the room sidebar
The favorites action doesn't really deserve space here IMO, and that's a
pretty list-specific action you're more likely to do elsewhere.

For the Pinned Messages action that can be opened at the top on desktop,
but we still need it on mobile. So now it's selectively hidden based on
that.
2026-01-07 17:04:23 -05:00
Joshua Goins
fc6f345036 Small notification improvements
Changed a check to use isDirectChat (which is a clearer indication of
what we want.) I also made sure not to show the account name if you only
have one, since that's just useless noise.
2026-01-07 15:42:19 -05:00
l10n daemon script
4fa011c266 GIT_SILENT Sync po/docbooks with svn 2026-01-07 01:44:45 +00:00
l10n daemon script
44ebcc6b9a GIT_SILENT Sync po/docbooks with svn 2026-01-06 01:51:54 +00:00
Joshua Goins
32cc5d4e48 Allow switching between viewing main profiles and room profiles
Since Matrix allows users to have different profiles on a room and
"outside of room" level, it's nice to have the ability to switch between
them on-the-fly.
2026-01-05 09:52:31 -05:00
l10n daemon script
bbc5a92f62 GIT_SILENT Sync po/docbooks with svn 2026-01-05 01:51:29 +00:00
Joshua Goins
4656bf4ee7 Rename "Explore Rooms" dialog to just "Explore"
There's a bit of a discrepancy here, that directory will list both rooms
and spaces. I also removed duplicated titles where applicable.
2026-01-04 17:41:55 -05:00
Azhar Momin
5f7967363f Fix notification count refresh for low-priority and mentions-only rooms 2026-01-04 17:00:52 -05:00
Joshua Goins
a02a04d966 Fix icons on Windows
KirigamiApp currently calls KIconTheme::initTheme too late for Windows,
as a workaround we can go back to calling it ourselves.
2026-01-04 13:48:30 +00:00
l10n daemon script
dffec2f0d5 GIT_SILENT Sync po/docbooks with svn 2026-01-04 01:51:40 +00:00
Veres Károly
68b00b9fc5 Extract the space selection logic from setCurrentRoom and use it for setting lastRoomConfig too.
If a setCurrentRoom call changed the active space at the end of its execution, the new room's ID ended up still being written to the old space's lastRoomConfig.

By extracting this space selection logic into a helper function, we can now calculate this value earlier and use it as the space id when writing lastRoomConfig.
2026-01-03 07:42:56 -05:00
Heiko Becker
aa823c7629 GIT_SILENT Update Appstream for new release
(cherry picked from commit 321561fd89)
2026-01-03 12:14:48 +01:00
l10n daemon script
73b82b69d8 GIT_SILENT Sync po/docbooks with svn 2026-01-03 01:41:59 +00:00
Nate Graham
bd0588ca99 Improve hamburger menu button
- Open the menu right beneath the button
- Use pressed state for the button while the menu is open
- Close the menu when clicking the button again
- Hide the tooltip while the menu is open
2026-01-02 08:07:32 -07:00
l10n daemon script
e5b7601dac GIT_SILENT Sync po/docbooks with svn 2026-01-02 01:51:12 +00:00
l10n daemon script
f4ac3346f5 GIT_SILENT Sync po/docbooks with svn 2026-01-01 01:40:42 +00:00
Azhar Momin
58ea229b67 Add a button to cycle through unread highlights
BUG: 465095
2025-12-31 13:57:35 +00:00
l10n daemon script
fd44ff972a GIT_SILENT Sync po/docbooks with svn 2025-12-31 01:51:00 +00:00
l10n daemon script
c5eb63da15 GIT_SILENT Sync po/docbooks with svn 2025-12-30 01:49:46 +00:00
l10n daemon script
79acceb29a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-12-30 01:34:45 +00:00
l10n daemon script
8022a7aae5 GIT_SILENT Sync po/docbooks with svn 2025-12-29 01:42:10 +00:00
l10n daemon script
d26862dfb6 GIT_SILENT Sync po/docbooks with svn 2025-12-28 01:39:52 +00:00
l10n daemon script
c25c095c1b GIT_SILENT Sync po/docbooks with svn 2025-12-27 01:40:07 +00:00
Tobias Fella
e09e4fb7dc Modernize PropertyChanges 2025-12-26 18:58:28 +00:00
Tobias Fella
657c8a0dcd Fixes for v12 power levels 2025-12-26 18:30:46 +00:00
l10n daemon script
82f54b4f2c GIT_SILENT Sync po/docbooks with svn 2025-12-26 01:41:25 +00:00
Joshua Goins
9e7cd0eb09 Overhaul user profile UI
Our previous iteration is hitting some limitations as the power of
profiles on Matrix grows. For example, where do we put common rooms or
extra profile fields?

I re-arranged everything to group similar actions together - instead of
throwing it all into one big list. We basically trade vertical for
horizontal space, and gives us more headroom for extra fields when we
want to add more.
2025-12-25 12:34:21 -05:00
Joshua Goins
9bdb9b6a7c Improve wording around the various link preview options
In my opinion, the significance of these options was still not super
clear. It wasn't obvious that the setting under Appearance will disable
them globally, and that the per-room option was discoverable.

Another change was using the term "Link preview" instead of "URL
preview", which is more common verbiage in chat applications other than
Element.
2025-12-25 12:33:00 -05:00
Joshua Goins
fa4a93140d Fix not being able to view the DM's profile
This button was broken for a while, so now that's fixed.
2025-12-24 18:46:06 -05:00
Joshua Goins
a41966ecd7 Adjust text for the ignore user option in invitiations
We use the "ignore" terminology elsewhere, so saying "block" here is
kinda weird. I also made it clearer that this also rejects the invite,
in case that wasn't obvious.
2025-12-24 18:43:12 -05:00
Joshua Goins
edcf81f0da Add a few ways to open profile for inviting users
I recieved a few invites from unknown users, and I had no idea who they
were/came from. I could check their profile to see if we had any rooms
in common, but there was no way to actually check their profile!

This makes it possible to open their profile by clicking their avatar
(like elsewhere) but also adds a button to make it even more obvious.
2025-12-24 18:42:26 -05:00
l10n daemon script
0a98c732e0 GIT_SILENT Sync po/docbooks with svn 2025-12-24 01:50:27 +00:00
l10n daemon script
d734e114a6 GIT_SILENT Sync po/docbooks with svn 2025-12-23 01:41:20 +00:00
Joshua Goins
946e505a24 Add missing supportsMatrixSpecVersion QML function
This was rebased out or something in 197d7ce8e8
2025-12-22 16:31:42 -05:00
Joshua Goins
092980c0ff Shorten room subtitles for direct chats
Direct chats by their very nature is between two users, and you usually
can keep track of who said what. There's no point in including the
sender's name here, and most other chat applications exclude it for this
reason (including Element X.)
2025-12-22 15:02:24 -05:00
Joshua Goins
6fcb1cc1e3 Fix assumption about unstable feature reporting
The key can be in the unstable features list, but it can be false. This
stops some features showing up and hitting API that isn't actually
implemented.
2025-12-22 07:26:27 -05:00
Olivier De Cannière
c572480d10 cmake: Explicitly link in neochatplugin and use qt_* cmake commands
The QML code of the various QML modules is compiled to C++ by
qmlcachegen and then compiled into the final binary. Unfortunately, in
the current setup, the plugin for the org.kde.neochat QML module is not
linked into the app because qmlimportscanner can't find usages of it. No
generated C++ code for that module is then run and the QML is
interpreted from its bytecode instead.

This is likely due to the project not following recommended QML
structure and because it is not using qt_* variants of certain cmake
commands. It should not be necessary to link against the plugins
manually.

As a quick fix, link against the plugin explicitly and use qt_*
variants of cmake commands to help qmlimportscanner and to pick up the
existing C++ code.
2025-12-22 11:11:35 +01:00
Joshua Goins
531df7a3b2 Send beautiful red ❤️'s when quick reacting
I wondered for a while (and could tell) when people were using NeoChat
because they would react with cold, monochrome hearts. Let's add more
color to our world!
2025-12-21 13:57:59 -05:00
Veres Károly
706f1f7836 Fix missing escape sequence in /shrug command
Before the fix, the upper arm _ characters in the command's output would be parsed as Markdown italic formatting around the (ツ).
2025-12-21 15:03:00 +01:00
l10n daemon script
45c5806c5a GIT_SILENT Sync po/docbooks with svn 2025-12-19 01:42:17 +00:00
l10n daemon script
abf37c90cb GIT_SILENT Sync po/docbooks with svn 2025-12-18 01:41:35 +00:00
Jimmy Bergström
5d9508b165 Hide quick format bar when selection is cleared
I noticed a bit of an annoying behavior with the quick format bar. Whenever I make a typo when writing a message I usually go back with a ctrl+shift+arrow selection to correct it, and that of course triggers the bar, but then there wasn't any obvious way to make it go away (other than pressing backspace or delete, [ChatBar.qml#L339](https://invent.kde.org/network/neochat/-/blob/master/src/chatbar/ChatBar.qml?ref_type=heads#L339)), so it'd always be stuck visible until I clicked somewhere with my mouse, which I found somewhat annoying.

This intends to fix that, by hiding it whenever the selection is cleared, which seems like a reasonable and expected behavior to me. I would also be okay with making it dismissable with escape, if this current suggestion has some unintended side-effect that I've missed.

I also think that this should in practice "solve" this bug https://bugs.kde.org/show_bug.cgi?id=511590 but I didn't link it directly as their suggested solution is smarter placement of the bar.
2025-12-17 21:33:08 +00:00
l10n daemon script
f5a652f7a1 GIT_SILENT Sync po/docbooks with svn 2025-12-16 14:25:07 +00:00
Paul Brown
f165cb1f10 Removed list of supporters, as we now have a less annoying way of showing them on the apps website. 2025-12-14 16:41:47 +00:00
l10n daemon script
11132c3e89 GIT_SILENT Sync po/docbooks with svn 2025-12-14 01:40:32 +00:00
l10n daemon script
089ab2009a GIT_SILENT Sync po/docbooks with svn 2025-12-13 01:44:24 +00:00
l10n daemon script
6ebedc5dfc GIT_SILENT Sync po/docbooks with svn 2025-12-12 01:42:29 +00:00
Nicolas Fella
e5b2fb7316 Guard against currentIndex being -1 in NeochatMaximizeComponent
Sometimes the ListView's currentIndex is -1, which results in us
querying data() for an invalid index, causing an assert in Qt model
code

BUG: 513104
2025-12-11 18:01:19 +01:00
l10n daemon script
5da3aff607 GIT_SILENT Sync po/docbooks with svn 2025-12-10 01:47:45 +00:00
l10n daemon script
3fa46d52fe GIT_SILENT Sync po/docbooks with svn 2025-12-09 01:41:23 +00:00
Justin Zobel
ece9811d82 CI - Flatpak - Remove Kirigami Addons as it is now in the runtime 2025-12-08 19:55:46 +10:30
Justin Zobel
b543b1c2f9 CI - Flatpak - Use -DCMAKE_POLICY_VERSION_MINIMUM=3.5 for olm 2025-12-08 19:55:46 +10:30
Justin Zobel
5065bccb64 CI - Flatpak - Fix broken sha256sum 2025-12-08 19:55:46 +10:30
Justin Zobel
10c3125668 CI - Flatpak - Fix broken sha256sums 2025-12-08 19:55:46 +10:30
Justin Zobel
73019cfea2 CI - Flatpak - Update Runtime to 6.10 2025-12-08 19:55:46 +10:30
Justin Zobel
4bc6a88acf CI - Flatpak - Update Versions 2025-12-08 19:55:46 +10:30
l10n daemon script
56a49cfc50 GIT_SILENT Sync po/docbooks with svn 2025-12-08 01:41:51 +00:00
Nate Graham
c50380b448 Tell room page header message to fill the width
Otherwise it scrunches up as small as possible and breaks the layout.
2025-12-07 09:27:58 -05:00
l10n daemon script
673a8c8bc8 GIT_SILENT Sync po/docbooks with svn 2025-12-07 01:45:09 +00:00
l10n daemon script
c298c348a4 GIT_SILENT Sync po/docbooks with svn 2025-12-04 01:45:11 +00:00
Heiko Becker
2fcd535aeb GIT_SILENT Update Appstream for new release
(cherry picked from commit 0e4b52ee62)
2025-12-04 00:20:05 +01:00
l10n daemon script
8f5e68de5d GIT_SILENT Sync po/docbooks with svn 2025-12-03 01:45:04 +00:00
l10n daemon script
5fe36a9057 GIT_SILENT Sync po/docbooks with svn 2025-12-02 01:41:01 +00:00
l10n daemon script
8d8c6444e0 GIT_SILENT Sync po/docbooks with svn 2025-12-01 01:44:51 +00:00
Joshua Goins
03d5955c8d Add support for reporting rooms and users
This was added in recent Matrix versions, and a desperately needed
feature.
2025-11-30 14:01:13 -05:00
Joshua Goins
197d7ce8e8 Add a new function to check supported Matrix spec in QML 2025-11-30 14:01:13 -05:00
l10n daemon script
efbf6d96d4 GIT_SILENT Sync po/docbooks with svn 2025-11-30 01:45:44 +00:00
l10n daemon script
b8cd3c69c2 GIT_SILENT Sync po/docbooks with svn 2025-11-29 01:42:47 +00:00
renner 03
1da24191f0 Fix krunner integration with Flatpak 2025-11-28 09:38:51 -05:00
l10n daemon script
2ecc567792 GIT_SILENT Sync po/docbooks with svn 2025-11-28 01:41:47 +00:00
l10n daemon script
66e1fe067d GIT_SILENT Sync po/docbooks with svn 2025-11-27 01:43:17 +00:00
Nate Graham
d08f014def Rephrase a British English wording for the base string
"X has put Y out of the room" is a British English style sentence. Which
is fine, but I'm using en_US, not en_UK.

Re-phrase this to sound a bit more American (which is the linguistic
style we use for the base strings), and then count on the en_UK
translators bringing back the old phrasing for en_UK.
2025-11-25 22:15:45 -07:00
l10n daemon script
63941d6685 GIT_SILENT Sync po/docbooks with svn 2025-11-26 01:41:17 +00:00
Tobias Fella
38523c97c5 Implement drag&drop support for flatpaks
BUG: 495552
2025-11-25 10:27:38 +00:00
l10n daemon script
65c6f4c1d3 GIT_SILENT Sync po/docbooks with svn 2025-11-25 01:41:04 +00:00
Heiko Becker
0cb3fd32f4 Drop unused dependencies
Both KF6Crash and KF6IconThemes aren't used anymore after porting to
KirigamiApp in eab45e761a.
2025-11-24 21:51:55 +01:00
l10n daemon script
b02cb0157e GIT_SILENT Sync po/docbooks with svn 2025-11-24 01:42:36 +00:00
l10n daemon script
ca163fc169 GIT_SILENT Sync po/docbooks with svn 2025-11-23 01:43:18 +00:00
l10n daemon script
5687eb33e1 GIT_SILENT Sync po/docbooks with svn 2025-11-21 01:43:31 +00:00
l10n daemon script
fc795e50b3 GIT_SILENT Sync po/docbooks with svn 2025-11-20 01:41:22 +00:00
l10n daemon script
c4adfe7939 GIT_SILENT Sync po/docbooks with svn 2025-11-19 01:39:53 +00:00
l10n daemon script
ce96232bbd GIT_SILENT Sync po/docbooks with svn 2025-11-18 02:00:53 +00:00
l10n daemon script
95653cf3f7 GIT_SILENT Sync po/docbooks with svn 2025-11-17 13:25:28 +00:00
l10n daemon script
0c11cd331f GIT_SILENT Sync po/docbooks with svn 2025-11-17 01:40:07 +00:00
Tobias Fella
3c8ca0d421 Simplify key backup unlocking
Replaces the separate text fields for security keys and backup passphrases with a single on; internally, both methods are then tried.
2025-11-16 14:21:26 +00:00
l10n daemon script
52f71d5c55 GIT_SILENT Sync po/docbooks with svn 2025-11-16 01:40:16 +00:00
l10n daemon script
00f7dd5175 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-11-16 01:34:16 +00:00
l10n daemon script
52da8415e9 GIT_SILENT Sync po/docbooks with svn 2025-11-15 01:41:08 +00:00
l10n daemon script
953e4cd792 GIT_SILENT Sync po/docbooks with svn 2025-11-14 01:41:28 +00:00
Tobias Fella
ee4b1578b1 Consider highlights when determining whether a room can be marked as read
BUG: 501080
2025-11-13 20:11:06 +00:00
Paul Brown
ae24424a32 Adding anthropy@mastodon.derg.nz to list of supporters 2025-11-13 19:32:43 +00:00
l10n daemon script
51be282824 GIT_SILENT Sync po/docbooks with svn 2025-11-13 01:42:02 +00:00
Tobias Fella
c539dfc352 Fix crash when poll answer has fewer selections than possible
BUG: 511909
2025-11-12 12:29:53 +00:00
Carl Schwan
fe734206df Add Thibault Molleman to the donnors 2025-11-12 11:14:38 +01:00
l10n daemon script
79a49165f1 GIT_SILENT Sync po/docbooks with svn 2025-11-11 01:51:20 +00:00
Tobias Fella
ada5eef088 Remove outdated flatpak font config 2025-11-10 17:27:25 +00:00
Tobias Fella
9cc5778126 Remove secret backup feature flag
There isn't really a point in hiding this behind a flag and it just makes the process even more confusing
2025-11-10 18:04:50 +01:00
l10n daemon script
b129805f94 GIT_SILENT Sync po/docbooks with svn 2025-11-10 01:44:58 +00:00
Joshua Goins
887865c0aa Improve invited room counting
I didn't realize when redoing the tooltip for DMs that directChatInvites
was a boolean, not an integer type. Now it's changed to an integer type,
which fixes the DM invite count.

NeoChat apparently didn't count normal room invites until now either, so
now Home is highlighted in that case. Now it should be harder to miss
these kinds of invites.
2025-11-09 12:03:17 -05:00
Joshua Goins
1336194cf4 Don't send an erroneous SetTypingJob on start-up
You can see this while starting NeoChat, as it always fails because
localMember() isn't valid at this point. This is called during the
ChatBar setup as we're setting up the text, which also happens during
room switch.
2025-11-09 10:55:05 -05:00
Joshua Goins
5a7ae3563e Fix alignment on the room invitation page
I forgot to horizontally center the room alias label, so it was usually
stuck to the left-side. I also don't know why I put the room alias on
top and the room name on the bottom, so those are swapped now too.
2025-11-09 10:54:54 -05:00
Joshua Goins
7c56e24fdc Manually update badge count in initActiveConnection
Without doing this, it's possible to start NeoChat and have no badge
count despite having notable notifications. The reason for this is if
badgeNotificationCount was updated and changed before this function
call, and a call to refreshBadgeNotificationCount doesn't emit the
changed signal.

This is easy to work around by calling updateBadgeNotificationCount
ourselves.
2025-11-09 10:19:55 -05:00
Joshua Goins
e6b9abeca3 Account for pending invites in the badge notification count 2025-11-09 10:18:28 -05:00
l10n daemon script
1b45784a88 GIT_SILENT Sync po/docbooks with svn 2025-11-09 01:48:27 +00:00
Albert Astals Cid
a12b0d5282 GIT_SILENT Upgrade release service version to 26.03.70. 2025-11-06 18:29:06 +01:00
Paul Brown
a6d75f2ff5 Adding Joshua Strobl to list of supporters 2025-11-06 17:01:19 +00:00
l10n daemon script
b8f7f33b9a GIT_SILENT Sync po/docbooks with svn 2025-11-06 16:14:20 +00:00
l10n daemon script
273d962707 GIT_SILENT Sync po/docbooks with svn 2025-11-06 01:40:42 +00:00
Paul Brown
5e8b44fea6 Adding Akseli as supporter 2025-11-05 21:56:17 +00:00
l10n daemon script
be9e2ec7d0 GIT_SILENT Sync po/docbooks with svn 2025-11-05 01:48:44 +00:00
l10n daemon script
ee042cc1a2 GIT_SILENT Sync po/docbooks with svn 2025-11-04 01:47:11 +00:00
Kristen McWilliam
25c0bc131a feat: add font size scaling setting
Adds an option in Appearance Settings to adjust font size scaling,
improving accessibility and user customization.
2025-11-03 10:18:23 -05:00
Paul Brown
7def8c066c Added anonymous donot to list of supporters 2025-11-03 12:50:59 +00:00
l10n daemon script
1ddaf37e52 GIT_SILENT Sync po/docbooks with svn 2025-11-02 01:39:31 +00:00
Heiko Becker
40694f502a Fix version in appstream file
GIT_SILENT
2025-11-01 20:01:46 +01:00
l10n daemon script
d9f4a0a032 GIT_SILENT Sync po/docbooks with svn 2025-11-01 01:44:57 +00:00
l10n daemon script
5e392f3101 GIT_SILENT Sync po/docbooks with svn 2025-10-31 01:39:58 +00:00
Heiko Becker
ce1ac6128e GIT_SILENT Update Appstream for new release
(cherry picked from commit c6fa5a10dd)
2025-10-31 01:23:25 +01:00
l10n daemon script
a9d08a6ee2 GIT_SILENT Sync po/docbooks with svn 2025-10-30 01:41:27 +00:00
Joshua Goins
24d4829ba9 Clarify what is "recent activity" in our room list ordering settings
As seen in the bug report, this setting is a bit confusing. First, it
refers to "message activity" but in reality it does take into account
all events. This is fine in my opinion, so I clarified that point.

Another thing is that it wasn't clear that timeline visibility settings
currently affect the sorting, so I added a tip about that.

Finally I wasn't happy with these two options being called "Activity"
so the old "Activity" setting is now called "Importance". The "Last
Message Activity" setting is now called "Newest Events".

BUG: 508480
FIXED-IN: 25.12.0
2025-10-29 18:18:53 -04:00
l10n daemon script
a121c39b6e GIT_SILENT Sync po/docbooks with svn 2025-10-29 01:41:34 +00:00
Joshua Goins
f009420c20 Improve the design of the room notifications settings
Now it has icons that match what we have in the room menu, and the
duplicate header text is removed.
2025-10-28 12:27:23 -04:00
Joshua Goins
069e0d8f16 Add informational Keyboard Shortcuts settings page
While we don't have customizable keyboard shortcuts (yet!) we have been
asked before for some way to view all of NeoChat's keyboard shortcuts.
2025-10-28 10:29:55 -04:00
Joshua Goins
1f1db11197 Fix plugin on LocationsPage
This lives in the base NeoChat QML module, not the libneochat one.
2025-10-28 09:17:18 -04:00
Joshua Goins
be92e56c3a Show less scary icon for neutral reasons when cancelling verification
For example, accepting a verification on another device shows a giant
red security icon which isn't really suitable. I chucked the
dialog-information icon in for some of the neutral-sounding messages so
this dialog can be a little less intimidating.

BUG: 510421
FIXED-IN: 24.08.3
2025-10-28 09:16:17 -04:00
l10n daemon script
d1fc426513 GIT_SILENT Sync po/docbooks with svn 2025-10-28 01:41:19 +00:00
Joshua Goins
c778ba8b24 Fix jump to previous/next unread room shortcuts
These were dependent on a renamed property and ended up breaking, oops.
2025-10-27 18:09:00 -04:00
Joshua Goins
07fb3160eb Add "Inspect Room Data" button in the room sidebar
I find myself doing the same routine: I want to inspect a room's state,
so I have to go hunting for the Developer Tools button. And then I have
to do a few clicks to even get the correct room, what a waste of time!

So I added a new button to the sidebar to open the Developer Tools for
the current room.
2025-10-27 18:08:51 -04:00
Joshua Goins
7444d68280 Change room sidebar action text
As we've continued to add more and more room actions, I'm not entirely
happy with how they're worded. Some are super short and sweet like
"Verify User" while others refer to the room as if the sidebar wasn't
enough context: "Search in this room".

I redid all of the button's text so they're shorter, like "Search
Messages".
2025-10-27 18:08:42 -04:00
Joshua Goins
1d5536401d Make the CTRL+F shortcut search the current room's messages
Right now there's not an easy way to quickly bring up message search. If
you press CTRL+F (with the room information sidebar *closed*, for some
reason) that brings up the same dialog as CTRL+K which seems redundant.

I assigned that shortcut to the message search dialog instead, which is
makes much more sense in my opinion. I also made sure its disabled in
spaces or when there's not a room open.

BUG: 487270
FIXED-IN: 25.12.0
2025-10-27 18:08:29 -04:00
Joshua Goins
099e996f2f Improve standalone images in link preview and more
We would incorrectly show a "truncate" button for standalone images
which isn't applicable since there's no text. That check has been fixed,
and it doesn't seem to regress normal link previews.

Another is that if there's only an image, our layout would center the
image which looks awkward since almost everything else is left-aligned
in chat. This is also fixed, which notably matches up to Element Web's
behavior.

I added support for the hover link indicator as well. Someone could
maliciously hide it via Markdown but have a legitimate-looking link
preview, for example. You can check that by hovering over the link in
the message itself, but now the link preview is another way to confirm
that!
2025-10-27 18:08:21 -04:00
Joshua Goins
6d9974b2b1 Improve the Jitsi meeting button UX
Widgets support is incredibly useful and so is this button, but it has a
few problems. The most obvious is that it's still enabled even if you
don't actually have the permission to start Jitsi meetings, so I fixed
that. I also made sure it's hidden when viewing spaces too.

Another problem is that you can't easily tell if a meeting is currently
in progress either, nor do we have a good icon for that in Breeze. So I
changed the tooltip and colored the icon in this case.

The final problem I fixed is something not exclusive to NeoChat, but
generally all chat applications with this feature - there's no
confirmation! To stop "butt-dialing" random people or rooms, I added a
prompt before starting or joining a meeting.
2025-10-27 18:08:08 -04:00
James Graham
f65e9f7599 Fix the chatbar so that the icons show on android. Overring the contentItem was what was causing them to disappear. 2025-10-27 16:13:54 -04:00
l10n daemon script
4a39810923 GIT_SILENT Sync po/docbooks with svn 2025-10-26 01:38:47 +00:00
l10n daemon script
6720e2dfaa GIT_SILENT Sync po/docbooks with svn 2025-10-25 01:39:53 +00:00
l10n daemon script
eb1bf2ed2b GIT_SILENT Sync po/docbooks with svn 2025-10-24 01:39:25 +00:00
l10n daemon script
cc26b1b62f GIT_SILENT Sync po/docbooks with svn 2025-10-23 01:38:07 +00:00
l10n daemon script
59c2c88eb6 GIT_SILENT made messages (after extraction) 2025-10-22 00:43:30 +00:00
l10n daemon script
99e8fd16eb GIT_SILENT Sync po/docbooks with svn 2025-10-21 01:39:43 +00:00
l10n daemon script
eaa4bdb0b7 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-10-21 01:34:16 +00:00
l10n daemon script
892b61e6bb GIT_SILENT Sync po/docbooks with svn 2025-10-20 01:41:26 +00:00
Nicolas Fella
6d56b673c4 Don't call direct messages friends
Not every person I communicate with is necessarily my friend

Use a more neutral term

BUG: 480167
2025-10-19 19:42:21 +02:00
l10n daemon script
f59e5a4b3c GIT_SILENT Sync po/docbooks with svn 2025-10-19 01:42:36 +00:00
Nicolas Fella
16e3fd4476 Don't show direct messages in room list when not in a space
2b0251c593 changed the logic to also show direct messages inside a space

However this also causes direct messages to be shown when *not* inside a space, which is undesirable
2025-10-18 15:02:07 +02:00
l10n daemon script
82d0fdefd2 GIT_SILENT Sync po/docbooks with svn 2025-10-18 02:03:22 +00:00
Tobias Fella
cbde14d58b Cleanup DevicesPage 2025-10-17 12:23:58 +00:00
l10n daemon script
f3c37e4304 GIT_SILENT Sync po/docbooks with svn 2025-10-17 01:57:08 +00:00
l10n daemon script
369008cec3 GIT_SILENT Sync po/docbooks with svn 2025-10-16 01:40:30 +00:00
l10n daemon script
1a2af57901 GIT_SILENT Sync po/docbooks with svn 2025-10-15 01:39:22 +00:00
l10n daemon script
dbb41d061c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-10-15 01:33:59 +00:00
l10n daemon script
d1d3c43c6f GIT_SILENT Sync po/docbooks with svn 2025-10-14 01:40:53 +00:00
Paul Brown
ba2b1529ea Edit org.kde.neochat.appdata.xml 2025-10-13 10:50:10 +00:00
l10n daemon script
b5150f82f0 GIT_SILENT Sync po/docbooks with svn 2025-10-13 01:40:08 +00:00
Tobias Fella
00c81de035 Fix pushing welcome page onto layer
BUG: 510285
2025-10-12 10:58:21 +00:00
Tobias Fella
52d4451932 Add state event texts for some element-specific widget events 2025-10-12 10:49:45 +00:00
l10n daemon script
3efc11b9aa GIT_SILENT Sync po/docbooks with svn 2025-10-12 01:39:29 +00:00
James Graham
5fd9f07664 Some further belt and braces to ensure that we don't crash in the timeline
Some further belt and braces to ensure that we don't crash in the timeline. This does the following:
- Checks all callback inputs
- Makes sure that any objects are cleaned up from incubators when deleting the delegate as it turns out that clear() doesn't do this. Hopefully this stops callbacks into an already deleted parent.

Hopefully helps with https://crash-reports.kde.org/organizations/kde/issues/261627/events/0b6bef500c5641e1924aa0bc2b0c11bd/
2025-10-11 18:11:57 +00:00
l10n daemon script
bec9f36bce GIT_SILENT Sync po/docbooks with svn 2025-10-11 10:19:58 +00:00
l10n daemon script
a631acc0ac GIT_SILENT Sync po/docbooks with svn 2025-10-10 01:38:30 +00:00
l10n daemon script
b729aaf6ee GIT_SILENT Sync po/docbooks with svn 2025-10-09 01:43:02 +00:00
Tobias Fella
94b7fc5cdf Fix delegate menu for state events 2025-10-08 21:50:56 +00:00
Marco Martin
ec5355d86e Push to PageRow on mobile too
This fixes some glitches during animation, which had the background
disappearing when the pop animation was running,
and now uses always the pagerow for viewing the room.

This depends from the new PageRow animation on mobile,
https://invent.kde.org/frameworks/kirigami/-/merge_requests/1925
which makes all applications coherent with an application which
looks a bit more like the one on most android apps.

Also, the swipe back gesture now will work there too
2025-10-08 15:44:46 +00:00
Arno Rehn
1a43d15c6d EventHandler: Acknowledge that non-room-events can have a body as well
Specifically, in the current architecture, these can be EncryptedEvents
which are redactions of previous events. These will have artifical bodies.
2025-10-08 14:01:48 +00:00
James Graham
7356a68f4c Hopefully this stops any crashes around QuickActions.qml and EmojiDialog.qml
Hopefully this stops any crashes around QuickActions.qml and EmojiDialog.qml. Best I can guess this is some race condition where QuickActions are deleted in the time it takes to instnatiate the EmojiDialog popup. I've also rearranged the updateQuickActions function to stop a possible race condition there.

BUG: 509484
2025-10-08 13:07:02 +00:00
Tobias Fella
1070427a0d Try fixing crash in QConcatenateTablesProxyModel 2025-10-08 11:39:39 +00:00
l10n daemon script
196ef535ca GIT_SILENT Sync po/docbooks with svn 2025-10-08 01:40:26 +00:00
Tobias Fella
88fd173829 Show a placeholder message if there are no extensions 2025-10-07 22:43:18 +02:00
Arno Rehn
8b0698c670 Support adding Jitsi and removing widgets 2025-10-07 21:58:34 +02:00
Arno Rehn
5b07a0ff45 Add jitsi button to RoomPage 2025-10-07 21:58:34 +02:00
Arno Rehn
ba1d175d67 Add "Extensions" item to the room info 2025-10-07 21:58:34 +02:00
Arno Rehn
36ce55e892 Add WidgetModel 2025-10-07 21:56:18 +02:00
Arno Rehn
ba4a83d38c Don't switch to global DMs when space contains DM 2025-10-06 14:14:04 +00:00
Arno Rehn
5c49c35b82 Space overview: Fix displayed name of direct chats
When in the space overview page, direct chats were previously only
shown with their room ID. Fix this by getting the actual NeoChatRoom
and its displayName.
2025-10-06 14:14:04 +00:00
Arno Rehn
2b0251c593 Room list: Show direct chats in spaces
Direct Chats can be added to spaces as well. No need to exclude them.
2025-10-06 14:14:04 +00:00
l10n daemon script
3b08d0f382 GIT_SILENT Sync po/docbooks with svn 2025-10-06 01:43:51 +00:00
l10n daemon script
f64e8a3192 GIT_SILENT Sync po/docbooks with svn 2025-10-04 15:09:41 +00:00
Tobias Fella
eab45e761a Use KirigamiApp 2025-10-03 11:32:15 +00:00
l10n daemon script
0f03290c57 GIT_SILENT Sync po/docbooks with svn 2025-10-03 01:42:04 +00:00
Tobias Fella
59f87bb2c2 Set deprecation level 2025-10-02 16:43:27 +02:00
Tobias Fella
9afc10160d Raise compiler settings level to 6.17 2025-10-02 16:19:01 +02:00
Tobias Fella
cfc7f50a1f MessageContentModel: Guard data() against being called when there is no room 2025-10-01 23:48:49 +02:00
Heiko Becker
a2fc00365e GIT_SILENT Update Appstream for new release
(cherry picked from commit debbe8e478)
2025-10-01 00:40:10 +02:00
Joshua Goins
466cfd971d Fix room succession not actually working
I broke this in 409b6da160 making it not
possible to join a succeeding room. I decided to keep the old behavior
of not prompting you to join, because:

1. You are intentionally choosing to tap the button.
2. Room successions aren't random, a privileged user in the room is
creating it and there's already some implicit existing trust

(Also the current join confirmation dialog isn't useful enough yet to
make an actual informed decision anyway.)
2025-09-30 16:05:36 -04:00
Joshua Goins
8e83febb24 Remove some dead code from MessageModel::createEventObjects
This senderId variable doesn't seem to be used in the current iteration
of this function, lets remove it.
2025-09-30 12:07:49 -04:00
l10n daemon script
12072b0a73 GIT_SILENT Sync po/docbooks with svn 2025-09-30 01:47:20 +00:00
l10n daemon script
83b1daac07 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-09-30 01:36:30 +00:00
Arno Rehn
981ea053a6 Pinned messages: Decrypt events before handling them 2025-09-29 18:59:53 +02:00
Arno Rehn
e41fd7d986 PollHandler: Decrypt EncryptedEvents
Related events for a poll will be EncryptedEvents in an encrypted
room. Decrypt them before handling.
2025-09-29 18:59:53 +02:00
Arno Rehn
a88a82ca08 PollHandler: Correctly handle paginated events 2025-09-29 18:59:20 +02:00
Arno Rehn
23dc88df60 PollComponent: Apply word wrapping on long messages
Long messages were not wrapped and would overflow.
Correctly apply word wrapping and align all elements on the top of a
row.
2025-09-29 18:58:57 +02:00
l10n daemon script
520b1daeec GIT_SILENT Sync po/docbooks with svn 2025-09-29 01:41:25 +00:00
l10n daemon script
cbe7ace32d GIT_SILENT Sync po/docbooks with svn 2025-09-28 01:46:45 +00:00
l10n daemon script
2b4471ea91 GIT_SILENT Sync po/docbooks with svn 2025-09-27 01:40:14 +00:00
Joshua Goins
88e1e1dd2a Add the ability to scroll up in the message search window
This wasn't a thing yet, so the search experience compared to something
like Element Web was much worse. Now you can scroll back as far as any
other client can!

I had to do a bit of refactoring to stop resetting the model all the
time, and append instead. Otherwise, it was quite straightforward to
implement.
2025-09-26 17:49:22 -04:00
Joshua Goins
94ea1305b2 Fix some miscellaneous weirdness around push notifications
For some reason, I *stopped* the timer if we get a push message - which
makes *no* sense. It meant that NeoChat kept running in the background
for basically no reason.

We can also make the NotificationsManager::postPushNotification function
static and avoid creating some singletons.
2025-09-26 15:14:05 -04:00
Joshua Goins
960377838d Replace KDBusService usage with QDBusConnection when D-Bus activated
This is lighter and more reliable when it comes to being activated by
KUnifiedPush. We also don't need all of the features of KDBusService
here.
2025-09-26 15:14:05 -04:00
Joshua Goins
a48e8662d6 Remove useless translated string from dbus-activated CLI option
It never gets shown, so let's not waste our translators time.
2025-09-26 15:12:56 -04:00
l10n daemon script
9c90a38efc GIT_SILENT Sync po/docbooks with svn 2025-09-26 01:39:23 +00:00
l10n daemon script
8696a24127 GIT_SILENT Sync po/docbooks with svn 2025-09-25 01:40:55 +00:00
l10n daemon script
f2d1b4c1e1 GIT_SILENT Sync po/docbooks with svn 2025-09-24 01:40:47 +00:00
Laurent Montel
4cdc2b5e58 GIT_SILENT: Don't duplicate headers between .h/.cpp 2025-09-22 04:43:02 +00:00
l10n daemon script
e26f02d9e2 GIT_SILENT Sync po/docbooks with svn 2025-09-22 01:38:51 +00:00
l10n daemon script
5d83fe9a1d GIT_SILENT Sync po/docbooks with svn 2025-09-21 01:41:04 +00:00
l10n daemon script
6a506f237a GIT_SILENT Sync po/docbooks with svn 2025-09-20 01:41:10 +00:00
l10n daemon script
3a5a0153d8 GIT_SILENT Sync po/docbooks with svn 2025-09-18 01:40:38 +00:00
l10n daemon script
27519b8788 GIT_SILENT Sync po/docbooks with svn 2025-09-17 01:39:11 +00:00
l10n daemon script
dd45fe16a5 GIT_SILENT Sync po/docbooks with svn 2025-09-16 01:41:59 +00:00
Vlad Zahorodnii
161815acff Fix inserting UserListModel items without beginInsertRows()
If an item is added, the corresponding code should be wrapped with
beginInsertRows() and endInsertRows(), otherwise proxy or filter models
can end up with corrupted internal state.

m_members.insert() in refreshMember() should be unnecessary because
if pos is not the same as m_members.size(), then it means there's already
a member.id() item in the member list.
2025-09-15 18:04:29 +00:00
Tobias Fella
438edf2155 Fix qml warnings in ImageEditorPage 2025-09-15 16:13:49 +02:00
Tobias Fella
6607a4b72c Fix qml warnings in ChatBar 2025-09-15 16:11:20 +02:00
Tobias Fella
8f0c4ab133 Fix warning in FullScreenMap 2025-09-15 16:06:58 +02:00
Tobias Fella
78e5cd51cd remove unused imports 2025-09-15 16:05:22 +02:00
Tobias Fella
f5da44655e Fix qml warnings in SpaceDrawer 2025-09-15 16:03:38 +02:00
Tobias Fella
a91863c60d Fix qml warnings in AccountSwitchDialog 2025-09-15 14:39:40 +02:00
Tobias Fella
29e3a09aba Fix qml warning 2025-09-15 14:29:55 +02:00
Tobias Fella
a59952f189 Fix qml warnings in AccountData 2025-09-15 14:24:42 +02:00
Tobias Fella
b169da25ab Fix qml warnings in RoomSortParameterDialog 2025-09-15 14:21:47 +02:00
Tobias Fella
833e357d70 Fix qml warnings in login module 2025-09-15 14:15:38 +02:00
Tobias Fella
f9bf2b8f7a Fix warnings in NeoChatMaximizeComponent 2025-09-15 14:06:17 +02:00
Tobias Fella
7b27579f2d Fix qml warnings in ExploreRoomsPage 2025-09-15 13:54:43 +02:00
Tobias Fella
edb9d9f54e Remove unused import 2025-09-15 13:51:23 +02:00
Tobias Fella
abf9a486d0 Fix qml warnings in RoomData 2025-09-15 13:49:08 +02:00
Tobias Fella
b0bc19c055 Fix qml warnings in RoomInformation 2025-09-15 13:41:32 +02:00
Tobias Fella
71776ef275 Fix qml warnings in TypingPane 2025-09-15 13:30:55 +02:00
Tobias Fella
8dc7d1d39d Fix most qml warnings in StateKeys 2025-09-15 13:25:41 +02:00
Tobias Fella
adb9e59503 Fix qml warnings 2025-09-15 13:21:17 +02:00
Tobias Fella
518044e34a Fix qml warning 2025-09-15 13:17:32 +02:00
Tobias Fella
d6d747bb99 Fix qml warnings in EmoticonFormCard 2025-09-15 13:15:59 +02:00
l10n daemon script
f390702a7a GIT_SILENT Sync po/docbooks with svn 2025-09-15 01:39:42 +00:00
Tobias Fella
e056360ddd Various fixes for ExportKeysDialog 2025-09-14 18:31:26 +02:00
l10n daemon script
85163791ce GIT_SILENT Sync po/docbooks with svn 2025-09-14 01:39:17 +00:00
l10n daemon script
b5a853bc96 GIT_SILENT Sync po/docbooks with svn 2025-09-13 01:46:27 +00:00
Tobias Fella
e4cd6ce5a6 Add "copy user id" menu to delegate in user search page
BUG: 499792
2025-09-12 11:37:07 +00:00
l10n daemon script
84fa68e3ae GIT_SILENT Sync po/docbooks with svn 2025-09-12 01:38:40 +00:00
Joshua Goins
649dc7a815 Add placeholder message when there's no public rooms at all
I guess we never tested this against a truly empty server yet, as the
"no search" message was empty. This would normally never show up since
the top public rooms are usually listed instead.
2025-09-11 14:09:52 -04:00
Joshua Goins
b87e43660c Use better-fitting icons for "Explore rooms" and "Find your friends"
Only a problem on the room list, which used list-add which is odd as it
doesn't match up with how these are displayed elsewhere.
2025-09-11 11:52:24 -04:00
Joshua Goins
511138e3bb Revert back to normal, non-master KNotifications
It requires KF6.18, and while we could also force that it's probably
easier to wait for the full release.
2025-09-11 17:47:29 +02:00
Volker Krause
5a3c23d000 Fix KNotifications Craft path 2025-09-11 17:22:04 +02:00
Joshua Goins
1036384023 Add recently pinned message to the top of the window
This makes pinned messages actually quite useful, as rooms can stick
persistent and important information for users to see. (For example, the
KWin has crash triage meeting information pinned in their room.)

For simplicity and space reasons, only one line of the generic message
body is shown.
2025-09-11 08:57:22 -04:00
Tobias Fella
e3f618489b Remove flatpak patches 2025-09-11 12:00:44 +00:00
Joshua Goins
cfedd4fdb5 Stop erroring out when setting avatar if you never set it
The code didn't actually check the avatar URLs were different until now.
2025-09-11 07:43:04 -04:00
Joshua Goins
812e5beee6 Allow pressing enter/return on "Add Account" in account switcher dialog
Because "Add Account" is a "fake item" by being the footer, it should be
the null fallback when accessing currentItem.
2025-09-11 07:41:56 -04:00
Joshua Goins
17b632eb78 Add a small margin between the border of media and "Hide Media" button
I thought we had this already, I don't know where it went, but now it's
back.
2025-09-11 13:36:51 +02:00
Joshua Goins
877d5f34f7 Hide "Scan a QR Code" with no camera connected
Also when you disconnect/turn off the camera while the QR scanner is
open, show a better error message instead of freezing the last frame.
2025-09-11 05:15:39 -04:00
Tobias Fella
c93ce52ba1 Remove various outdated ifdefs 2025-09-11 10:47:23 +02:00
l10n daemon script
2504ca3f5c GIT_SILENT Sync po/docbooks with svn 2025-09-11 01:38:19 +00:00
l10n daemon script
5be05032be GIT_SILENT Sync po/docbooks with svn 2025-09-10 01:39:56 +00:00
Joshua Goins
81e5061831 Fix-up QR code scanning actions
I cleaned up how resolving QR codes work, I made sure to test both user
and room links and everything works great.

A more awkward bug I fixed is
a workaround around a quirk in Kirigami.Dialog, but actually regresses
QR codes. Because the QR code scanner is currently an extra window (at
least on desktop) the UserDetailDialog will reparent itself to the
soon-to-be-destroyed scanner window.
2025-09-09 13:35:12 -04:00
Joshua Goins
3b419e18a3 Build KNotifications master in Craft for now
This is needed to make Android notifications work again, as it narrowly
missed 6.18. We can remove it upon the next release.
2025-09-09 10:44:25 -04:00
Joshua Goins
1a1190d7bd Fix URL previews on modern Matrix servers never loading
This was a regression in 5d5295d06d where
the job never connected to the onSuccess function.
2025-09-09 08:51:54 -04:00
Joshua Goins
5b4d3df6ee Make rooms in the room list bold when there's unread messages
This used to be a feature but kinda broke/changed when we switched to
focusing on context-aware or notable events. Basically instead of only
notable events making a room bold in the room list, it's any unread
messages now.
2025-09-09 11:43:25 +02:00
Tobias Fella
f53d47fa28 Require libQuotient 0.9.3 2025-09-09 07:47:39 +00:00
l10n daemon script
67d5711cc4 GIT_SILENT Sync po/docbooks with svn 2025-09-09 02:18:13 +00:00
l10n daemon script
9f51b1e7ab SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-09-09 02:04:03 +00:00
l10n daemon script
5ac296ee71 GIT_SILENT made messages (after extraction) 2025-09-09 00:54:31 +00:00
Joshua Goins
1b8adcc91a Don't import Purpose on Android
This prevents the app from launching on Android (and probably Windows
too) because our module declares a dependency on a non-existent Purpose.
2025-09-08 16:10:12 +02:00
Joshua Goins
1e78209cd7 Fix missing appWindow property for GlobalMenuStub
This was one of the issues with the current Android version.
2025-09-08 15:47:04 +02:00
Tobias Fella
0fd924be7b Fix showing permissions settings for v12 rooms 2025-09-08 08:14:17 +00:00
l10n daemon script
d67cb89505 GIT_SILENT Sync po/docbooks with svn 2025-09-08 02:13:16 +00:00
l10n daemon script
0d0f88e251 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-09-08 01:51:40 +00:00
Joshua Goins
4cbd4a034c Remove incorrect context for "Always allow device verification" 2025-09-07 12:57:08 -04:00
Joshua Goins
e7ed07e386 Show the "Verify This Device" warning when turning on reverification
This is the only way to reverify your device again, so it's useful to
show this in that case.
2025-09-07 12:57:08 -04:00
Joshua Goins
390654fa4a Fix deprecation warning about QHoverEvent::pos
We should be using position().
2025-09-07 12:26:27 -04:00
Joshua Goins
e8830b56d8 Add "Done" button when verification session is finished
It isn't immediately obvious when to close the window, other clients
(e.g. Element Web) has a "Got It" button in addition to the regular
dialog close button.
2025-09-07 12:25:16 -04:00
Tobias Fella
bbf2587908 Don't use raw json for getting reply event id 2025-09-07 16:43:35 +02:00
Joshua Goins
409b6da160 Bring up the room confirmation dialog in more situations
This super helpful and nice dialog went mostly unused, especially if you
only joined links to rooms through matrix.to or within NeoChat itself.

The reason why this never showed up for said links is because we were
greedily overwriting the "action". I don't think the code made solid
sense anyway, so I redone it a bit so there's a clearer
"join_confirmed" our UI uses. I added a test case to showcase this
working.
2025-09-07 08:43:51 -04:00
l10n daemon script
9d8c9853ce GIT_SILENT Sync po/docbooks with svn 2025-09-07 01:40:17 +00:00
Joshua Goins
b3781e0db4 Turn NeoChatConnection::isVerifiedSession into a notifiable property
This should allow the devices page to hide the "Verify this Device"
warning, once you actually complete verification. I also made sure to
update the other consumer - the menu item under the user menu.

Additionally, I also fixed the password field not being automatically
focused when trying to remove a device.
2025-09-06 07:51:38 -04:00
l10n daemon script
fbcb2379fb GIT_SILENT Sync po/docbooks with svn 2025-09-06 01:40:56 +00:00
Tobias Fella
e8ad4a5dee Fixes for logging out the active connection
- Don't crash
- Fall back to WelcomePage
2025-09-05 10:11:43 +00:00
l10n daemon script
6c57c41993 GIT_SILENT Sync po/docbooks with svn 2025-09-05 01:41:21 +00:00
Joshua Goins
ce0014f846 Don't accidentally hide relevant error banners
We use error banners for intermittent errors (failing to join a room),
along with more long-standing/important errors (like going offline.) And
due to the nature of how we manage banner visibility - for example, the
online check could accidentally hide joining rooms errors which is
pretty bad.

To fix this, each error banner is assigned an id. All errors can still
overwrite each other as they could before, but they can only hide
banners of their own kind.
2025-09-04 20:48:56 -04:00
l10n daemon script
e5df412258 GIT_SILENT Sync po/docbooks with svn 2025-09-04 01:41:16 +00:00
Heiko Becker
0c482aa463 GIT_SILENT Update Appstream for new release
(cherry picked from commit 681a3c4036)
2025-09-04 01:31:22 +02:00
Joshua Goins
2df3a21fb5 Show the room name when failing to join it
The previous error message generically said you failed to join a room,
but it doesn't say *which* one!
2025-09-03 10:19:26 -04:00
l10n daemon script
9dd438e8a2 GIT_SILENT Sync po/docbooks with svn 2025-09-03 01:45:00 +00:00
Tobias Fella
cea5006e15 Revert "Use libQuotient qml module"
This reverts commit b80a2f94f4.
2025-09-03 00:00:16 +02:00
Tobias Fella
8ff3b31497 Fix some qml warnings in RoomDelegate 2025-09-02 23:00:15 +02:00
Tobias Fella
c7a9f9f07e Fix qml warnings in NotificationsView 2025-09-02 22:57:39 +02:00
Tobias Fella
1de10a4b87 Fix qml warnings in RoomAdvancedPage 2025-09-02 22:51:45 +02:00
Tobias Fella
d7f19efbd6 Fix qml warnings in MimeComponent 2025-09-02 22:49:27 +02:00
Tobias Fella
a3a28b2472 Fix qml warnings in PolLDelegate 2025-09-02 22:48:19 +02:00
Tobias Fella
919fc8b821 Fix qml warnings in DelegateContextMenu 2025-09-02 20:43:46 +00:00
Tobias Fella
b80a2f94f4 Use libQuotient qml module 2025-09-02 22:36:07 +02:00
Tobias Fella
6d18d1a237 Fix qml warnings 2025-09-02 15:36:21 +02:00
Tobias Fella
a2d64d2955 Fix some qml warnings 2025-09-02 15:06:58 +02:00
l10n daemon script
95617e3210 GIT_SILENT Sync po/docbooks with svn 2025-09-02 01:52:19 +00:00
Tobias Fella
1522f7086e Fix various qmllint warnings 2025-09-01 23:50:17 +02:00
Tobias Fella
14167d197f Fix some qml warnings 2025-09-01 23:33:25 +02:00
Tobias Fella
c377cf05b8 Fix qml warnings 2025-09-01 23:27:21 +02:00
Tobias Fella
4a52bc04fb Fix warning 2025-09-01 23:12:31 +02:00
Tobias Fella
53cd230d16 Remove redundant TapHandlers 2025-09-01 23:09:18 +02:00
Tobias Fella
e7b204b9fd Fix various qmllint warnings 2025-09-01 23:06:46 +02:00
Tobias Fella
4d91ae96e3 Only build required parts of opencv 2025-09-01 15:46:08 +02:00
Tobias Fella
b422d641de Add opencv to flatpak
Dependency of KQuickImageEditor
2025-09-01 14:58:27 +02:00
Tobias Fella
adc23e22cd Fix qml warnings in ExploreComponentMobile 2025-09-01 13:39:13 +02:00
Tobias Fella
a673d97144 Fix qml warnings in ExploreComponent 2025-09-01 13:25:36 +02:00
Tobias Fella
5a71dfcd7a Fix qml warnings in SpaceHomePage 2025-09-01 13:22:05 +02:00
Tobias Fella
5f6c248181 Also disable i18n warnings 2025-09-01 13:12:53 +02:00
Tobias Fella
8e04a5ed2f Fix warnings in InvitationView 2025-09-01 13:10:11 +02:00
Tobias Fella
f45582dc03 Fix warnings and add message contexts in ServerComboBox 2025-09-01 13:06:04 +02:00
Tobias Fella
19cfe118ac Fix warnings in SpaceListContextMenu 2025-09-01 13:03:31 +02:00
Tobias Fella
79b8987d85 Fix UserSearchPage warnings 2025-09-01 13:00:57 +02:00
l10n daemon script
1d9708ffa4 GIT_SILENT Sync po/docbooks with svn 2025-09-01 01:41:21 +00:00
Tobias Fella
c55f30be5b Fix some more warnings around emoji components 2025-08-31 23:01:51 +02:00
Tobias Fella
669a00a7e3 Fix most qml warnings in RoomContextMenu 2025-08-31 22:55:58 +02:00
Tobias Fella
51fe090043 Fix warnings in EmojiPicker 2025-08-31 22:51:30 +02:00
Tobias Fella
cf85d0fc0d Fix some qml warnings 2025-08-31 22:38:24 +02:00
Tobias Fella
c257ac504b Fix warning 2025-08-31 22:35:19 +02:00
Joshua Goins
9412f7e189 Fix compact mode not filling all available space
This seems to be an unintentional change in compact mode caused by 054f87cae2,
where an if check for "straight line" or "fill width" mode ended up
being removed. But this was needed for availableWidth() to return the
correct width for compact mode, otherwise it got weirdly centered and
ended up with a limited width.
2025-08-31 10:03:57 -04:00
Joshua Goins
385fafa51c Re-arrange appearance page to group similar settings together
I re-arranged everything now so it makes more semantic sense, e.g. all
the message layout stuff is together in one card. I also made
bubble-only options hide themselves to reduce the amount of clutter
for compact layout users. Some small grammatical things were changed
like "Show Avatar" -> "Show Avatars".
2025-08-31 10:03:46 -04:00
Joshua Goins
c7e409abe9 Improve the event loading indicator somewhat
I added ellipses so it matches the other loading placeholder we have. I
also removed the spacing in it's layout, because there is more than
enough space inside of BusyIndicator itself that it makes the
additional spacing look odd.
2025-08-30 22:01:19 -04:00
Joshua Goins
98816aedd4 Set the correct palette colors for selections in quotes
This bothered me a for a while, but I finally remembered to change it
now.
2025-08-30 22:01:07 -04:00
Joshua Goins
38c66d1b7d Clip commonly seen labels used for display names to prevent Unicode spam
Unfortunately a pretty common spam/annoyance online is putting "spam"
via abusing Unicode symbols - which is used for multilingual support -
in display names. This typically results in an unreadable word jumble in
our UI, which looks bad.

So I decided to put a stop to that by clipping some labels that could be
used for this crap. I didn't cover *everything* yet, but this at least
prevents these idiots from showing up in the completion menu, the room
member list and as authors for messages.
2025-08-30 22:00:55 -04:00
Joshua Goins
0e01a43aab Ensure we update the avatar item when switching to Compact mode
This fixes an always-reproducible bug by switching from Bubbles (with
"move local messages to the right" enabled) to Compact, and your
avatar is missing until you switch rooms or restart NeoChat.

The various flags to inform the rest of the delegate of the avatar were
returning true, but the actual avatar item was never created when the
option was switched on.
2025-08-30 21:52:33 -04:00
l10n daemon script
ddf67aef94 GIT_SILENT Sync po/docbooks with svn 2025-08-31 01:42:36 +00:00
Joshua Goins
fa8294d4b9 Add action to user detail dialog to search for their messages in room
In other messaging applications (e.g. Discord) this is possible through
text modifiers like "from:@user". We don't support that, and I'm not
super keen on implementing yet-another-parsing-thing, so an action in
the user detail dialog should work for now.

Very useful to sift through large rooms but when you only care about a
specific person's messages (maybe your own?)
2025-08-30 13:19:46 -04:00
James Graham
8ad822fd0b Fix the link preview insert lambda to make sure that it doesn't crash
Fix the link preview insert lambda to make sure that it doesn't crash and also make sure that the system doesn't lock up on link preview load
2025-08-30 12:49:11 +01:00
Tobias Fella
69568c628f Also fix live locations 2025-08-30 11:39:20 +00:00
Tobias Fella
62a770b3e2 Fix showing Location events
- Initialize required properties
- Use event's body as display
2025-08-30 11:39:20 +00:00
Tobias Fella
9b65ae1e66 Cleanup LocationsModel
Use libQuotient's event properties instead of accessing data from raw json
2025-08-30 11:30:28 +00:00
Tobias Fella
5d5295d06d Modernize job handling 2025-08-30 10:23:45 +00:00
l10n daemon script
8f7be9993c GIT_SILENT Sync po/docbooks with svn 2025-08-30 01:43:35 +00:00
Joshua Goins
821d7621e3 Change chat bar text field back to plain text
This was changed in 9ed5224470 but this
ended up causing all sorts of strange formatting issues like the quick
format bar not working, and pastes from other applications that kept the
formatting.
2025-08-29 18:18:01 -04:00
Tobias Fella
91b00a34b7 Simplify code 2025-08-29 22:22:44 +02:00
Tobias Fella
19e74b60a9 Reduce nesting 2025-08-29 22:22:44 +02:00
Tobias Fella
5ee5991c39 Use contentPart instead of contentJson 2025-08-29 22:22:44 +02:00
Tobias Fella
abffeec938 Refactor accountmanager 2025-08-29 17:08:15 +02:00
Tobias Fella
77ac811498 Make delegate take maximum width while editing a message 2025-08-29 15:07:20 +00:00
Tobias Fella
1ba6b840db Bump Qt version dependency 2025-08-29 15:06:57 +00:00
Tobias Fella
bfb640487f Fix connection 2025-08-29 14:21:19 +00:00
Joshua Goins
4b3cc750a1 Remove Kirigami.OverlayZStacking from HoverLinkIndicator
I forgot this is for Popups only, let's just go back to the good
old days of hardcoding a Z value.
2025-08-29 10:06:08 -04:00
Joshua Goins
8bef9713fd Hide Purpose's own "Copy to Clipboard" function
This was added recently to Purpose, and it's not too useful for us.
We already have a bunch of better, more integrated ways to copy
events to the clipboard.
2025-08-29 10:02:50 -04:00
Tobias Fella
889bf9cbc6 Simplify event context menu open
There's no reason to pass the author from QML to C++, we can query the author in the backend
2025-08-29 15:17:19 +02:00
l10n daemon script
003ab4f278 GIT_SILENT Sync po/docbooks with svn 2025-08-29 01:41:59 +00:00
Tobias Fella
a6b9759a31 Unify Delegate context menus
The menus have always been split into a menu for file-like content and text-like content

This split makes some things a bit more complicated then necessary.
2025-08-28 22:43:42 +02:00
Tobias Fella
5c5dcd555b Fix compilation warnings about QFile::open 2025-08-28 15:16:08 +02:00
Tobias Fella
8098fce461 Fix qml name of timeline-memtest 2025-08-28 14:32:54 +02:00
l10n daemon script
227ea231d5 GIT_SILENT Sync po/docbooks with svn 2025-08-28 01:46:47 +00:00
Tobias Fella
35ac1b7a55 Tests: Rewrite server sync handling
Implements #696
2025-08-27 22:59:39 +02:00
l10n daemon script
86be1d82bc GIT_SILENT Sync po/docbooks with svn 2025-08-27 01:44:37 +00:00
Tobias Fella
c6dd82d2ff Don't link kirigami in memorytests 2025-08-26 13:40:25 +02:00
l10n daemon script
2624ed1817 GIT_SILENT Sync po/docbooks with svn 2025-08-26 01:42:10 +00:00
Tobias Fella
8706ee950e Minor fix to StateModel 2025-08-25 15:21:51 +02:00
l10n daemon script
bde27dc826 GIT_SILENT Sync po/docbooks with svn 2025-08-25 01:42:35 +00:00
Tobias Fella
25b4ee2efb Ifdef trayicon a bit more for android 2025-08-24 16:25:52 +02:00
Tobias Fella
e7f6adaa01 Refactor Controller 2025-08-24 16:12:52 +02:00
Tobias Fella
bb3e28bc43 Fix runtime qml warning 2025-08-24 11:56:22 +02:00
Tobias Fella
026db80391 Use logging category for some qDebugs 2025-08-24 10:07:59 +02:00
l10n daemon script
2c09a48c8d GIT_SILENT Sync po/docbooks with svn 2025-08-24 01:40:42 +00:00
Joshua Goins
6e0931e31b Improve search experience somewhat
So I noticed that searching for messages feels "buggy". I dove into the
code and gave it a pretty nice refresh, I know you'll like it once you
try it!

Some of the issues I noticed and are now fixed:
* The search doesn't clear immediately when you clear the text box, it's
delayed like everything else. This also has the knock-on effect of
starting random network requests.
* If you now press the search button (either with a mouse, pen, etc. or
by the keyboard) the search delay timer was still running.
* The "nothing is here" placeholder message appears when the search
timer is running, making you think no messages were found.

These changes also help other places where SearchPage is used, not just
message search.
2025-08-23 17:52:11 -04:00
Joshua Goins
1424b8ce42 Add icons to placeholder messages in search pages 2025-08-23 17:52:11 -04:00
Joshua Goins
f5f151681d Fix HAVE_KUNIFIEDPUSH not applying anymore
This compile-time definition was separated from the code during some
refactor.
2025-08-23 17:23:53 -04:00
Tobias Fella
306d75a9b0 Refactor saved room management and fix closing room when switching account
Relevant fixes hidden behind some refactoring:
- set m_lastRoomConfig per-user while setting the connection
- fold m_lastSpaceConfig into m_lastRoomConfig
- set current room to empty explicitely when there is no room
2025-08-23 23:04:39 +02:00
Tobias Fella
ee33a70bb2 Fix opening "Home space" on startup
There was a mismatch here between the value used in the config ("Home") and the value used in the property (empty string)
2025-08-23 23:04:39 +02:00
Tobias Fella
bd80390daa Improve InviteUserPage 2025-08-23 22:53:42 +02:00
Tobias Fella
0fa490f532 Fix crash on shutdown and simplify code 2025-08-23 22:39:25 +02:00
Tobias Fella
1c7cc45d8e Remove unused member 2025-08-23 12:17:49 +02:00
l10n daemon script
f3288c2e34 GIT_SILENT Sync po/docbooks with svn 2025-08-23 01:42:57 +00:00
Volker Krause
7eff1eec56 Only build the KUnifiedPush client inside a Flatpak
We neither need nor want the distributor nor the host configuration UI
here.

While at it, update to 25.08.0.
2025-08-22 17:34:05 +02:00
Tobias Fella
85c7b1a3fc Enable qmllint on CI 2025-08-22 14:15:55 +00:00
Tobias Fella
5c82c07f06 Fix search menu items 2025-08-22 10:49:39 +02:00
l10n daemon script
fcf125f9ca GIT_SILENT Sync po/docbooks with svn 2025-08-22 01:41:37 +00:00
l10n daemon script
8ae13adbcd GIT_SILENT made messages (after extraction) 2025-08-22 00:42:21 +00:00
Tobias Fella
1e1ad389e3 UserSearchPage: Move "Enter User ID" action into placeholder 2025-08-21 17:50:48 -04:00
Joshua Goins
f58212e8de Improve look of the HoverLinkIndicator and other refactorings
It still looks generally the same, except now:
* It doesn't take up the full width of the window (this was a mistake.)
* It now nicely fades in and out.
* It uses Kirigami's built-in OverlayZStacking object instead of
hardcoding a Z of 20.
* A border is now added which helps make it stand out compared to the
chat bar, which it frequently is on top of.
* The seemingly unused accessibility string is removed.
2025-08-21 17:50:33 -04:00
Tobias Fella
8622087e51 Cleanup Permissions page 2025-08-21 23:20:32 +02:00
Tobias Fella
5fc59b0d66 Cleanup RoomSecurityPage 2025-08-21 23:20:32 +02:00
Tobias Fella
5aeefea5c0 Cleanup RoomGeneralPage 2025-08-21 23:20:32 +02:00
Tobias Fella
52e9c9e8e2 Fix room list placeholders 2025-08-21 23:16:28 +02:00
Tobias Fella
ae69401d57 Fix clicking on a reply to get to the replied-to message 2025-08-21 17:27:45 +02:00
Justin Zobel
2339cad49f Uppercase OK 2025-08-21 22:58:00 +09:30
Tobias Fella
8f6683fd1d Fix most qml warnings in RoomListPage 2025-08-21 09:30:17 +02:00
Tobias Fella
74deb684e1 Don't show AddDirect delegate if we don't have any DMs
In this case, it's nicer to fall back to the placeholder, which has the same action
2025-08-21 09:15:36 +02:00
l10n daemon script
54a918b0cf GIT_SILENT Sync po/docbooks with svn 2025-08-21 01:45:15 +00:00
Tobias Fella
55c9b09b24 Add translation context 2025-08-20 20:19:13 +02:00
James Graham
0d63fce59a Apply all the required styling in cpp
Apply all the required styling to show links, table, spoilers, etc in cpp. This also updates the method of revealing spoilers so now you can click to reveal then click again to hide.
2025-08-20 17:10:44 +01:00
Joshua Goins
4498d4457b Set source size in link preview images
This prevents them from looking super jagged when we scale down a
high-res image into a small (usually ~70px in height) space.
2025-08-20 08:58:37 -04:00
Joshua Goins
83415d202a Handle more states in KeyVerificationDialog
We were specifically missing WAITINGFORKEY and WAITINGFORACCEPT, which
does happen and could be delayed - resulting in a blank screen for a few
seconds.

CCBUG: 508483
2025-08-20 08:58:26 -04:00
Tobias Fella
ed65855cdd Add autotest for server notice handling 2025-08-19 23:09:38 +02:00
Tobias Fella
1477159376 Show banner informing the user about server notices 2025-08-19 23:09:38 +02:00
Tobias Fella
53a88708d6 Only show server notices at the top if they have unread messages 2025-08-19 23:09:13 +02:00
Tobias Fella
8eb8803afd Add room category for server notices 2025-08-19 23:09:10 +02:00
l10n daemon script
20e30982cf GIT_SILENT Sync po/docbooks with svn 2025-08-19 02:05:09 +00:00
Tobias Fella
e13b82f66a Revert patch using features not yet available in flatpak 2025-08-18 17:09:50 +00:00
Tobias Fella
8e50388031 Revert KF6 version bump in flatpak 2025-08-18 17:09:50 +00:00
Tobias Fella
fb21686894 Bump KF6 dependency version 2025-08-18 17:09:50 +00:00
l10n daemon script
62faf0f784 GIT_SILENT Sync po/docbooks with svn 2025-08-18 01:41:27 +00:00
Tobias Fella
be377d9ad8 Update uri for libquotient 2025-08-17 22:01:09 +02:00
l10n daemon script
ab8e2f7573 GIT_SILENT Sync po/docbooks with svn 2025-08-17 01:40:12 +00:00
Darshan Phaldesai
7991429ef4 appstream: fix developer id 2025-08-16 12:28:53 +09:30
l10n daemon script
e3b70a14be GIT_SILENT Sync po/docbooks with svn 2025-08-16 01:42:20 +00:00
Tobias Fella
39abf6b5f3 Start adding tests for RoomManager 2025-08-15 08:10:08 +00:00
l10n daemon script
096842bd3a GIT_SILENT Sync po/docbooks with svn 2025-08-15 01:51:42 +00:00
Tobias Fella
c69db9d375 Improve chatbar actions
Introduce a new type BusyAction that wraps Kirigami.Action with the added isBusy property. This makes QML a bit happier
2025-08-14 20:56:26 +00:00
Tobias Fella
ec36d519b1 Cleanup and fix GlobalMenu 2025-08-14 22:47:42 +02:00
Tobias Fella
45b02ae34e Cleanup buttons
Mostly removing the usage of the action property, since there's no point in using it. Also add some translation contexts and some other minor cleanup
2025-08-14 20:46:46 +00:00
Kai Uwe Broulik
9b763daf52 notificationsmanager: Don't draw room avatar if it is null
Ideally, we painted the avatar with initials here but for now
it's better to not paint anything than an awkward white circle.
2025-08-14 11:28:18 +00:00
Tobias Fella
6e8ed5b341 Fix qml warnings in NewPollDialog 2025-08-14 09:23:04 +00:00
Tobias Fella
63a3c3e58a Fix build with kio 2025-08-14 09:22:16 +00:00
Tobias Fella
aadd9b0189 Fix qmllint warnings in QuickFormatBar 2025-08-14 09:20:28 +00:00
l10n daemon script
39f595e45d GIT_SILENT Sync po/docbooks with svn 2025-08-14 01:46:59 +00:00
Tobias Fella
823b2d3747 Add translation context 2025-08-13 22:13:59 +02:00
Tobias Fella
eb268576da Fix some warnings 2025-08-13 22:13:53 +02:00
Tobias Fella
8e51f3ec8e Fix some type warnings 2025-08-13 21:52:36 +02:00
Tobias Fella
de03e1ce2b Remove unused import 2025-08-13 21:52:22 +02:00
Tobias Fella
21b1258b8d Only allow opening QuickSwitcher if there is an active connection 2025-08-13 21:46:43 +02:00
Tobias Fella
becad8c127 Fix qml warnings in QuickSwitcher 2025-08-13 21:45:15 +02:00
Tobias Fella
4044048352 Add translation context 2025-08-13 21:44:34 +02:00
Tobias Fella
7d6bd7ab4c Add contexts to string 2025-08-13 21:37:05 +02:00
Tobias Fella
209ae00f8f Remove unused imports 2025-08-13 21:36:45 +02:00
Tobias Fella
f64c860453 Register dependency on KSyntaxHighlighting 2025-08-13 21:36:14 +02:00
Tobias Fella
36fccaffe6 Fix warnings 2025-08-13 21:32:45 +02:00
Tobias Fella
13deb2d928 Fix qmllint warnings 2025-08-13 21:26:24 +02:00
Tobias Fella
14fe71b556 Fix most warnings in AccountSwitchDialog 2025-08-13 19:37:21 +02:00
Tobias Fella
ecb900994b Remove unused import 2025-08-13 19:30:14 +02:00
Tobias Fella
55b97b469e Fix some qmllint warnings 2025-08-13 19:20:45 +02:00
Tobias Fella
1d594b492d Remove unused imports 2025-08-13 19:18:26 +02:00
Tobias Fella
3902293de7 Add translation contexts 2025-08-13 19:14:54 +02:00
Tobias Fella
a8bc51667c Fix various warnings and add translation contexts 2025-08-13 19:07:06 +02:00
Tobias Fella
0bcf6e74c0 Fix warnings in SearchPage 2025-08-13 18:56:37 +02:00
Tobias Fella
78b218fef3 Fix some qml type warnings 2025-08-13 17:43:51 +02:00
Tobias Fella
964bcfd5f5 Register dependency on KConfig to qml 2025-08-13 17:41:32 +02:00
Tobias Fella
fc733f9ba1 Fix some unqualified access warnings 2025-08-13 17:41:23 +02:00
l10n daemon script
e7e83fa789 GIT_SILENT Sync po/docbooks with svn 2025-08-13 01:41:50 +00:00
Tobias Fella
ef4f11546f Fix copying images 2025-08-12 14:20:57 +00:00
l10n daemon script
648796b9e0 GIT_SILENT Sync po/docbooks with svn 2025-08-12 01:42:57 +00:00
Tobias Fella
3b5da2473d Add missing copyright statement 2025-08-11 23:18:56 +02:00
Tobias Fella
9a04ae3e02 Fix opening files externally 2025-08-11 23:05:57 +02:00
James Graham
9ed5224470 Have ChatDocumentHandler update ChatBarCache text
Have ChatDocumentHandler update ChatBarCache text so all text operations in the ChatBar go through it
2025-08-11 19:33:58 +01:00
James Graham
bc82ceeb5f Simpify the API for ChatDocumentHandler
Simpify the API for ChatDocumentHandler by taking the text item and grabbing everything else needed from there
2025-08-11 19:23:40 +01:00
Tobias Fella
5f7ff209d3 Add .contextProperties.ini
Tells qmlls to ignore i18n context properties
2025-08-11 17:35:02 +02:00
Tobias Fella
35b363fdce Update room versions in security settings
We need to come up with a better way of testing the versions here, but that's for different patch
2025-08-11 10:07:19 +00:00
Tobias Fella
a74931e794 Refactor qml 2025-08-11 12:04:10 +02:00
Tobias Fella
6698bbcf79 Fix warning 2025-08-11 12:04:10 +02:00
Tobias Fella
8c78992b1a Remove broken and duplicate code 2025-08-11 12:04:08 +02:00
l10n daemon script
04e3b88e8c GIT_SILENT Sync po/docbooks with svn 2025-08-11 01:42:20 +00:00
l10n daemon script
9b8b13e98e GIT_SILENT made messages (after extraction) 2025-08-11 00:42:48 +00:00
l10n daemon script
e6dd6aec7f GIT_SILENT Sync po/docbooks with svn 2025-08-10 01:44:51 +00:00
l10n daemon script
c6f0879c9c GIT_SILENT Sync po/docbooks with svn 2025-08-09 01:39:31 +00:00
Joshua Goins
9e7ae37add Partially revert recent RoomMedia change to make it work again
This reverts part of f288367653 which
touches this file. I'm not entirely sure why it was changed, it looks
like a piece of refactoring that isn't complete yet, but MessageDelegate
still depends on a required room property.
2025-08-08 08:39:08 -04:00
Tobias Fella
0c727237ee Remove Edit menu
This menu providers a few text editing related functions, like undo/redo, copy, paste, etc.
As far as I can tell, it never worked in a useful way, though: It operates on the activeFocusItem,
but as soon as one clicks on the menu, this becomes null. It is somewhat useable through shortcuts,
but the text fields have these shortcuts natively.
2025-08-08 08:25:51 -04:00
Joshua Goins
bf66118355 Change "Copy Room Address" action to "Copy Room Link"
This is way more useful for sharing, as you can use this link in and
outside Matrix rooms. It also matches behavior with other clients like
Element Web.

I also cut some places where this shows unnecessarily, such as direct
chats and invite-only private rooms.
2025-08-08 08:25:34 -04:00
Tobias Fella
aacb097650 Add libQuotient qml module dependencies
The module doesn't exist upstream yet; this will just be ignored in that case
2025-08-08 13:42:24 +02:00
Tobias Fella
ce5d60fc5d Fix QML warning 2025-08-08 13:42:00 +02:00
Tobias Fella
96a0b86c33 Fix some unqualified access warnings 2025-08-08 13:39:06 +02:00
Tobias Fella
279b611754 Remove unused prison 2025-08-08 10:42:38 +02:00
Tobias Fella
f7c74a60cd Port away from applicationWindow() 2025-08-08 10:29:48 +02:00
l10n daemon script
3465fc7d39 GIT_SILENT Sync po/docbooks with svn 2025-08-07 19:27:58 +00:00
l10n daemon script
6381f06acb GIT_SILENT made messages (after extraction) 2025-08-07 18:30:01 +00:00
l10n daemon script
a7c7a5c72d GIT_SILENT Sync po/docbooks with svn 2025-08-07 01:42:12 +00:00
l10n daemon script
c8ded65e46 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-08-07 01:33:59 +00:00
l10n daemon script
729b46fc71 GIT_SILENT made messages (after extraction) 2025-08-07 00:42:54 +00:00
Tobias Fella
e63e04aa57 Fix QML warning 2025-08-07 00:21:10 +02:00
Tobias Fella
ae88879651 Remove unused kitemmodels imports 2025-08-07 00:19:18 +02:00
Tobias Fella
dfd106258b Fix some warnings around pagestack calls 2025-08-07 00:05:52 +02:00
Tobias Fella
4d29b9fd57 Fix qml warning 2025-08-06 23:53:04 +02:00
Tobias Fella
3de7ad237a Fix qml warning 2025-08-06 23:51:56 +02:00
Tobias Fella
7d4e589894 Remove some unused includes 2025-08-06 23:49:27 +02:00
Tobias Fella
4bbd127fe8 Fix some unqualified access 2025-08-06 23:47:28 +02:00
Tobias Fella
f2a0a66b01 Fix connection 2025-08-06 23:47:28 +02:00
James Graham
143c685045 Fix creating a new thread locally
Fix creating a new thread locally. We need to listen for the newThread signal and update the thread root event mode content
2025-08-06 18:10:03 +01:00
Tobias Fella
b8fa6f0690 Fix font sizes 2025-08-06 15:34:33 +02:00
Joshua Goins
93b6c53c82 Remind the user if they're trying to reply to someone who has left
This happens semi-frequently to me and others - we reply to a user who
has left the room. Sometimes this is useful (for example, bringing up a
previous topic) but in most cases this is accidental, and almost
guaranteed to happen if you turned off join/leave events.

So I added a reminder when replying - which manifests as a small label
in the chatbar - that the user has left and can't be notified of your
reply.
2025-08-06 08:13:49 -04:00
l10n daemon script
6822a1ef08 GIT_SILENT Sync po/docbooks with svn 2025-08-06 01:47:29 +00:00
Justin Zobel
12b7c25395 Flatpak: Update kunifiedpush project ID and URL as it is now in KDE Gear and update the version 2025-08-05 09:30:29 +00:00
Justin Zobel
42c0060122 Flatpak: Upgrade libsecret 2025-08-05 09:30:29 +00:00
Justin Zobel
b30ee55a81 Flatpak: Add cleanup 2025-08-05 09:30:29 +00:00
Tobias Fella
9d2ef838bb Don't crash when trying to open a context menu on a pending event 2025-08-05 09:17:13 +00:00
Tobias Fella
b5351e48dd Add tooltip to "remove server" button 2025-08-05 09:16:27 +00:00
l10n daemon script
7b437d91e1 GIT_SILENT Sync po/docbooks with svn 2025-08-05 01:54:03 +00:00
Nicolas Fella
a9d39353ab Add XDG activation support to rooms runner 2025-08-04 21:49:05 +02:00
Tobias Fella
5f778dbd81 Add some translation contexts 2025-08-04 21:27:28 +02:00
Nate Graham
b01286eae3 plasma-runner-neochat: remove unnecessary minimum letter count
Users generally expect search results to start appearing with the first
character typed; we shouldn't be setting minimum letter counts without
a very good reason. Excessive minimum letter counts are also bad
specifically for Chinese, which is highly information-dense.

Get rid of the minimum letter count.

CCBUG: 490972
2025-08-04 09:18:18 -06:00
Tobias Fella
4688802628 Cleanup CommonRoomsModel
- Remove unused include
- Remove roles that don't make sense
2025-08-04 17:14:32 +02:00
l10n daemon script
0282f2c7aa GIT_SILENT Sync po/docbooks with svn 2025-08-04 01:47:41 +00:00
Tobias Fella
53d0fd1663 Improve spacing in mobile UserInfo 2025-08-03 17:26:39 +02:00
l10n daemon script
24bdb7d651 GIT_SILENT Sync po/docbooks with svn 2025-08-03 01:41:12 +00:00
James Graham
dc32f2f947 Update ChatDocumentHandler so RoomManger is no longer required for saving text
Update `ChatDocumentHandler` so `RoomManger` is no longer required for saving the text in the chatbar between room switches. This is achieved by allowing `ChatDocumentHandler` to get the correct `ChatBarChache` itself rather than having to have it passed from `ChatBar.qml`. This avoids any race conditions.
2025-08-02 10:56:20 +01:00
l10n daemon script
401cf29ca8 GIT_SILENT Sync po/docbooks with svn 2025-08-02 01:39:43 +00:00
Nate Graham
f16dea85ed flatpak: add org.kde.kuiserver talk permission
This lets it use the notification infrastructure, e.g. when uploading or
downloading files.
2025-08-01 18:57:28 -06:00
James Graham
b4e1740cad Separate out a base MessageContentModel.
Separate out a base `MessageContentModel` that can be extended to get the component types from different places. This is used currently for `EventMessageContentModel` but will be used later as part of the rich chat bar.

All display text is now in the text component so it never needs special casing. This also cleans up some of the model parameters so more things come from attributes including location and file data (which was already a qvariantmap anyway).

Also cleaned up the itinerary and file enhancement views,
2025-08-01 12:15:51 +01:00
Tobias Fella
501f14fead Fix account switching on logout 2025-08-01 12:27:35 +02:00
Tobias Fella
d14466451d Fix loading 2025-08-01 12:11:35 +02:00
Tobias Fella
f7cd4bd2fb Don't set initial properties that don't exist 2025-08-01 11:43:09 +02:00
Tobias Fella
7742c6d4b0 Fix common crash during login 2025-08-01 09:26:31 +00:00
l10n daemon script
4f6dd50320 GIT_SILENT Sync po/docbooks with svn 2025-08-01 01:44:41 +00:00
Heiko Becker
92f77860dd GIT_SILENT Update Appstream for new release
(cherry picked from commit 699026fc2f)
2025-08-01 00:54:12 +02:00
l10n daemon script
03035b735d GIT_SILENT Sync po/docbooks with svn 2025-07-31 01:38:18 +00:00
Wang Yu
4e0b295f66 Replace duplicate beginResetModel with endResetModel
The initialize method was calling beginResetModel twice without
a corresponding endResetModel call. This could cause model state
inconsistencies.
2025-07-30 16:31:56 +08:00
l10n daemon script
8cbd3f5e0f GIT_SILENT Sync po/docbooks with svn 2025-07-30 01:40:03 +00:00
Joshua Goins
a0b3e484f5 Send thumbnails when uploading videos
NeoChat will now generate thumbnails from the first frame of the video,
since we are loading it anyway. This makes the experience of exchanging
videos in NeoChat much nicer!
2025-07-29 16:41:33 -04:00
Tobias Fella
8ff83ca6df Cleanup QML code for AccountMenu 2025-07-29 20:16:14 +00:00
Joshua Goins
5fe28cb183 Suggest verifying your own device in Devices settings
This button is currently hidden under the user menu, but it should be
shown more prominently - especially under the Devices settings. The
button under the user menu and this new one is now hidden when your
device is already verified.
2025-07-29 15:02:30 -04:00
l10n daemon script
17af4dfddb GIT_SILENT Sync po/docbooks with svn 2025-07-29 01:40:25 +00:00
Tobias Fella
43c6349359 Add translation context 2025-07-28 22:37:28 +02:00
Tobias Fella
265494ee44 Remove unused import 2025-07-28 22:37:05 +02:00
Tobias Fella
a9e4996191 Remove broken code 2025-07-28 22:35:30 +02:00
Tobias Fella
6e3276826d Fix positioning of mobile accounts popup 2025-07-28 22:35:15 +02:00
Tobias Fella
bfe976c438 Remove some unused includes 2025-07-28 21:50:41 +02:00
James Graham
f288367653 Add a dev setting to allow relations to be sent to any message
Add a dev setting to allow relations to be sent to any message using the right click delegate menu. This shouldn't be a main feature, but since it's technically allowed in matrix this will help any future debugging
2025-07-28 19:47:29 +01:00
Tobias Fella
6082bc89b0 Remove "NeoChat" menu item in global menu
BUG: 504429
2025-07-28 15:24:51 +00:00
l10n daemon script
4d3791250b GIT_SILENT Sync po/docbooks with svn 2025-07-28 01:37:39 +00:00
l10n daemon script
04472dae4f GIT_SILENT Sync po/docbooks with svn 2025-07-27 01:40:53 +00:00
Tobias Fella
aa40fc84ea Adapt to power level changes in room version 12 2025-07-26 22:19:07 +00:00
Tobias Fella
24e43d063a Fix test 2025-07-27 00:18:37 +02:00
l10n daemon script
c5caffcdf9 GIT_SILENT Sync po/docbooks with svn 2025-07-25 01:40:12 +00:00
l10n daemon script
95d334ad86 GIT_SILENT Sync po/docbooks with svn 2025-07-23 01:40:50 +00:00
Tobias Fella
602ac5c55f Fix opening EditStateDialog 2025-07-22 21:02:51 +02:00
l10n daemon script
247423bf83 GIT_SILENT Sync po/docbooks with svn 2025-07-22 01:42:47 +00:00
l10n daemon script
24d35b3eae GIT_SILENT Sync po/docbooks with svn 2025-07-21 01:41:16 +00:00
l10n daemon script
8bcd9f7469 GIT_SILENT Sync po/docbooks with svn 2025-07-20 01:41:17 +00:00
Tobias Fella
edf5d55da4 Prepare for new RoomId format
See MSC4291
2025-07-19 13:45:23 +00:00
l10n daemon script
976af783e2 GIT_SILENT Sync po/docbooks with svn 2025-07-19 06:16:11 +00:00
l10n daemon script
d87954838e GIT_SILENT Sync po/docbooks with svn 2025-07-18 01:38:52 +00:00
Joshua Goins
e757331dce Fix reference to Security & Safety settings on the invite screen
It's now called "Security & Safety", not just "Security". I also added a
note for translators to ensure they keep their strings consistent here.
2025-07-17 19:02:37 -04:00
l10n daemon script
bf4f6f5728 GIT_SILENT Sync po/docbooks with svn 2025-07-17 01:38:43 +00:00
Joshua Goins
c73bc8fc29 Redesign the enable encryption room setting
Clients like Element and ours show the room encryption mode as a toggle,
which in my opinion doesn't make sense. It's an irreversible operation,
so it should be a button!

When encryption is already used in the room, the button turns into a
non-interactive card.
2025-07-16 18:23:58 -04:00
Joshua Goins
211a08db68 Add ellipses to various settings actions that have confirm dialogs 2025-07-16 18:23:46 -04:00
Joshua Goins
38987e6d4c Add ellipses to the Report message action
This has a dialog to enter a message associated with the report, so as
suggested by the HIG it should have ellipses.
2025-07-16 18:23:46 -04:00
Joshua Goins
9d76e7e30b Show ellipses for leaving rooms and space actions, and always confirm
The HIG suggests using ellipses for actions that have a confirmation,
and leaving a space or room is one such cases. Otherwise, the user has
no idea if leaving is an immediate, irreversible action.

It turns out there *was* some cases where pressing this button
(especially for spaces) would actually do it without confirmation, which
is now fixed.
2025-07-16 18:23:46 -04:00
Joshua Goins
4c1a8d3657 Show the user's id or a room's canonical alias (if set) in invites
This should prevent the easiest way of masquerading, and provide an \
important identifier for rooms. Note that *only* the room canonical
alias is shown, if it's not set then it's just the display name. This is
intentional as regular users rarely interact with room IDs, but they can
still check it elsewhere in NeoChat.
2025-07-16 18:08:36 -04:00
James Graham
7a5de25885 Further refactor MessageContentModel
Further refactor MessageContentModel. Move away from special casing certian MessageContentTypes. Use forEachComponentOfType more
2025-07-16 18:27:03 +01:00
l10n daemon script
a17aa2c6fa GIT_SILENT Sync po/docbooks with svn 2025-07-16 01:56:47 +00:00
Tobias Fella
207a7876b6 Improve visualization of replies to non-message events 2025-07-15 19:55:35 +00:00
Tobias Fella
4c638a740e Set object ownership for NeoChatRoomMembers 2025-07-15 19:54:24 +00:00
Joshua Goins
0ee89e1b2b Show unable to decrypt events in the room list
These were previously (unintentionally) filtered, but I wanted to add
them because without showing and caching them my DMs look extremely out
of order. And assuming that you get an unexpected "unable to decrypt"
event, you would want that room to "shoot to the top" anyway.
2025-07-15 19:14:54 +00:00
Joshua Goins
4af42a57f4 Fix undefined QML reference in TimelineView
markAllMessagesAsRead() has moved it seems, and this specific case
wasn't changed.
2025-07-15 19:14:41 +00:00
Joshua Goins
34f2c2dabc Stop a room's lastActiveTime from changing because of hidden events
This was just a missed oversight during the refactoring, we need to pass
the hidden filter into NeoChatRoom::lastEvent so it doesn't pick up on
hidden events and push rooms to the top for no discernible reason.

Also, I simplified the function to take out the cached event handling,
because lastEvent is already doing that. The function is const now, too
and has some nicer comments.
2025-07-15 14:44:23 -04:00
l10n daemon script
9ff942915a GIT_SILENT Sync po/docbooks with svn 2025-07-15 01:44:46 +00:00
Tobias Fella
10123abc5b Fix maximizing replied-to media
The previous index-based handling opened the wrong media, as it used the wrong index.
2025-07-14 20:16:34 +00:00
l10n daemon script
ad993d4340 GIT_SILENT Sync po/docbooks with svn 2025-07-14 01:49:19 +00:00
l10n daemon script
ddc0a66d5b GIT_SILENT Sync po/docbooks with svn 2025-07-13 01:40:25 +00:00
l10n daemon script
e8981bdc0f GIT_SILENT Sync po/docbooks with svn 2025-07-12 01:42:05 +00:00
l10n daemon script
c42486a061 GIT_SILENT Sync po/docbooks with svn 2025-07-11 01:40:27 +00:00
l10n daemon script
64d82b8d2a GIT_SILENT Sync po/docbooks with svn 2025-07-10 01:40:11 +00:00
l10n daemon script
677abee890 GIT_SILENT Sync po/docbooks with svn 2025-07-09 01:42:04 +00:00
Joshua Goins
3a25a62350 Refer to global notification settings as "Default Settings" instead
This changes references to "global notification settings" to "default
settings", which should hopefully make it clearer what these actually
are.

Also, a information tip has been added to the settings page to clarify
what these settings do and imply that the per-room settings take
precedence.
2025-07-08 17:17:04 -04:00
l10n daemon script
bc7b480c41 GIT_SILENT Sync po/docbooks with svn 2025-07-08 01:40:16 +00:00
Tobias Fella
d9b495356d Fix roomlist positioning when changing rooms
The room list is supposed to center the new room, but, since the current room as stored in SortFilterRoomTreeModel is only updated after we're jumping to the room, mostly just jumped to the old room.
2025-07-07 18:31:40 +00:00
Tobias Fella
ce82606e6e Fix jumping to replied-to event 2025-07-07 14:20:02 +00:00
l10n daemon script
07837c2e64 GIT_SILENT Sync po/docbooks with svn 2025-07-07 01:38:29 +00:00
Tobias Fella
1738253e6f Don't crash when calling RoomManager::viewEventMenu with empty event id 2025-07-06 23:14:28 +02:00
James Graham
17fa2246da Refine MessageContentModel further
Create some standard functions that should hopefully make it easier to manage the model contents. Used for file stuff for now.
2025-07-06 21:16:17 +01:00
l10n daemon script
4f5e096e7e GIT_SILENT Sync po/docbooks with svn 2025-07-06 01:37:58 +00:00
Albert Astals Cid
b125c284bd GIT_SILENT Upgrade release service version to 25.11.70. 2025-07-05 11:59:46 +02:00
l10n daemon script
87213903b1 GIT_SILENT Sync po/docbooks with svn 2025-07-05 01:39:27 +00:00
James Graham
3d9d211d25 Allow the condition for when messages are automatically marked as read to be configurable.
Title this adds a number of options for when messages should be automatically marked as read for the user to choose from.

![image](/uploads/cef95f8c6c77bfdcabb7a8a309bc1fd2/image.png){width=480 height=262}
2025-07-04 14:36:36 +01:00
James Graham
d5d291396d MessageContentModel improvements
Remove the hack for DelegateChooser and minimise the amount of updates when data changes
2025-07-04 10:28:50 +01:00
l10n daemon script
d7cd38b5e5 GIT_SILENT Sync po/docbooks with svn 2025-07-04 01:39:05 +00:00
l10n daemon script
1a25cfc0e3 GIT_SILENT Sync po/docbooks with svn 2025-07-03 07:51:46 +00:00
l10n daemon script
8d9669e033 GIT_SILENT Sync po/docbooks with svn 2025-07-02 11:07:52 +00:00
l10n daemon script
690d2e2b12 GIT_SILENT Sync po/docbooks with svn 2025-07-02 08:01:01 +00:00
l10n daemon script
2208b1b2b3 GIT_SILENT Sync po/docbooks with svn 2025-07-02 01:40:33 +00:00
Joshua Goins
67da272ccd Add feature flag for the new calls feature
This will be experimental for some time, so we need a way to turn it
on/off for future stable builds.
2025-07-01 14:52:46 -04:00
Joshua Goins
171930fb1d Show a message when failing to download a file
And optionally show an error message, if libQuotient gets one. This
helps in certain rare situations where you just *Cannot* download
something. Before, NeoChat would just reset the image or video without
telling you anything but now there's a nice big error message telling
you what's wrong.
2025-07-01 06:53:59 -04:00
l10n daemon script
2bd59fa16f GIT_SILENT Sync po/docbooks with svn 2025-07-01 01:40:14 +00:00
Joshua Goins
d0d0384bdb Improve the look of loading videos
The video thumbnail is no longer hidden while loading. This makes it
look less buggy (like NeoChat forgot what the thumbnail was) while
loading a large video. To help with contrast, a slight background tint
is added.
2025-06-30 17:21:40 -04:00
James Graham
680573de61 Make sure that thread replies aren't hidden when threads are off 2025-06-30 19:34:27 +01:00
Heiko Becker
ba7f866cf5 GIT_SILENT Update Appstream for new release
(cherry picked from commit 7e87d415ae)
2025-06-30 18:57:23 +02:00
Tobias Fella
57a95ae972 Show nicer text for call member events 2025-06-30 17:17:47 +02:00
Marco Martin
de97275a38 Use new Kirigami builtin column resize handle
Use the new Kirigami.ColumnView.interactiveResizeEnabled attached property
which allows to have a built in resize handle for ColumnView pages
removing the need for a custom handle with resize logic

depends from https://invent.kde.org/frameworks/kirigami/-/merge_requests/1795
2025-06-30 11:25:28 +02:00
l10n daemon script
d08181f56d GIT_SILENT Sync po/docbooks with svn 2025-06-30 01:41:18 +00:00
James Graham
f6e8491bf1 Split message content into its own module
This is laying some groundwork for the rich text chatbar.
2025-06-29 12:43:48 +01:00
l10n daemon script
a1447ebd6f GIT_SILENT Sync po/docbooks with svn 2025-06-29 01:44:03 +00:00
l10n daemon script
3b67e4deaf GIT_SILENT Sync po/docbooks with svn 2025-06-28 01:39:59 +00:00
James Graham
e55afd0402 Move ImageEditorPage to Chatbar module 2025-06-27 16:25:57 +01:00
James Graham
7c0710d445 ActionToolbar is no longer needed now there is only 1 button 2025-06-27 16:08:30 +01:00
James Graham
61f9cd41f7 Initial Account
Restore the functionality where clicking on "edit this account" from the AccountMenu opens setting to the account rather than pushing as its own window
2025-06-27 16:08:14 +01:00
l10n daemon script
6c7a7a7be5 GIT_SILENT Sync po/docbooks with svn 2025-06-27 01:41:18 +00:00
James Graham
63125d97c3 Fix hiding down button on timeline when at the bottom 2025-06-26 14:38:16 +01:00
James Graham
cb4e7d4943 Fix room list header when collapsed 2025-06-26 14:34:18 +01:00
l10n daemon script
b9d5ed699e GIT_SILENT Sync po/docbooks with svn 2025-06-26 01:41:04 +00:00
l10n daemon script
75fe5c8970 GIT_SILENT Sync po/docbooks with svn 2025-06-25 01:42:54 +00:00
Aleix Pol
91da2d01b7 UserInfo: Move the switch user action to the menu
It doesn't clutter the main UI.
It allows us to see the keyboard shortcut.
2025-06-23 23:19:05 +00:00
l10n daemon script
4bade72ce4 GIT_SILENT Sync po/docbooks with svn 2025-06-23 01:39:47 +00:00
l10n daemon script
9c05e2feed GIT_SILENT Sync po/docbooks with svn 2025-06-22 01:45:29 +00:00
l10n daemon script
ba94098411 GIT_SILENT Sync po/docbooks with svn 2025-06-21 01:41:18 +00:00
James Graham
43c691160e Update the RoomTreeSection to use standard Kirigami.ListSectionHeader 2025-06-20 07:42:43 +01:00
James Graham
e2daa091e8 Switch section delegate for standard Kirigami.ListSectionHeader
Switch section delegate for standard Kirigami.ListSectionHeader, SectionDelegate is no longer required so removed.
2025-06-20 07:42:14 +01:00
l10n daemon script
f026414b1a GIT_SILENT Sync po/docbooks with svn 2025-06-20 01:39:04 +00:00
l10n daemon script
fd640a4bd0 GIT_SILENT Sync po/docbooks with svn 2025-06-19 01:39:06 +00:00
l10n daemon script
dd433d7f99 GIT_SILENT Sync po/docbooks with svn 2025-06-18 01:39:30 +00:00
James Graham
3183e00acc Fix Use After Free MessageDelegateBase
Make sure that a `MessageDelegateBase` is not used after free by a `MessageObjectIncubator` callback by tracking them and cleaning them up on deletion of a `MessageDelegateBase`
2025-06-17 17:19:38 +01:00
James Graham
1860de12ea RoomPage cleanup
This does some further cleanup of RoomPage, mostly removing all the vestigial bits from when we could have multiple windows. But also stuff is moved to TimelineView where possible.

The loading placeholder is removed as TimelineModel already has this built in.

TimelineView now gets room from it's model. This is to ensure we're always using the same room as it which may not be true momentarily when RoomManager.currentRoom changes as the model does it's own reset sequence. This will prevent some race conditions in future (and which I already hit creating other MRs)
2025-06-17 16:41:38 +01:00
l10n daemon script
277f1ab252 GIT_SILENT Sync po/docbooks with svn 2025-06-17 01:40:15 +00:00
Thiago Sueto
324b332fa6 Add confirmation prompt to reset all configuration
Resetting all configuration is destructive, it should require a confirmation prompt instead of triggering immediately.
2025-06-16 18:00:06 +00:00
James Graham
33d29f6b02 Fix jump to last message button trigger, the list view is no longer root. 2025-06-16 18:04:25 +01:00
l10n daemon script
419aed6375 GIT_SILENT Sync po/docbooks with svn 2025-06-16 01:39:23 +00:00
Aleix Pol
7bb26ac3be main: Add a replace option
Much like many other unique KDE components, add --replace so the running
instance can be replaced by the new one. Useful for development.
2025-06-15 23:07:40 +02:00
Aleix Pol
7654333ec1 ImageComponent: Can't make a qreal undefined
Using -1 because MediaSizeHelper is already handling negative numbers as
such.
2025-06-15 23:07:40 +02:00
Aleix Pol
d3a2da391d flatpak: Use the Qt 6.9 runtime
It's all the fresh!!
2025-06-15 23:07:40 +02:00
Aleix Pol
f19f59c37f EmojiPicker: Fix delegate for stickers
There's no avatarUrl in ImagePacksModel, it's just url.
2025-06-15 23:07:40 +02:00
Aleix Pol
94e53e14a3 UserInfo: Use "Account" naming consistently
We use "Account" in the settings so we better use the same concept
across the UI.
2025-06-15 23:06:15 +02:00
Manuel Alcaraz Zambrano
d2b3788872 Remove QCoro from Flatpak
QCoro is already available on the runtime.
2025-06-15 12:07:24 +02:00
l10n daemon script
8095062db2 GIT_SILENT Sync po/docbooks with svn 2025-06-15 01:40:14 +00:00
Tobias Fella
89beaa9316 Remove stray warning 2025-06-15 00:29:34 +02:00
Carl Schwan
dfaffd043e Cleanup craft config
Don't build master version of some modules
2025-06-14 12:13:31 +00:00
Tobias Fella
a8c200222f Don't parent PollHandler to room
PollHandlers are stored in a QCache, which takes over ownership of the object. At the same time, PollHandler currently relies on its parent being the room.
Somehow, this didn't explode entirely, but only leads to minor problems like crashes on shutdown.
2025-06-14 12:13:16 +00:00
Tobias Fella
598a1c28ac Add button for hiding images and videos 2025-06-14 12:12:01 +00:00
Tobias Fella
b972703f34 Refactor and fix opening file-based content
The relevant fix is checking whether the the event is file-*based* (i.e., image, video, audio, file), not whether it *is* a file
2025-06-14 12:07:56 +00:00
Tobias Fella
d30fdc67c6 Remove file logging
This hasn't proven to be as useful as i had hoped:
- My arcane logic for determining logging categories is apparently broken
- It won't work with the logging by the new crypto sdk
- I never actually ended up looking at my own logs, or anyone else's
- It seems to cause crashes
2025-06-14 11:57:23 +00:00
James Graham
6a5a2e6144 Refactor TimelineView
Refactor TimelineView to make it more reliable and prepare for read marker choice. This is done by creating signalling from the mode when reset which can be used to move the scrollbar to the newest meassage.

Some of the spaghetti is also removed so there is no need for ChatBar and TimelineView to talk directly.

The code to mark messages as read if they are all visible after 10s has been removed infour of just marking as read on entry if all are visible. This is temporary until a follow up providing user options is finished (although it will be one of the options)
2025-06-14 12:16:39 +01:00
Kai Uwe Broulik
235143528c MaximizeComponent: Fix download location
No idea where "saveFolder" was supposed to be coming from but this
makes it use the last location or default to downloads, consistent
with the other save dialogs.
2025-06-14 10:08:12 +02:00
l10n daemon script
33ca2b8d09 GIT_SILENT Sync po/docbooks with svn 2025-06-14 01:40:03 +00:00
Aleix Pol
50176cfafb ImageComponent: Do not set undefined to int
An int property cannot be undefined, make it var.
2025-06-13 15:46:30 +00:00
Aleix Pol
a67fb36a84 SpaceHierarchyDelegate: Fix opening rooms
RoomManager is in org.kde.neochat and needs importing
2025-06-13 15:46:30 +00:00
Aleix Pol
aea9984187 DevicesModel: Do not connect until the value is initialised
When the DevicesModel is open, we get a nullptr instance. I guess it's
obvious that it's null because it hasn't been set yet. Move the connect
to the setter.
2025-06-13 15:46:30 +00:00
Freya Lupen
7a6c234b40 macOS: Set app bundle properties
This fixes the app's name being blank in the system.
2025-06-13 08:25:45 +00:00
Freya Lupen
4cdaa513d3 Use Breeze style on macOS, as on other platforms 2025-06-13 08:25:45 +00:00
l10n daemon script
aaf655ea5b GIT_SILENT Sync po/docbooks with svn 2025-06-13 01:39:47 +00:00
Tobias Fella
207c824ec7 Use QML safe member for invitations
Has the sideeffect of making sure that the avatar colors are the same between the invitation view and the sidebar
2025-06-12 12:49:01 +00:00
Tobias Fella
29abe0bacb Use ImageComponent for replies
This automatically gives us the image hiding safety feature

BUG: 503442
2025-06-12 09:04:52 +00:00
Tobias Fella
d14eda2ca0 Hide avatar of inviting user when images are hidden by default
While this reuses the setting for a slightly different purpose, in practice, these safety feature really belong together and it makes sense to have them both under a single option.
In the future, we might want to rephrase the options description
2025-06-11 22:42:49 +02:00
l10n daemon script
0425cf41d0 GIT_SILENT Sync po/docbooks with svn 2025-06-11 01:45:08 +00:00
l10n daemon script
4ff014f288 GIT_SILENT Sync po/docbooks with svn 2025-06-09 01:42:48 +00:00
l10n daemon script
2e24500866 GIT_SILENT Sync po/docbooks with svn 2025-06-08 01:41:02 +00:00
Joshua Goins
f13a256150 Refactor receiveRichPlainUrl text handler test to be data-based
I was originally going to add another test case to this, turns out I
didn't need to. Might as well ship this anyway, as it will make it
trivial to add more in the future.
2025-06-07 07:30:28 -04:00
l10n daemon script
c958e8cba9 GIT_SILENT Sync po/docbooks with svn 2025-06-06 01:38:09 +00:00
Joshua Goins
7668da68d3 Allow accepting reason dialogs with Ctrl+Enter
The original suggestion was the Enter key, but this won't work well as
reasons can take multiple lines. I also made sure the reason control was
focused by default, and that the "Cancel" button has an icon.

BUG: 500990
2025-06-05 12:03:37 +00:00
Heiko Becker
c478a0c0fc GIT_SILENT Update Appstream for new release
(cherry picked from commit 11ebe5316f)
2025-06-02 23:46:47 +02:00
l10n daemon script
fe60a08817 GIT_SILENT Sync po/docbooks with svn 2025-06-02 01:39:15 +00:00
James Graham
dec5369a8f Actually position the view at the end
It turns out that for whatever reason ListView.posiitionViewAtEnd() ignores any whitespace. This means that when we use the function it goes to the last delegate. This is no good as we have some padding at the bottom to make space for the typing indicator.

So the fix for this is stupid and involves adding a "spacer" delegate to the timeline beginning model which is completely invisible but qml see as a delegate so we can both leave the space and properly position the view at the end.

BUG: 501075
2025-06-01 10:37:30 +01:00
Joshua Goins
5ec0b9393e Fix showPassiveNotification call in Account Editor
I hate this thing, I think the standalone account editor was fine, but
it didn't work when I went through account settings. Now that should be
fixed.
2025-06-01 04:51:18 +02:00
l10n daemon script
3d8f724bb1 GIT_SILENT Sync po/docbooks with svn 2025-06-01 01:44:08 +00:00
Joshua Goins
bc7a663f92 Prevent opening the non-existent "Home" space in your web browser
I carved out an exception for "DM", but we need it for "Home" too.

BUG: 504842
2025-05-30 14:43:10 +02:00
l10n daemon script
90369e927f GIT_SILENT Sync po/docbooks with svn 2025-05-30 01:42:16 +00:00
Joshua Goins
034cad79c7 Fix the code block handling for our custom Markdown syntax
There were some cases that was hit that revealed some mistakes in the
code block checking code, which is now fixed. Basically, we just needed
to make sure the indices were updated at the right times. I also took
some time to clean up some of the comments, and magic numbers used here.

A new test case was added that was failing before in real-world testing.
2025-05-29 07:39:13 -04:00
Joshua Goins
5c8ba7e29e Fix space switching on mobile
We forgot to connect to onTapped on the touchscreen-specific TapHandler.
I also needed to carve out a specific case for DMs so it doesn't try to
resolve the non-existent "DM" resource.
2025-05-29 06:04:11 -04:00
l10n daemon script
bf1dc00338 GIT_SILENT Sync po/docbooks with svn 2025-05-29 01:43:28 +00:00
l10n daemon script
54f7fd08cb GIT_SILENT Sync po/docbooks with svn 2025-05-28 01:41:22 +00:00
l10n daemon script
e7afa07c84 GIT_SILENT Sync po/docbooks with svn 2025-05-27 01:39:20 +00:00
l10n daemon script
e196ef03d6 GIT_SILENT Sync po/docbooks with svn 2025-05-26 01:40:44 +00:00
l10n daemon script
0fa452ca04 GIT_SILENT Sync po/docbooks with svn 2025-05-25 01:53:51 +00:00
Joshua Goins
15b625a3f8 Move certain internal room information to an Advanced settings page
This has (as I've seen) confuse some users because we put this
information front and center. The internal room ID and it's version
isn't relevant for 99% of users, especially since most of them don't
even have permission to touch these.

Instead, let's do what Element smartly does and put it under an Advanced
page you have to intentionally find. This also has the knock-on effect
of propping up the importance of room aliases, which now appear higher
in the general settings.
2025-05-24 17:18:06 -04:00
Joshua Goins
e2427c0683 Improve the general room information form card
We can remove a lot of duplicative labeling here: "Room Information",
"Room Name", "RoomTopic", etc. The "Save" button now looks like a proper
form card element, like it does in the account editor.
2025-05-24 17:16:52 -04:00
Joshua Goins
a0e8039d92 Give NeoChatRoom the hidden filter for last event cache
Otherwise we keep state events and other unwanted events in the cache
(if the user turned these off.)
2025-05-24 17:02:32 -04:00
Joshua Goins
2f87b1f398 Overhaul how NeoChat restores rooms on space switch
I'm pretty unhappy with the current state, almost no other chat
application (including other Matrix clients) work like this. The biggest
annoyance is opening *other* spaces will send you to the Space Home -
which is almost never what you want! Even though our Space Home is
awesome :-)

Now when you switch spaces, the last room in that space is stored and
will be restored. This also allows us simplify some of the
"open the last room" code. I made sure that this works for the two
special spaces "Home" and "Friends" so everyone can take advantage of
this better UX.

Since this is constantly-changing-state and the worst that can happen is
the wrong room opening on launch, I didn't bother migrating the existing
setting. We'll have to kill it eventually anyway when we make it
account-specific!
2025-05-24 16:54:18 -04:00
Joshua Goins
86fd2e8e1e Improve the UX for rooms that don't have a canonical alias
This was discovered none other than Bug Catcher Nate, while in the TWiKS
room. That room doesn't have a canonical alias set (yet) and that
exposed some UX problems around aliases in NeoChat.

First, the non-canonical alias isn't shown in the info drawer despite
being the only alias available. This is something that Element actually
does, and now NeoChat does too.

Second, NeoChat will try to copy the room's internal Matrix ID (which is
not that great) to the clipboard because it looks for the canonical
alias. Surprisingly, Element also does this but now NeoChat doesn't.
2025-05-24 09:55:52 -04:00
Joshua Goins
4167f55ad8 Remove debug check for GlobalMenu
I accidentally included this in the commit, and it passed through
review, oops. Amends 76919a13b8.
2025-05-24 09:44:50 -04:00
Joshua Goins
76919a13b8 Fix GlobalMenu initialization on other platforms
Amends b5fcad3db0, we need a
ShareAction-like stub for GlobalMenu for this to work again.
2025-05-24 10:52:20 +02:00
l10n daemon script
fe0f159490 GIT_SILENT Sync po/docbooks with svn 2025-05-24 01:40:16 +00:00
Tobias Fella
4527a6399e Add QHttpServer-based mock server
This should allow for creating tests more easily than the python-based server, since we can poke at it from C++ code.
The idea is that each test creates the things it needs (rooms in a certain state, etc) programmatically instead of through
the json files we use for the other tests. This allows us to adapt the test data to each test as needed, without having to copy it around a lot.
2025-05-23 09:48:39 +02:00
l10n daemon script
b8ff75c5ce GIT_SILENT Sync po/docbooks with svn 2025-05-23 01:42:24 +00:00
l10n daemon script
049e8af8b2 GIT_SILENT Sync po/docbooks with svn 2025-05-22 01:41:30 +00:00
Joshua Goins
8ce2386cc9 Restore the text in location component 2025-05-21 16:30:52 -04:00
Joshua Goins
5239040d9c Set the spacing for the hover buttons on code component 2025-05-21 16:26:58 -04:00
Joshua Goins
c5eb7578b7 Improve the buttons for the location component
Now they are icon-only, the "Open Externally" icon has changed, and a
 fullscreen button has been added.
2025-05-21 16:26:58 -04:00
Joshua Goins
76ce44230d Get rid of the latitude/longitude text in the LocationComponent
This also fixes this component not loading.
2025-05-21 16:26:58 -04:00
Joshua Goins
4a20371b87 Make sure the MessageContentModel starts at UserRole
If it doesn't, then our roles start filling up the other Qt ones such as
AccessibleDescription. Instead we need to start UserRole (except for
DisplayRole of course.)
2025-05-21 16:26:58 -04:00
Joshua Goins
9a76c30aaf Remove the unused msgTypeToString function
Not sure why it's here, I just came across it and it's unused.
2025-05-21 16:26:58 -04:00
Joshua Goins
9cba57368e Don't refer to everything as an image in the file context menu
Instead, let's change the text based on the message component type.
2025-05-21 16:26:58 -04:00
Joshua Goins
d895f8d771 Fix right-clicking delegates again
I accidentally broke this while trying to dance around the two new
overlapping TapHandlers, but this didn't work. What ended up happening
is that you couldn't right-click non-message delegates anymore (such as
images, files, etc.)

I *still* couldn't figure out how to get overlapping TapHandlers to
work, so I just switched to a MouseArea instead. This makes everything
work as expected now.
2025-05-21 16:26:58 -04:00
Joshua Goins
de8c9f4878 Add padding around file progress indicator, move it to the center
Before it stuck to the top-left corner, and looked bad. Now it's
properly centered inside of the chat bar.
2025-05-21 16:24:34 -04:00
Joshua Goins
f029cf842a Add duration to voice message delegate
Otherwise you have to download the audio file before you can tell how
large it is.
2025-05-21 16:23:17 -04:00
James Graham
6ce9b77b3c Set m_quickActionIncubating and m_compactBackgroundIncubating to avoid heap-use-after-free 2025-05-21 10:08:55 +01:00
l10n daemon script
5a60c6ec67 GIT_SILENT Sync po/docbooks with svn 2025-05-21 01:41:56 +00:00
James Graham
a1ca768711 Use the forget function to leave a room everywhere
Use the forget function to leave a room everywhere this is both for consistency and to reduce dependencies. This way no dependency on RoomManager is required to leave a room and since in all cases they have an object they can just call the function.
2025-05-20 17:35:34 +01:00
l10n daemon script
f0d2c19393 GIT_SILENT Sync po/docbooks with svn 2025-05-20 01:39:59 +00:00
Carl Schwan
67db05a0c3 Adapt API to ConvergentContextMenu change
Use close instead of using internal menuItem
2025-05-19 18:59:45 +02:00
Ritchie Frodomar
05e932b884 Move typing indicators closer to messages
This merge request addresses a minor papercut in NeoChat's layout when using a screen magnifier.

If you are zoomed in on a conversation, typing indicators are generally invisible. This merge request moves them to align with actual messages, making them more visible to screen magnifier users like myself. That way, you can do the text chat equivalent of waiting for someone else to finish talking before you ramble on.

### Before
![Screenshot of NeoChat in a test conversation. A user is typing. The typing pane is very far off to the left, not visible when zoomed in.](https://cdn.acidiclight.dev/images/2025/04/03/31d836b18875.png)

### After
![Screenshot of the typing indicator in a conversation. The typing pane now aligns with the chatbar and messages.](https://cdn.acidiclight.dev/images/2025/04/03/870ace40ce86.png)
2025-05-19 12:07:02 -04:00
l10n daemon script
763713cd32 GIT_SILENT Sync po/docbooks with svn 2025-05-19 01:42:11 +00:00
Joshua Goins
2687448212 Add header to UserMenu for mobile which has the user info
To give a little bit more context, and it also matches the message
context menu which does the same.
2025-05-18 20:00:21 -04:00
Joshua Goins
d059195e92 Add user menu that is opened via right-clicking/long-tapped on avatar
We can un-clutter our message context menu, which we had to share
with user actions. (Even though we only had one so far.) I added one new
user-specific action which allows you to quickly mention the user in
chat. Otherwise you would've had to copy their username or use the
completion menu.

It's convergent on mobile, it still has the hover indicator and it also
is available through the AuthorComponent.

BUG: 486252
2025-05-18 20:00:20 -04:00
James Graham
6ef7acc8e5 Remove any dependencies on App from the spaces module.
Remove any dependencies on App from the spaces module. This requires moving some dialogs either to spaces, or libneochat if they're used more generically.
2025-05-18 14:38:57 +01:00
l10n daemon script
2cb89807ef GIT_SILENT Sync po/docbooks with svn 2025-05-18 01:40:43 +00:00
Joshua Goins
b5fcad3db0 Fix multiple Global menu issues
See individual commits. When backporting, I'll create a separate patchset just for the we-broke-something-bugs without the strings.
2025-05-17 21:21:38 -04:00
Joshua Goins
d3fd441c88 Improve the "Create a Room/Space" and "Select Existing Room" dialog
First of all, these are now all separate dialogs instead of shoving all
of these functions (which are only marginally related) into one single
dialog. We also convert these to in-app Kirigami Dialogs, which look a
bit nicer. I also touched up the UX in some places, such as adding
descriptions which were previously available to translators. I also hid
some not oft used options like setting a topic, which almost nobody does
before creating a room/space.
2025-05-17 21:09:43 -04:00
Joshua Goins
e9568b50fc If the message body is empty, say so
Normally if a malformed event is empty it will just be empty space - but
that looks buggy. Instead, we can add a message saying "This event does
not have any content."

BUG: 494093
2025-05-17 21:09:25 -04:00
James Graham
e7040a518a Create a new module for the room info drawer QML.
Create a new module for the room info drawer QML. This also requires moving some QML to LibNeoChat common with other modules. Finally all QML in roominfo is modifed to not depend on app.
2025-05-17 14:27:38 +01:00
l10n daemon script
495f7194ac GIT_SILENT Sync po/docbooks with svn 2025-05-17 01:40:09 +00:00
Ritchie Frodomar
d31cc486bb Work around startup UI freeze caused by QtTextToSpeech
This merge request works around an annoying startup hang that I introduced when adding text-to-speech to NeoChat. The previous implementation was a QML singleton that used the `TextToSpeech` QML component. Unfortunately that component blocks the UI thread when first loading it, while it connects to speech-dispatcher.

This MR just rewrites that singleton in C++, and moves initialization of QtTextToSpeech to the first time you read a message aloud. It doesn't fix the performance problem, but it at least stops it from affecting startup.

In the future, I'd like to move speech operations to a background thread to completely mitigate the initialization freeze.
2025-05-16 14:27:49 -04:00
l10n daemon script
3ea844496a GIT_SILENT Sync po/docbooks with svn 2025-05-16 01:41:58 +00:00
Nate Graham
7b953d0cc0 Fixup becc127dc4
This isn't a JavaScript list, so a comma between items is actually an
error here.
2025-05-15 15:05:42 -06:00
Joshua Goins
becc127dc4 Add share action to the maximize delegate
Self-explanatory, you know how this works! Enables sharing images out of
NeoChat more easily other Purpose-enabled applications.

BUG: 466382
2025-05-15 15:34:29 -04:00
James Graham
e2742cbf8b Add a button to access all emojis from the message menu
Add a button to access all emojis from the message menu for when that button is not availble in the quick actions

requires libraries/kirigami-addons!362
2025-05-15 13:41:09 -04:00
Joshua Goins
a1513b30cd Check if RoomEvent is null before trying to insert a notification
As seen in the bug report, roomEvent could be null and then we get a
nice and simple null-access error. We should be careful before trying to
use it.

BUG: 502687
2025-05-15 13:39:33 -04:00
Joshua Goins
e2c0316e7d Focus the chat bar when replying to a message
Just a nice UX thing, otherwise you have to manually focus the chat bar
again with a keyboard or mouse.
2025-05-15 13:39:24 -04:00
Joshua Goins
fda84a6aac Allow performing shortcuts while the completion menu is open
This prevents doing actions like zooming in your screen (Meta+Equals)
because it will tripper shortcutOverride and close the menu. Instead, we
shouldn't block shortcuts but still allow closing when Escape is
pressed.

This *does* block all NeoChat shortcuts when the completion menu is
open, but personally I think this is fine. If you have this open, you
really should finish your message first!
2025-05-15 13:39:16 -04:00
Joshua Goins
142312d87d Give completion popup a minimum size when editing an existing message
This was previously fixed to the size of the text area itself, which
could be small. We also have a bug where the text area *itself* is like
one character big, so this helps there too.

The popup is also given a margin of 0 so it is always positioned within
the bounds of the window.

BUG: 503483
2025-05-15 13:39:08 -04:00
Joshua Goins
906fb97259 Fix crash when trying to edit your message on a wide screen
This only seems to happen when the window is maximized, specifically
the height of the window. This seems to be a weird TextArea issue (or
something else in our TimelineView) but until that's found out, a
Qt.callLater will prevent this annoying crash.

BUG: 503846
2025-05-15 13:38:55 -04:00
Joshua Goins
80923a2025 Fix undefined reference to webShortcutModel
This was incorrectly capitalized, so I just went ahead and properly
capitalized it so we stop making this mistake!
2025-05-15 13:38:46 -04:00
l10n daemon script
12882586d3 GIT_SILENT Sync po/docbooks with svn 2025-05-15 01:42:42 +00:00
Joshua Goins
d51e68e9e2 Fix the room list header margin in Kirigami >6.14
They changed how margins behave when there's no navigation buttons in 7b02df40381b28de97fab1dd8d97182778c242df
so we are actually adding more padding ontop of the existing one.
2025-05-14 17:41:45 -04:00
l10n daemon script
7f6e489f20 GIT_SILENT Sync po/docbooks with svn 2025-05-14 01:41:32 +00:00
l10n daemon script
161111bf5c GIT_SILENT Sync po/docbooks with svn 2025-05-13 01:43:24 +00:00
James Graham
5452c51c6a Elide the user ID in UserDetailDialog if it's too long
Elide the user ID in UserDetailDialog if it's too long

BUG: 501483
2025-05-12 19:00:29 +01:00
l10n daemon script
09917d45e3 GIT_SILENT Sync po/docbooks with svn 2025-05-12 01:37:54 +00:00
James Graham
101a8b9ec3 Yeet HoverActions into the sun
Replace HoverActions with an inline action component that appears on hover. There are only actions for reply and react if there is space the overflow button opens the normal message menu.

NOTE: the most recent update changes things slightly, from the images below the buttons are now top aligned because of potentially hige messages. The actions are also now disabled for compact mode as they never really made sense there anyway. The menu now has all options so no one is missing out.

For normal messages

![image](/uploads/b8679eb09c9190404fc84f01e14169af/image.png){width=419 height=138}

When space is limited

![image](/uploads/ecd7c725ea2526689e586a2d786f389e/image.png){width=411 height=130}

User messages

![image](/uploads/767ef09f6650a5fb6abf3a49ef9f9b90/image.png){width=296 height=114}

BUG: 503784
2025-05-11 11:11:52 +01:00
l10n daemon script
a04769baad GIT_SILENT Sync po/docbooks with svn 2025-05-11 01:40:13 +00:00
l10n daemon script
07441df3f6 GIT_SILENT Sync po/docbooks with svn 2025-05-10 01:40:07 +00:00
Joshua Goins
b5465cd8d0 Fix one more ownership issue that causes crashes when switching rooms
I was hitting one more annoying crash with a backtrace inside QCache,
because we didn't set the ownership propetly for one last model. Now I
don't hit it anymore.
2025-05-09 15:09:54 -04:00
James Graham
0a2af02c5f Restore hover actions for the cpp message delegate
Restore hover actions for the cpp message delegate

BUG: 503843
2025-05-09 13:03:23 -04:00
Tobias Fella
3183be460e Implement OIDC registration/login compat 2025-05-09 18:20:21 +02:00
Tobias Fella
beb72dfa48 Actually fix TextHandlerTest 2025-05-09 14:44:44 +02:00
Tobias Fella
60d493e34b Re-enable texthandlertest on CI 2025-05-09 14:44:44 +02:00
Joshua Goins
36a5e8bdb5 Package new "Send a Location" button icon for Android
I forgot to add this in 5d4529ccf9.
2025-05-09 08:44:21 +02:00
l10n daemon script
489e60996a GIT_SILENT Sync po/docbooks with svn 2025-05-09 01:36:18 +00:00
Joshua Goins
3d15e4f061 Use FormCard on the invitation page
It now looks a bit nicer, and I made sure everything scales down to
mobile as well.
2025-05-08 15:48:55 -04:00
Joshua Goins
28c39292f7 Show the time when we were invited on the invite page
Currently, this is something that's missing even in clients like Element
(!?!) I will sometimes miss when invites are sent - like when I'm
sleeping - and then when I start back up NeoChat I have no idea when
they tried to invite me. This can get worse on bigger timescales, like
when you go on vacation for a few days.
2025-05-08 15:48:55 -04:00
Joshua Goins
d7c9bea783 Add spoiler formatting to the quick format bar 2025-05-08 15:39:34 -04:00
Joshua Goins
e232501715 Use the new strikethrough syntax in the quick format bar 2025-05-08 15:39:34 -04:00
Joshua Goins
4757ac11dc Allow striking through text with ~~
Similar to spoilers, some Markdown flavors like GitHub's or Discord's
allow you to strike through text with ~~. Normally, the only way to do
this on most Matrix clients (including Element) is surrounding text with
<del> tags. As expected, no one knows how to do this.

So now NeoChat supports the ~~ syntax. We can reuse the existing spoiler
parser for this after making it generic. I have added new test cases for
this syntax. This does not affect the quick format bar yet.
2025-05-08 15:26:00 -04:00
Joshua Goins
14cbbd394f Differinate between regular text and revealed spoiler text
When you reveal a spoiler, it removes the background from the spoiler
block - effectively making it seem like regular text. There's also a
minor issue that we use the color scheme's textColor as the "spoiler
block" color, and it will usually end up white. Most chat programs have
typically used a dark background for spoiler blocks, even on dark
themes.

I killed two UX issues with one stone, first by making the spoiler block
color fixed (but mixed with the textColor, to ensure it's readable
regardless of Breeze Light/Dark.) And second by only changing the text's
visibility, not the background.
2025-05-08 15:25:37 -04:00
Joshua Goins
5d4529ccf9 Replace the "Send a Location" button icon with a more fitting one
"globe" is super generic, "mark-location" is way more fitting - not only
in name but also in appearance.
2025-05-08 14:42:10 -04:00
Joshua Goins
baa214df0e Don't insert spoilers inside of code blocks
Also add some new test cases to catch these weird situations.
2025-05-08 12:40:10 -04:00
Joshua Goins
6b5996a1bd Add custom syntax for tagging spoilers
Currently the only two ways to spoiler text in your message is either:
* Using the /spoiler command
* Manually typing the data-mx-spoiler span HTML blocks

Neither one is discoverable, or friendly to users really. Instead, we
should extend our existing Markdown-based formatting syntax with one
that can handle spoiler tags. I chose the || syntax to match Discord,
since Element doesn't seem to adopt one.

Unfortunately, CMark does not support custom extensions (see
https://github.com/commonmark/cmark/pull/123) so we have to implement
our own parsing function. New tests are also added for this too.
2025-05-08 12:40:10 -04:00
Joshua Goins
86a43c4f7e Register TextHandler::Type with Q_ENUM
This makes Qt spit out more useful debug messages when printing this
enum.
2025-05-08 12:40:10 -04:00
Joshua Goins
107f3b6616 Make MessageDelegateBase::cleanupIncubator static
This doesn't need to be attached to an instance of MessageDelegateBase,
and avoid various problems when called from a MessageObjectIncubator
callback. (Because it needs access to the "this" pointer.)

Fixes a regularly occurring crash when switching rooms.
2025-05-06 19:33:09 -04:00
Joshua Goins
bcab617b9d Move m_sectionIncubating/m_avatarIncubating/m_readMarkerIncubating set
This should be set *before* we clean up the incubator, because it could
end up accessing invalid data when the incubator is freed. This fixes a
regularly occuring crash when switching rooms.
2025-05-06 19:31:41 -04:00
l10n daemon script
f6c12dc27a GIT_SILENT Sync po/docbooks with svn 2025-05-06 01:37:59 +00:00
Joshua Goins
3e954a24a1 Fix the KDE_CI env var check
This should make it possible to run this test on regular machines again.
2025-05-05 20:39:18 +00:00
Joshua Goins
08dc05c707 Refactor lastEventIsSpoiler, remove lastEvent() call that isn't needed
This is only called after we already get an event with lastEvent() so
doing it again is useless. Instead, we should refactor it to behave like
similar functions (e.g. isEventHighlighted.)
2025-05-05 20:32:22 +00:00
Tobias Fella
8817ca7f2b Return member objects for users that are not actually members
Most of the data in the objects will be empty, but at least a valid matrix id is provided.
This fixes missing data in some places in the UI (e.g., in HiddenDelegate)
2025-05-05 22:19:52 +02:00
Tobias Fella
5262ec4b56 Show event type for hidden events 2025-05-05 20:18:58 +02:00
James Graham
f4799a4287 Rework MessageDelegate in cpp
Rework MessageDelegate to be mostly a cpp class. This allows us to only load the components that are actually needed saving memory.

In testing using memtest it saved ~30% versus the current implementation.
2025-05-05 16:25:40 +01:00
James Graham
97d5be9d81 Make sure that ChatDocumentHandler can handle the document being changed to a nullptr
Make sure that ChatDocumentHandler can handle the document being changed to a nullptr.

BUG: 501950
2025-05-05 15:45:50 +01:00
James Graham
6913a4b447 Force the room list items to update their height when the compactRoomList setting is changed.
Force the room list items to update their height when the compactRoomList setting is changed.

The solution is a bit janky but for whatever reason the height wasn't updating properly which seems to be a qml bug, it sometime happened slow, sometime you would have to turn NeoChat off then on again.

BUG: 494146
2025-05-05 15:02:03 +01:00
James Graham
41e96fca70 Remember the matrixId during login when moving back from password
Remember the matrixId during login when moving back from password

BUG: 489976
2025-05-05 13:48:23 +01:00
James Graham
f6b3f3ac80 Fix the width of the space header.
Fix the width of the space header, the name of currentWidth has changed to available width.
2025-05-05 13:08:32 +01:00
James Graham
db0c423763 Use isOnline from libquotient
Use `isOnline` from libquotient

This require a bump of the min libquotient to 0.9.1
2025-05-05 12:20:26 +01:00
Aleix Pol
df9a7292b9 Fixes a null pointer call
It seems like the case is possible as we already are treating the case
in isUserBanned. Doesn't seem ideal as it shows "" where the username
should be but it's better than a crash.
2025-05-03 16:17:35 +00:00
Heiko Becker
7abca73339 GIT_SILENT Update Appstream for new release
(cherry picked from commit 0a7fccaa5c)
2025-05-03 00:31:40 +02:00
Tobias Fella
30ee914baf Re-enable FreeBSD CI 2025-05-02 20:43:39 +02:00
l10n daemon script
5b835933e6 GIT_SILENT Sync po/docbooks with svn 2025-05-01 01:38:00 +00:00
Kai Uwe Broulik
85f3d3b633 RoomList: Change room on drag enter
With a delay. Allows to drag a file to NeoChat and switch rooms.

In the future we might want to allow dropping a file onto a
room to send it.
2025-04-30 10:57:48 +00:00
l10n daemon script
41d6233f78 GIT_SILENT Sync po/docbooks with svn 2025-04-28 01:37:57 +00:00
Joshua Goins
ccb162cfed Set CppOwnership for managed QObjects returned by Q_INVOKABLES
I'm 99% sure of the recent crashes we've been seeing are double-frees,
the QCache one me and Duha encountered must be one. The QCache is in
charge of the one in ContentProvider, so it will sometimes try to delete
or access something already destroyed by the QML engine.

While I'm at it, I also made sure to check every other Q_INVOKABLE to
ensure we don't hit this elsewhere.

CCBUG: 502747
2025-04-26 11:36:39 -04:00
l10n daemon script
56472f6cfd GIT_SILENT Sync po/docbooks with svn 2025-04-25 01:38:48 +00:00
l10n daemon script
14c26b1663 GIT_SILENT Sync po/docbooks with svn 2025-04-24 01:36:42 +00:00
l10n daemon script
14043f861f GIT_SILENT Sync po/docbooks with svn 2025-04-23 01:38:35 +00:00
l10n daemon script
7761e4e0f7 GIT_SILENT Sync po/docbooks with svn 2025-04-22 01:37:28 +00:00
l10n daemon script
4214b7691f GIT_SILENT Sync po/docbooks with svn 2025-04-21 01:36:58 +00:00
Akseli Lahtinen
62da98af94 ChatBar: set chatBarSizeHelper for compactLayout to root.width
In chatBarSizeHelper, if user is in compact mode and resizes the window,
maxWidth would be -1 and that caused something to go wrong with the
padding calculations.

Instead, just set it to root.width with some padding, so it always is
the width of the ChatBar.
2025-04-20 18:46:32 +03:00
Akseli Lahtinen
0cc14f710d MessageModel: Handle stickers in ContentModelRole
We were ignoring stickers completely when handling them previously, as
it was handled as event and not one with id.

BUG: 501553
2025-04-20 15:49:20 +03:00
l10n daemon script
a148c6e326 GIT_SILENT Sync po/docbooks with svn 2025-04-20 01:36:09 +00:00
Tobias Fella
bb864cac5b Fix crash during logout 2025-04-19 10:26:41 +02:00
l10n daemon script
e465ef6d41 GIT_SILENT Sync po/docbooks with svn 2025-04-19 01:37:38 +00:00
Tobias Fella
1303dcce8f Disable appium tests
Their flakiness makes the CI miserable to use.
2025-04-18 23:19:04 +02:00
James Graham
b6791485c4 Move remaining code to app module
There's still some stuff that could potentially go elsewhere but I think it's enough for now.
2025-04-18 09:26:17 +00:00
l10n daemon script
0708f022bc GIT_SILENT Sync po/docbooks with svn 2025-04-18 01:36:47 +00:00
James Graham
d81478ac97 Move webshortcut model to timeline 2025-04-17 16:53:36 +01:00
James Graham
f57004601d Move more stuff to settings module 2025-04-17 16:41:59 +01:00
Joshua Goins
c104c0b7d0 Remove some action text that explicitly says "to clipboard"
For example, "Copy Address to Clipboard" is redundant - almost every
Copy action on your computer does it to the clipboard. The same is done
for the space action too.
2025-04-17 09:28:52 +00:00
Joshua Goins
50ceddaa7e Improve the "Friends" space notification and tooltip text
If you're a first-time user, the different states on this button may be
a bit confusing. Instead of showing a "plus" sign (meaning an invite) it
will add it to the total notification count. The tooltip text is also
changed to reflect this.
2025-04-17 09:25:17 +00:00
Tobias Fella
23803223bf Remove duplicate mxid regex 2025-04-17 10:15:00 +02:00
Tobias Fella
438d4ca3fd Make mxid regex compatible with localhost mxids
Required for tests
2025-04-17 10:14:59 +02:00
Tobias Fella
d668d2f2de Improve DevtoolsPage
Notably, port away from StackLayout, as it doesn't work well when the individual components have different heights
2025-04-17 10:09:03 +02:00
l10n daemon script
0f704417c6 GIT_SILENT Sync po/docbooks with svn 2025-04-17 01:36:01 +00:00
Tobias Fella
9b8cfafa04 Show a placeholder when permissions are loading 2025-04-16 21:27:00 +02:00
James Graham
195e175186 More qml files to go in timeline module 2025-04-16 19:48:19 +01:00
James Graham
2d5d2c6c06 Move relevant models to devtools 2025-04-16 19:38:13 +01:00
James Graham
e787eaabcd Create a space module 2025-04-16 19:28:54 +01:00
James Graham
4aec891b1f Fix clearing edit ID when an attachment is added
Fix clearing edit ID when an attachment is added. You can reply with an attachment but not edit and attachment simultaneously
2025-04-16 18:28:33 +00:00
l10n daemon script
86f04f8b98 GIT_SILENT Sync po/docbooks with svn 2025-04-16 01:36:50 +00:00
Carl Schwan
cee9c90f55 Use list of breeze icons from Kirigami Addons 2025-04-15 22:38:12 +02:00
Simon Quigley
2ca744c960 Remove TapHandler for CodeMaximizeComponent
This specific TapHandler proves to be a bit trigger-happy; when trying to copy
text, select or de-select text, or generally do more than stare at it without
touching your mouse, it is too easy to minimize the fullscreen component. This
fixes the issue entirely; when tapping on the message in the timeline, it
still shows a maximized message. This only applies to the maximized message.
2025-04-15 20:36:52 +00:00
Tobias Fella
854aa34e52 Don't offer stickers for reactions 2025-04-15 10:53:53 +02:00
l10n daemon script
b8d4ffcedc GIT_SILENT Sync po/docbooks with svn 2025-04-15 01:37:17 +00:00
James Graham
0380de698c Create new rooms module 2025-04-14 19:17:42 +01:00
Tobias Fella
380a52d981 Update copyright year 2025-04-14 17:06:15 +02:00
l10n daemon script
ddc3c11e12 GIT_SILENT Sync po/docbooks with svn 2025-04-14 01:36:37 +00:00
Volker Krause
05e1c2e6f8 Use ECM's more elaborate APK version code logic 2025-04-13 15:49:23 +00:00
James Graham
bffd7fb13d Move ChatDocumentHandler and related includes to LibNeoChat 2025-04-13 16:24:12 +01:00
James Graham
4fe9c76d90 Move location models to LibNeoChat 2025-04-13 15:52:01 +01:00
James Graham
866fee2ea3 Move login and registration to login
To make this work `AccountManager` is split off from controller taking all the code around `AccountRegister` and is added to LibNeoChat as it makes sense to have this functionality there.
2025-04-13 11:23:17 +00:00
James Graham
b9ffe12154 Move locationhelper, linemodel and mediasizehelper to Timeline 2025-04-13 10:11:54 +00:00
James Graham
09cb2bd261 Move the threepid stuff to settings 2025-04-13 10:46:54 +01:00
James Graham
3a4bc18d45 Move more stuff to settings 2025-04-13 10:27:22 +01:00
l10n daemon script
32ee590cef GIT_SILENT Sync po/docbooks with svn 2025-04-13 01:35:50 +00:00
Joshua Goins
5ef4ab0756 Fix two (edited) strings appearing in edited quotes
This is because we only check if the last message component != Text,
because that handles it's own edit strings. Quote components do that
too, so if we don't exclude it there ends up being two (edited) strings
in one message.
2025-04-12 16:59:49 -04:00
l10n daemon script
1e26e740fb GIT_SILENT Sync po/docbooks with svn 2025-04-11 01:35:44 +00:00
Joshua Goins
704505958e Fix multi-line quotes being cut off
This was a mistake in the code that was designed to remove the outside
paragraphs, which seems to be to make way for the quotation marks we
add around the text. Instead of doing that (which turns out, is very
brittle and breaks on multiple paragraphs) insert the quotation marks
*inside* of the paragraph tags.

A test case is added for this as well.
2025-04-10 20:53:00 +00:00
James Graham
b230641600 Move ColorSchemer to settings module 2025-04-10 19:29:30 +01:00
James Graham
3f457774dc Move all timeline relevant models and classes to the module 2025-04-10 18:25:45 +00:00
l10n daemon script
6ff32d0935 GIT_SILENT Sync po/docbooks with svn 2025-04-10 01:36:28 +00:00
l10n daemon script
928b48fd14 GIT_SILENT Sync po/docbooks with svn 2025-04-09 01:36:26 +00:00
l10n daemon script
c040031771 GIT_SILENT Sync po/docbooks with svn 2025-04-08 01:40:09 +00:00
l10n daemon script
324a8ee2e1 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-04-08 01:30:10 +00:00
l10n daemon script
a866c9b924 GIT_SILENT made messages (after extraction) 2025-04-08 00:41:45 +00:00
Heiko Becker
9877962dd0 GIT_SILENT Update Appstream for new release
(cherry picked from commit 4ad1a628b6)
2025-04-07 23:59:31 +02:00
James Graham
aef4f75c33 Move NeoChatConnection and NeoChatRoom to LibNeoChat
Move `NeoChatConnection` and `NeoChatRoom` to `LibNeoChat` along with any required dependencies.
2025-04-07 18:52:15 +00:00
James Graham
8327b4369e Rework so that ActionsModel no longer depends on NeoChatConfig or RoomManager 2025-04-07 14:07:01 +00:00
James Graham
0403ecbd70 Remove the dependency on NeoChatConfig from EventHandler 2025-04-07 12:27:53 +00:00
l10n daemon script
16daca09e8 GIT_SILENT Sync po/docbooks with svn 2025-04-07 01:42:59 +00:00
James Graham
9f60a8957b Migrate forgotten instance of NeoChatRoom::poll() to ContentProvider::handlerForPoll() 2025-04-06 10:47:15 +01:00
l10n daemon script
9a169bbf3d GIT_SILENT Sync po/docbooks with svn 2025-04-06 01:38:05 +00:00
James Graham
8af0ae6263 Move the update mentions function to ChatDocumentHandler
Move the update mentions function to `ChatDocumentHandler`, this means `ChatbarCache` no longer needs to depend on `ChatDocumentHandler`
2025-04-05 20:01:07 +00:00
Scarlett Moore
420baaaf4a snapcraft: Add qml and qt plugins path to env.
Fixes missing qml.
2025-04-05 11:49:34 +00:00
James Graham
c56054a05a Move pollhandler to ContentProvider
Move `PollHandler` to `ContentProvider`, this also breaks the dependency on `PollHandler` for `NeoChatRoom`
2025-04-05 10:08:44 +00:00
James Graham
d9b8b1c8ef Rework NeoChatConnection to remove the dependency on NeoChatConfig
Title
2025-04-05 07:53:26 +00:00
l10n daemon script
73623ec41a GIT_SILENT Sync po/docbooks with svn 2025-04-05 01:38:51 +00:00
James Graham
02e11e8008 Remove the relationEventContentModel function from ChatBarCache
Remove the relationEventContentModel function from ChatBarCache as ContentProvider makes it unneeded. This means turning ContentProvider into a QML singleton.
2025-04-04 12:13:44 +00:00
James Graham
22b3641a07 Cleanup NeoChatRoom includes 2025-04-04 10:36:13 +01:00
James Graham
913b4ea923 Make lastEvent() take a filter function
Make `lastEvent()` take a filter function so we can remove any dependence on `NeochatConfig` from `NeoChatRoom`.
2025-04-04 09:27:04 +00:00
James Graham
88eb2223c5 Create a content provider instance to get message content models from
This means that all content models will now come from the same source to remove duplication across multiple models and `chatbarcaches`.

It also handily breaks the dependency on needing `MessageContentModel` for `NeochatRoom`
2025-04-04 08:42:34 +00:00
l10n daemon script
123d11945e GIT_SILENT Sync po/docbooks with svn 2025-04-04 01:39:54 +00:00
Ritchie Frodomar
7a078b2d34 Add "Read Text Aloud" context menu action for messages
This merge request adds a simple "Read Text Aloud" menu action to the context menu for chat messages. When clicked, the message text will be read aloud using text-to-speech.

The intention behind this change is to make it easier for myself and other low-vision users to use Matrix, without needing to use a system-wide screen reader, in cases where the user still has enough sight left to navigate a computer faster without a screen reader.

I'd eventually like to have it read " said ," so that the message sender gets read aloud as well, but for now it just reads the plaintext message contents.

Another problem, at least on my computer specifically, is that the voice's accent doesn't seem correct. For whatever reason, on my system, messages are read in a Scottish accent which is harder for me to understand. Other apps don't do that, so I'm not sure what's going on there. I do not want to hardcode a specific voice/locale, since I want this feature to work well for everyone and not just me.

@teams/qa Please do break my code! :)  - I've only tested with basic text messages.

@teams/usability Not sure if I put the context menu action in an ideal place, it's grouped in the same area as clipboard actions like "Copy Text."

@teams/localization How could I go about getting author names to be read aloud in a way that's properly translated for other languages? I'm not experienced with i18n.
2025-04-03 19:51:40 +00:00
James Graham
054f87cae2 delegatesizehelper updates
Make `DelegateSizeHelper` take a `QQuickItem` rather than a width value and move `TimelineDelegate` to use it rather than duplicting the code.

This requires the creation of `LibNeoChat` so that both the main and timeline modules can get access to the class.

Note: ideally more stuff will go into `LibNeoChat` but it turns out our dependencies are kinda spaghetti like and so will take some untangling.
2025-04-03 15:24:31 +00:00
l10n daemon script
f026e4e5ed GIT_SILENT Sync po/docbooks with svn 2025-04-03 01:36:43 +00:00
Tobias Fella
b9bd12e451 Fix crash when editing messages 2025-04-02 21:20:30 +02:00
Scarlett Moore
0f75369658 bump olm version, fix build. Add kunifiedpush part. 2025-04-02 06:27:30 -07:00
l10n daemon script
075f2c96b2 GIT_SILENT Sync po/docbooks with svn 2025-04-02 01:37:06 +00:00
l10n daemon script
d3b9aa9808 GIT_SILENT Sync po/docbooks with svn 2025-04-01 01:36:48 +00:00
l10n daemon script
16d42aa6e3 GIT_SILENT Sync po/docbooks with svn 2025-03-31 01:36:40 +00:00
l10n daemon script
e90f038f6a GIT_SILENT Sync po/docbooks with svn 2025-03-30 01:36:16 +00:00
l10n daemon script
bd0c76559b GIT_SILENT Sync po/docbooks with svn 2025-03-29 01:37:19 +00:00
James Graham
42fab806c6 Enable ending polls 2025-03-28 13:41:46 +00:00
James Graham
fadb5725e0 Rework the appearance of poll delegate
![image](/uploads/510e995e15d76ce0566b126a6917a963/image.png){width=541 height=269}
2025-03-28 09:05:39 +00:00
l10n daemon script
8180f111d0 GIT_SILENT Sync po/docbooks with svn 2025-03-28 01:39:03 +00:00
Allen Winter
5c30785d8d CMakeLists.txt - Don't include quiet packages in the feature summary
Only the pkg_config part in Findcmark is quiet, which also shouldn't
put out as a status message.

Fixes:
```
Missing these optional packages:
 * Qt6QmlCompilerPlusPrivateTools (required version >= 6.8.2)
```
2025-03-27 10:01:58 -04:00
l10n daemon script
581a1e7153 GIT_SILENT Sync po/docbooks with svn 2025-03-27 01:39:08 +00:00
l10n daemon script
0b9a8be45d GIT_SILENT Sync po/docbooks with svn 2025-03-26 01:37:58 +00:00
l10n daemon script
40883d9461 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-03-26 01:30:34 +00:00
l10n daemon script
91010c52db GIT_SILENT made messages (after extraction) 2025-03-26 00:42:08 +00:00
Joshua Goins
2546d79f26 LinkPreviewComponent: Fix a few bugs, restore the image preview
We realized that images don't display in link previews anymore, because
QML is terrible and this property is a QUrl, so when we call .length it
silently fails and never loads the image. This is easily fixed by
calling .toString().

There's also another bug where the title ie elided way too greedily, but
we can simplify the elision check and fix the bug at the same time.
No more "Hom..."!
2025-03-25 11:43:55 +00:00
Joshua Goins
c3404936fd Set the pointing hand cursor shape on link previews
Our HIG explicitly says we can do this for links, and these components
are literally giant links. This might also help differentiate these from
similar looking components like quotes for desktop users.
2025-03-25 11:43:00 +00:00
Joshua Goins
ec635d7de3 Elide the hover link indicator
For long links, this ends up going "off" the window (not really of
course.) One good example is Bugzilla filter URLs which are ungodly
huge. So eliding these just makes it look better, browsers do this too.
2025-03-25 11:42:29 +00:00
l10n daemon script
d416270cad GIT_SILENT Sync po/docbooks with svn 2025-03-25 01:37:08 +00:00
Tobias Fella
3fa6dadb43 Fix logout button 2025-03-24 22:52:31 +01:00
l10n daemon script
cee391746f GIT_SILENT Sync po/docbooks with svn 2025-03-24 01:36:50 +00:00
l10n daemon script
8432fa82a8 GIT_SILENT Sync po/docbooks with svn 2025-03-23 01:37:36 +00:00
James Graham
72edfe1112 Make it possible to send images in threads
Title
2025-03-22 18:56:40 +00:00
Tobias Fella
3b2a6800a0 Minor cleanup 2025-03-22 18:55:19 +01:00
Tobias Fella
6b7ad6b1af Remove unneeded property 2025-03-22 18:51:39 +01:00
James Graham
37d77f579a Poll Updates and Send Polls
Fix showing polls and update the events and PollHandler to make them easier to work with.

Add a PollAnswerModel to visualise poll answers.

Enable sending polls.
2025-03-22 16:32:08 +00:00
Tobias Fella
55d68af499 Fix verification 2025-03-22 16:44:29 +01:00
James Graham
1ca4120fd9 Reply to messages with images
Reply to messages with images (and technically any other attachment file type)
2025-03-22 11:16:50 +00:00
l10n daemon script
9164660d19 GIT_SILENT Sync po/docbooks with svn 2025-03-21 01:39:29 +00:00
l10n daemon script
ba78cf050d GIT_SILENT Sync po/docbooks with svn 2025-03-20 01:40:29 +00:00
l10n daemon script
e8d1142a94 GIT_SILENT Sync po/docbooks with svn 2025-03-18 01:40:03 +00:00
l10n daemon script
f40eaf55a3 GIT_SILENT Sync po/docbooks with svn 2025-03-17 01:35:39 +00:00
l10n daemon script
0b85f62858 GIT_SILENT Sync po/docbooks with svn 2025-03-16 01:38:35 +00:00
James Graham
24235174fd Make it so that the menus for individual thread messages can be accessed
This is mostly just for text type messages at the moment but give the framework so that when other message types can be sent in threads they can be added easily
2025-03-15 16:03:27 +00:00
l10n daemon script
4a800f99e1 GIT_SILENT Sync po/docbooks with svn 2025-03-15 01:38:20 +00:00
Nicolas Fella
96e61c8357 Make KUnifiedPush required unless opted out
Quiet dependencies like this are bad since they make it easy to miss the dependency
2025-03-13 21:24:13 +00:00
l10n daemon script
f153e57fdb GIT_SILENT Sync po/docbooks with svn 2025-03-12 01:39:11 +00:00
l10n daemon script
bac93e778e GIT_SILENT Sync po/docbooks with svn 2025-03-11 01:37:29 +00:00
James Graham
2aeed10429 Message attached property
Create Message attached property to propagate parameters like room, timeline, index and maxContentWidth down to the message content avoiding lots of boilerplate
2025-03-10 18:28:42 +00:00
l10n daemon script
ea6ad902a7 GIT_SILENT Sync po/docbooks with svn 2025-03-10 01:41:40 +00:00
James Graham
f9c53ee3b0 ThreePIDModel Updates
There is no need for NeochatConnection to depend on ThreePIdModel and also this means it's not in memory when not needed.

Also a little cleanup to make sure only a single job can run at a time.
2025-03-09 12:31:14 +00:00
l10n daemon script
3f0843647c GIT_SILENT Sync po/docbooks with svn 2025-03-09 01:36:22 +00:00
Albert Astals Cid
a50df870e7 GIT_SILENT Upgrade release service version to 25.07.70. 2025-03-08 19:26:23 +01:00
James Graham
716ae11941 Fix Viewing Encrypted Events
Turns out I forgot that an encrypted event is not a roommessage event so we need to handle this when grabbing the content model for the message.
2025-03-08 14:42:48 +00:00
l10n daemon script
4ff16ff402 GIT_SILENT Sync po/docbooks with svn 2025-03-08 01:43:38 +00:00
l10n daemon script
bd598b9c44 GIT_SILENT Sync po/docbooks with svn 2025-03-07 01:39:06 +00:00
Joshua Goins
f1253e4ede Make joining remote rooms more reliable
When joining remote rooms we have to specify another homeserver (that is in the
room) to help us join. The matrix documentation is a little unclear what to do
in this scenario, so instead of giving up let's at least brute force it with the
server in the alias or room id.

This *does* work and allows my server to join rooms in NeoChat I otherwise
couldn't.

BUG: 487253
CCBUG: 491359
FIXED-IN: 24.12.3
2025-03-06 15:39:32 +00:00
Joshua Goins
79a3da3358 Stop emojis from destroying your message
This is easy to reproduce in the following scenario with a bunch of
half-completed emojis: ":a :a :a :a". Trying to complete anything but the last
one starts replacing parts of the message because it only considers the last
colon to the current completion identifier.

This change fixes that and said scenario can no longer cause a message
massacare. This bug doesn't seem to affect the other completions because their
searching in the string was correct, but I made sure they all share the same
index now.

BUG: 479587
FIXED-IN: 24.12.3
2025-03-06 14:47:27 +00:00
l10n daemon script
5a6bdfbbba GIT_SILENT Sync po/docbooks with svn 2025-03-06 01:39:29 +00:00
Joshua Goins
3d663be506 Move the "Explore rooms" button from the hamburger to the space drawer
I think we should put this feature in a more obvious place (and similar to other
chat applications.) Instead of it being buried underneath a menu, joining
spaces/rooms should have the space promenience as creating them - you're going
to be more likely to access this dialog more anyway.
2025-03-05 22:03:54 +00:00
Joshua Goins
0ada4cdebe Add a dialog explaining what to do next when tapping "Verify this device"
The menu that has this action is now more discoverable, and this menu item is
plagued with a bad UX - when you tap on it nothing obvious happens! To people
not familiar with device verification they will think this is a bug, but in fact
all they need to do is open another verified session on another device.

So now there's a dialog explaining that the next step is to do just that. This
dialog also closes once the verification session starts, but the user has the
option to close it in the meantime.
2025-03-05 22:03:38 +00:00
Balló György
d103de96aa Don't create tray icon if system tray is not supported
This fixes the problem that the tray icon is created in GNOME if it was
enabled in other desktop environment previously.
2025-03-05 20:35:18 +00:00
l10n daemon script
f248b04834 GIT_SILENT Sync po/docbooks with svn 2025-03-05 01:54:04 +00:00
l10n daemon script
9572f20682 GIT_SILENT Sync po/docbooks with svn 2025-03-04 01:37:41 +00:00
Justin Zobel
409cec08fc CI - Flatpak Updates 2025-03-03 02:18:43 +00:00
l10n daemon script
51f330eae9 GIT_SILENT Sync po/docbooks with svn 2025-03-03 01:37:33 +00:00
l10n daemon script
51750267e5 GIT_SILENT Sync po/docbooks with svn 2025-03-02 01:35:42 +00:00
l10n daemon script
99948d5151 GIT_SILENT Sync po/docbooks with svn 2025-03-01 01:48:27 +00:00
l10n daemon script
030726e6fb GIT_SILENT Sync po/docbooks with svn 2025-02-28 01:36:36 +00:00
Heiko Becker
1fad54272f GIT_SILENT Update Appstream for new release
(cherry picked from commit a85af258fe)
2025-02-27 21:59:20 +01:00
James Graham
4af4bfd55f Improve the handling of switching link preivews on and off.
First make sure that the global setting is tied into the room setting, previously it was a bit of a patchwork that worked more by luck than judgement. The two levels of global and room level are properly tied together in a hierarchy.

Add a message in the room when global notifcations re turned off. This has caused confusion in the past when people don't realise there are 2 levels.
2025-02-27 16:37:33 +00:00
l10n daemon script
77cedef5bb GIT_SILENT Sync po/docbooks with svn 2025-02-27 01:35:42 +00:00
Joshua Goins
db36f187dc Don't show the "Settings" button when adding a new account
As much as I like opening Settings while I'm in Settings, this
doesn't make much sense.
2025-02-26 23:59:05 +00:00
Joshua Goins
2861eb9c60 Add new message action to pin and unpin messages in rooms
Self-explanatory, now you can manage pinned messages in NeoChat alone.
2025-02-26 23:53:38 +00:00
l10n daemon script
9811c0d97a GIT_SILENT Sync po/docbooks with svn 2025-02-26 01:37:50 +00:00
l10n daemon script
e9c21373ed GIT_SILENT Sync po/docbooks with svn 2025-02-25 01:35:40 +00:00
l10n daemon script
bda23ec54a GIT_SILENT Sync po/docbooks with svn 2025-02-24 10:28:45 +00:00
l10n daemon script
e23641375b GIT_SILENT Sync po/docbooks with svn 2025-02-24 01:35:59 +00:00
l10n daemon script
024d54345a GIT_SILENT Sync po/docbooks with svn 2025-02-23 01:34:15 +00:00
James Graham
59fd4d3916 Make sure the thread dev setting is actually obeyed 2025-02-22 19:48:56 +00:00
Joshua Goins
88d684b6c1 Don't allow long-pressing on non-touchscreen devices
It isn't the right kind of interaction on a computer with a mouse or
trackpad, it should be relegated to touchscreen only. This should
hopefully cover everything from room list delegates to messages.
2025-02-22 18:50:39 +00:00
Joshua Goins
94fdf777cb Early exit if we're checking mutual rooms with yourself
This is rejected by servers too, so don't even bother doing as it
doesn't make sense.
2025-02-22 13:05:30 -05:00
Joshua Goins
dea70152e4 Improve discoverability of the account menu
I figure that not many users know there's a secret and super useful
account menu. Right-clicking or long-pressing opens this menu.
Additionally, tapping your avatar brings up the "Accounts" settings for
some reason. Worse, there's no indication of any of this functionality
or why we're hiding two separate functions here.

Instead, let's make it a ToolButton but keep the general appearance the
same. That makes it act and feel more like a regular button, and
pressing on it will open the account menu. The shortcut to the accounts
settings is removed, there's plenty of other ways to get there.
2025-02-22 17:31:00 +00:00
Joshua Goins
614caf5ca0 Add ellipses to "Remove" message action
This doesn't apply instantly, it opens a dialog to confirm with you and
optionally add a message. According to the HIG (and just a good idea in
general) it should be marked with ellipses.
2025-02-22 17:30:25 +00:00
Joshua Goins
25dbae37fb Change "Copy Message Link" icon to "link-symbolic"
Instead of sharing the same icon as the "Copy Text" action, this make it
even clearer.
2025-02-22 17:30:12 +00:00
Joshua Goins
e060032e6a Improve the notification setting description
The current text has invited a lot of confusion around how notifications
work in NeoChat, because it mentions "push notifications". Some users
take it to mean that somehow the notifications appear in the background,
but that's only supported if built with KUnifiedPush.

To make it super clear, let's change the description dynamically based
on whether:
1. NeoChat is built with KUnifiedPush support.
2. We were able to connect with the KUnifiedPush daemon and your server
has a push gateway.
2025-02-22 10:33:52 -05:00
l10n daemon script
4725410c0f GIT_SILENT Sync po/docbooks with svn 2025-02-22 01:35:48 +00:00
Scarlett Moore
20488ee400 snapcraft: Move to core24 2025-02-21 04:25:07 -07:00
l10n daemon script
b1c0619af5 GIT_SILENT Sync po/docbooks with svn 2025-02-21 01:35:30 +00:00
l10n daemon script
ade730179a GIT_SILENT Sync po/docbooks with svn 2025-02-20 01:36:40 +00:00
Joshua Goins
9264ad26d6 Make the Notifications window non-modal
Tapping on a notification here doesn't close the window. Additionally,
you need to tap it several times for NeoChat to scroll up in a room.

Considering all of this, it would make more sense for this window to be
non-modal for now so you can have the Notifications window open while
using the main NeoChat window.
2025-02-19 13:21:16 +00:00
Joshua Goins
9020e2c7cb Remove word puzzle in the new invitation page 2025-02-18 20:52:13 -05:00
Joshua Goins
0f51c34b24 Add dedicated invitation subtitle text to rooms
Instead of displaying the message event - or usually nothing at all -
show a label like "user has invited you".
2025-02-19 01:45:02 +00:00
Joshua Goins
f6a427e865 Add user information to the invitation page
Currently the invite page kinda sucks. If someone invites you to a room,
you have no idea who from the UI - which is a safety issue.

Now the invite page shows you who invited you, and it has a slightly
different layout & text for one-on-one chats and room invites.

Also the buttons on this page are improved with fixed capitalization
and icons!
2025-02-19 01:45:02 +00:00
l10n daemon script
9b95930463 GIT_SILENT Sync po/docbooks with svn 2025-02-19 01:37:15 +00:00
l10n daemon script
cb96b4991e GIT_SILENT Sync po/docbooks with svn 2025-02-17 01:34:35 +00:00
l10n daemon script
cde7a51cde GIT_SILENT Sync po/docbooks with svn 2025-02-16 01:38:19 +00:00
l10n daemon script
046d611f56 GIT_SILENT Sync po/docbooks with svn 2025-02-15 01:48:20 +00:00
Albert Astals Cid
d7b3748159 CI: Add linux-qt6-next build 2025-02-13 08:14:42 +00:00
l10n daemon script
188c9fc726 GIT_SILENT Sync po/docbooks with svn 2025-02-13 01:43:18 +00:00
l10n daemon script
dbc735e63b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-02-13 01:33:08 +00:00
James Graham
8750486f7b Move to upstream JoinRuleEvent 2025-02-12 18:04:59 +00:00
l10n daemon script
6dc4baeeb5 GIT_SILENT Sync po/docbooks with svn 2025-02-12 01:34:39 +00:00
l10n daemon script
ff28828a2e GIT_SILENT Sync po/docbooks with svn 2025-02-11 01:38:11 +00:00
l10n daemon script
e28452dfd1 GIT_SILENT Sync po/docbooks with svn 2025-02-10 01:33:12 +00:00
James Graham
5d7cb5c28f Move the reaction delegate into the bubble
Move the reaction delegate into the bubble so it can be instantiated by the Content model. This aims to make sure we only instantiate it when needed rather than for every event. You can now hover the event to show the ReactionComponent with a button to add a reaction if none are currently present

Added bonus ReactionModel no longer needs an event pointer, the event ID is enough to get reaction from the room so things are less likely to blow up.
2025-02-09 19:07:53 +00:00
James Graham
08b29f7081 Make sure that a blank entry is never added to the message model store
title
2025-02-09 18:18:15 +00:00
l10n daemon script
c9e034b5b3 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-02-09 01:27:43 +00:00
l10n daemon script
d9f0ff466f GIT_SILENT Sync po/docbooks with svn 2025-02-08 01:33:49 +00:00
Joshua Goins
6b4b895102 Fixup higher power levels not being displayed correctly
This is is a fix or 4d1c82a623, I was
coercing integer values to PowerLevel (the enum.)
2025-02-05 20:36:04 +00:00
l10n daemon script
0c7e02e7c9 GIT_SILENT Sync po/docbooks with svn 2025-02-05 01:36:34 +00:00
Joshua Goins
4d1c82a623 Add power level to the user details dialog
The only way to check a user's power level is to haul yourself over to
the member list, which is cumbersome but also hard to parse - especially
if a room has lots of members.

This adds the user's power level to the existing details dialog. For
example, this makes it easier to identify someone as a moderator if they
sent a message in the room.
2025-02-04 20:14:58 +00:00
Joshua Goins
8d33fe6221 StateKeys: Fix opening a specific state key member 2025-02-04 20:13:09 +00:00
l10n daemon script
9d27651411 GIT_SILENT Sync po/docbooks with svn 2025-02-04 01:34:04 +00:00
Joshua Goins
268975bc3b Fix crash when trying to view Security settings in an invited room
This state event doesn't exist (or is inaccessible) to us, and tries to
access nullptr.
2025-02-04 01:02:25 +00:00
James Graham
66343ba11e Fix new MessageModel
Make sure that we initialise the MessageContentModel for nwe and historical events after they have been added to the timeline
2025-02-03 17:16:40 +00:00
l10n daemon script
684cd85a7a GIT_SILENT Sync po/docbooks with svn 2025-02-02 01:38:47 +00:00
Heiko Becker
ef9a80e76f GIT_SILENT Update Appstream for new release
(cherry picked from commit 96b03082e3)
2025-01-31 01:44:04 +01:00
l10n daemon script
fbb5f02379 GIT_SILENT Sync po/docbooks with svn 2025-01-29 01:35:45 +00:00
James Graham
5f4bde96e9 Max Width Threads
Since threads are a conversation where both the local user and others take part always make them span the full available width
2025-01-28 18:13:56 +00:00
l10n daemon script
f8c8a68840 GIT_SILENT Sync po/docbooks with svn 2025-01-28 01:36:42 +00:00
Tobias Fella
bf6f4a951e Mark MessageModel as uncreatable 2025-01-27 16:07:30 +01:00
l10n daemon script
58c9366548 GIT_SILENT Sync po/docbooks with svn 2025-01-27 01:37:35 +00:00
l10n daemon script
f410ecac2b GIT_SILENT Sync po/docbooks with svn 2025-01-26 01:35:04 +00:00
Max Buchholz
1d1a43ade2 Appdata: add display size 2025-01-25 17:57:21 +00:00
James Graham
37adb56233 Thread fetch more button
Changes threads so there is a button to fetch more events. Also adds a separator between the thread root and the rest of the events.
2025-01-25 16:50:29 +00:00
Justin Zobel
aca0669bf6 CI: Add JSON, XML and YML linting 2025-01-25 09:33:05 -05:00
Justin Zobel
b33ab76ff8 YAML formatting 2025-01-25 09:33:04 -05:00
Gary Wang
38a391b7fa CI: add frameworks/kiconthemes to .kde-ci.yaml 2025-01-25 14:14:19 +00:00
Gary Wang
82434fe87c fix: no icon under Windows
See also:

- https://invent.kde.org/frameworks/kiconthemes/-/issues/3
- https://planet.kde.org/christoph-cullmann-2024-05-11-kde-applications-icons/
2025-01-25 14:14:19 +00:00
Tobias Fella
8bf7c36249 Improve verification method choosing 2025-01-25 11:56:10 +01:00
l10n daemon script
cff3557a24 GIT_SILENT Sync po/docbooks with svn 2025-01-25 01:36:39 +00:00
Carl Schwan
2c476c4351 Fix double separator in RoomDrawer 2025-01-24 12:36:50 +00:00
l10n daemon script
82c8ab511d GIT_SILENT Sync po/docbooks with svn 2025-01-24 01:36:28 +00:00
l10n daemon script
486ed6edd2 GIT_SILENT Sync po/docbooks with svn 2025-01-23 01:33:32 +00:00
l10n daemon script
a4b0a9ed36 GIT_SILENT Sync po/docbooks with svn 2025-01-22 01:34:28 +00:00
l10n daemon script
bba9c37ba5 GIT_SILENT Sync po/docbooks with svn 2025-01-21 01:35:12 +00:00
Joshua Goins
febc7d1630 Add UI to set a custom display name for specific rooms
This is the same functionality that /myroomnick does, but it's now
exposed in a much more accessible place in the UI. A new page to the
room settings is added to configure your profile in the room. It's
currently limited to a display name.
2025-01-19 21:33:07 -05:00
l10n daemon script
1ed071949b GIT_SILENT Sync po/docbooks with svn 2025-01-20 01:39:21 +00:00
l10n daemon script
3878c264ef SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2025-01-20 01:28:38 +00:00
Joshua Goins
21daf0b664 Fix "Configure Web Shortcuts" not doing anything, again 2025-01-19 19:52:37 +00:00
l10n daemon script
5efaa72cea GIT_SILENT Sync po/docbooks with svn 2025-01-19 01:35:00 +00:00
Mark Penner
191cd7cbba add missing icons on Android 2025-01-18 13:00:31 -06:00
Joshua Goins
c583e31b16 Add how many rooms you have in common to the user detail dialog
Eventually this will be expanded into an actual list you can look
through, but this can at least give you an idea the
number of rooms this user shares with you. If the user doesn't share any
rooms with you (e.g. they left) then the label is hidden.
2025-01-18 17:40:26 +00:00
Joshua Goins
590fba7deb Always open the user details dialog in the focused window
This fixes some odd UX where you tap on someone's user in a search or
pinned messages window, but it opens in the NeoChat main window instead.

Fixes #681
2025-01-18 14:41:34 +00:00
Joshua Goins
a8f22003cb Adapt to new libQuotient API changes
postPlainText is gone
2025-01-18 13:28:39 +00:00
l10n daemon script
54596e3fe6 GIT_SILENT Sync po/docbooks with svn 2025-01-18 12:28:26 +00:00
l10n daemon script
2ee4d110a0 GIT_SILENT Sync po/docbooks with svn 2025-01-18 01:41:35 +00:00
James Graham
7a949dccbb Refactor threads
The focus here is to make threads use the standard message content system rather than having a special implementation.

To achieve this the threadroot content model will now get a thread body component which will visualise the thread model with all the other messages. The latest message in the thread will then just ask for the thread root content model and show that.

Note: in order to stop a cyclical dependency with MessageComponentChooser and new base version has been added which is just missing ThreadBodyComponent and and the main version is now inherited from that with ThreadBodyComponent added.
2025-01-17 19:18:44 +00:00
Tobias Fella
111a45ab38 Use ellipsis character instead of ... 2025-01-17 16:50:56 +01:00
l10n daemon script
2bcf59c225 GIT_SILENT Sync po/docbooks with svn 2025-01-17 01:34:40 +00:00
Joshua Goins
d542033125 Don't spam pending invites every time NeoChat is started
Currently the way we show invite notifications is sub-optimal. We did it
during the initial room state load, which meant it shows an invite
notification *every time* you opened NeoChat. This gets annoying very
quickly if you have any pending invitations you don't want to take
action on just yet.

Instead, let's handle this in NotificationsManager directly, and also
remove some scaffolding now that it isn't plumbed through
NeoChatRoom/NeoChatConnection.
2025-01-16 20:35:42 +00:00
Tobias Fella
44c72828e1 Fixes for password changing 2025-01-16 18:21:35 +01:00
l10n daemon script
99d3ee32fa GIT_SILENT Sync po/docbooks with svn 2025-01-16 01:35:29 +00:00
l10n daemon script
7df0ff309e GIT_SILENT Sync po/docbooks with svn 2025-01-15 01:35:33 +00:00
James Graham
856a751fcb Fix Getting Member Objects
It seems that there are no guarantees that we will have a room member event available when a message has arrived especially early on after room load so we should create member object unconditionally and make it the responsibility of the caller to only ask for real senders.

BUG: 498649
2025-01-14 18:54:34 +00:00
l10n daemon script
da99bcae5d GIT_SILENT Sync po/docbooks with svn 2025-01-14 01:36:26 +00:00
Joshua Goins
1b0c6c2847 Add button to view pinned messages in a room
BUG: 497427
2025-01-13 20:48:35 +00:00
Joshua Goins
c315e817b2 Add an option to disable encryption in new chats
Right now NeoChat (or more technically, libQuotient) decides to use
encryption by default in new chats. Some users may not prefer or need
this, so a new option is added under Security to change this behavior.

BUG: 498375
2025-01-13 20:34:00 +00:00
l10n daemon script
6fde07a20d GIT_SILENT Sync po/docbooks with svn 2025-01-13 01:38:22 +00:00
James Graham
8a86159fd7 Fix getting content models for old events in a search model
Fix getting content models for old events in a search model by allowing for calling using the event. This gets past the intial checks and the content model itself can load the event from the server.

Requires network/neochat!2110 to fix the showauthor issue
2025-01-12 15:14:48 +00:00
Joshua Goins
1d532a1fc1 Move showAuthor role to MessageModel, so it's available for all models
This fixes features like the search model, where no message delegates
could be created because it's missing showAuthor.
2025-01-12 13:48:31 +00:00
Tobias Fella
a67ce75924 Improve ssss result reporting 2025-01-12 14:33:42 +01:00
l10n daemon script
b3d845ea32 GIT_SILENT Sync po/docbooks with svn 2025-01-12 01:40:23 +00:00
Carl Schwan
008e12cb42 Port AccountMenu to ConvergentContextMenu 2025-01-11 17:07:17 +00:00
Carl Schwan
ceaed8be51 Simplify ExploreComponent
Remove mobile mode support as this is handled by ExploreComponentMobile
2025-01-11 17:07:17 +00:00
Carl Schwan
f0e0979366 Port DelegateContextMenu to ConvergentContextMenu 2025-01-11 17:07:17 +00:00
Carl Schwan
c43563a804 Port space menu to ConvergentContextMenu 2025-01-11 17:07:17 +00:00
Carl Schwan
8ec3b2d05d Port to ConvergentContextMenu 2025-01-11 17:07:17 +00:00
Tobias Fella
39a95c727f Remove unused functions for getting crypto keys 2025-01-11 17:47:30 +01:00
James Graham
a2f5a585e3 Use the libQuotient function to get the user power level as it is now equivalent 2025-01-11 16:38:20 +00:00
Tobias Fella
aa95bc62bd Use 6.8 flatpak runtime 2025-01-11 15:47:45 +01:00
James Graham
ae7bfa5bcb Move the storage of thread models to the room 2025-01-11 13:22:51 +00:00
James Graham
37de1ec583 Move the storage of MessageContentModels to the room
Move the storage of MessageContentModels to the room in the same manner as memeber objects to prevent duplication but mainly to make the system easier to maintain going forward with things like threads for example. This requires the creation of a MessageContentFilterModel as the same model may be used in multiple places, sometimes with the author showning sometimes not.
2025-01-11 13:16:14 +00:00
l10n daemon script
bb8f0eae1b GIT_SILENT Sync po/docbooks with svn 2025-01-11 01:33:52 +00:00
l10n daemon script
571d3c14c8 GIT_SILENT Sync po/docbooks with svn 2025-01-10 10:24:58 +00:00
Joshua Goins
d7202ae0a7 Implement request for user data erasure
This adds UI for MSC4025 to the account deactivation dialog, if the
server supports it. We also switch away from our
customDeactivateAccountJob to libQuotient's.

Fixes #670.
2025-01-09 16:37:09 -05:00
Carl Schwan
2a9c75e24f Improve handling of DonwloadAction
Set the progress the download action only when the currentProgressInfo
changed, otherwise we sometimes end up in a data race.
2025-01-09 16:41:21 +00:00
Carl Schwan
7231662f94 Fix right clicking on NeoChatMaximizedComponent
The api of RoomManager.viewEventMenu changed and now require also
passing the author.
2025-01-09 16:41:21 +00:00
Carl Schwan
df83927ed7 Expose ProgressInfoRole also for other type of attachments 2025-01-09 16:41:21 +00:00
Carl Schwan
f14dfc5de8 Set explicitely parent in MaximizeComponent
Currently it uses applicationWindow().overlay which works but is
not ideal for multiple reasons:

- This as a tendency to breaks unexpectedly
- It can't be optimized by the qml compiler

So we are trying to move away from these construct everywhere.
2025-01-09 16:41:21 +00:00
l10n daemon script
188d0c9d5c GIT_SILENT Sync po/docbooks with svn 2025-01-09 01:36:14 +00:00
l10n daemon script
8d68c64fdf GIT_SILENT Sync po/docbooks with svn 2025-01-08 01:36:51 +00:00
Carl Schwan
d796ab350e Use Component.onCompleted
as we don't yet depends on KF 6.10
2025-01-07 16:33:31 +01:00
Carl Schwan
334a1b5bef Revert "Require Kirigami master"
This reverts commit 3304ee0985.
2025-01-07 16:32:31 +01:00
Joshua Goins
3304ee0985 Require Kirigami master
This is needed for emptyHelpfulAction, which is only in the currently unreleased KF 6.10.
This should fix the KDE Android Nightly.
2025-01-07 08:17:44 +00:00
l10n daemon script
d7b3523544 GIT_SILENT Sync po/docbooks with svn 2025-01-07 01:35:44 +00:00
l10n daemon script
1a8d346064 GIT_SILENT Sync po/docbooks with svn 2025-01-06 01:37:20 +00:00
James Graham
42f9b36667 Get rid of the m_memberObjects store in MessageModel
Get rid of the m_memberObjects store in MessageModel which was missed in the last mr. Also clean up the code for NeoChatMembers
2025-01-05 18:52:18 +00:00
James Graham
c21e9f2114 Store NeochatRoomMember objects in the room
Store NeochatRoomMember objects in the room so we don't duplicate them unnecessarily. This also adds a visible property for a room which is set true when shown by MessageEventModel and false when not, triggering the deletion of member objects. This mechanism will be used for other object types in the future.
2025-01-05 11:06:42 +00:00
l10n daemon script
3dbe605de8 GIT_SILENT Sync po/docbooks with svn 2025-01-05 01:35:48 +00:00
James Graham
41a6dd6175 Timeline Memory Test App
Create a simple app that puts a number of events into a simple timeline which can be used to verify future memory optimisations

When Neochat is built with tests on you should find the app at ~/kde/usr/bin/timeline-memtest assuming ~/kde is your kdesrc-build directory
2025-01-04 15:29:40 +00:00
l10n daemon script
09af6fe0a7 GIT_SILENT Sync po/docbooks with svn 2025-01-04 01:34:01 +00:00
Kai Uwe Broulik
3b8c3afa3e Support canceling file transfer from pseudo job
Allows to click cancel on the job popup rather than only from
within NeoChat.
2025-01-03 13:56:33 +01:00
Kai Uwe Broulik
7b7f4d264c Handle transfer job being canceled
Set KilledJobError to indicate it was canceled by the user
to avoid a bogus "finished" notification.

Sadly, fileTransferCanceled has been removed from libQuotient
so this lambda botch checking transfer status needs to be done.
2025-01-03 13:55:56 +01:00
Kai Uwe Broulik
c454a4942e MessageDelegateContextMenu: Fix "Edit" action not showing
There's no such thing as Emote or Message anymore, it's all "Text".
Matches IsEditableRole of MessageEventModel.

While at it, also clear threadId, which is what the Edit quick
button also does.
2025-01-03 10:21:36 +00:00
l10n daemon script
44cd52af6c GIT_SILENT Sync po/docbooks with svn 2025-01-03 01:34:59 +00:00
Heiko Becker
0d01339b02 GIT_SILENT Update Appstream for new release
(cherry picked from commit a5b37a78a0)
2025-01-02 15:06:37 +01:00
Carl Schwan
e5b4ca53f8 Use nightly kirigami addons in craft builds 2025-01-02 15:05:36 +01:00
l10n daemon script
703b03b33c GIT_SILENT Sync po/docbooks with svn 2025-01-02 01:33:44 +00:00
l10n daemon script
73cdad66ac GIT_SILENT Sync po/docbooks with svn 2025-01-01 01:34:36 +00:00
James Graham
4b1afdbe2d Fix Thread Chatbars
Since the new thread API was released in 0.9.2 update the if defs to include it. This will solve the double chat bar in thread for anyone on 0.9.2 or above
2024-12-31 16:13:27 +00:00
James Graham
64bfc0f29a Add more detail to the MessageModel documentation
Because when I was making a new one these are the things I forgot
2024-12-31 14:52:49 +00:00
Carl Schwan
28c4c0b48c Use symbolic icon for purpose plugin 2024-12-31 14:05:05 +00:00
l10n daemon script
40ccde9f06 GIT_SILENT Sync po/docbooks with svn 2024-12-31 01:36:00 +00:00
l10n daemon script
baa7d02ba5 GIT_SILENT Sync po/docbooks with svn 2024-12-30 01:41:01 +00:00
Kai Uwe Broulik
a391df1e67 QuickSwitcher: Suggest to explore rooms when there are no search results
My go to place for doing anything with rooms, is the search button.
However, I cannot join/find new rooms from there. Therefore this adds
an "Expore rooms" button as helpful action when there are no matching
rooms.
2024-12-29 18:56:50 +00:00
Kai Uwe Broulik
1f26485208 ChatBar: Remove explicit Keys.onDeletePressed handler
Key-specific handlers, such as Key.onDeletePressed implicitly accept
the event. This means that the entire logic for the delete key must
be reimplemented, and e.g. Ctrl+Delete to delete the previous *word*
was missed.

Since all it has to do is handle the typing notification and format bar,
just use the already existing Keys.onPressed handler (which does *not*
accept the event) and add a case for Delete alongside Backspace.
2024-12-29 11:02:36 +01:00
l10n daemon script
733b72bcbd GIT_SILENT Sync po/docbooks with svn 2024-12-29 01:41:23 +00:00
l10n daemon script
f0816260c5 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-12-29 01:30:36 +00:00
l10n daemon script
32e9e66e49 GIT_SILENT made messages (after extraction) 2024-12-29 00:41:59 +00:00
James Graham
6e4973cef7 Create a common MessageModel and inherit SearchModel and MessageEventModel from it.
Title
2024-12-28 13:32:26 +00:00
l10n daemon script
4f02472421 GIT_SILENT Sync po/docbooks with svn 2024-12-28 01:45:16 +00:00
l10n daemon script
00ce6be66e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-12-28 01:31:38 +00:00
Kai Uwe Broulik
3eaef148fe timeline: Load avatars asynchronously
Speeds up scrolling through the timeline.
2024-12-27 12:16:09 +00:00
Kai Uwe Broulik
c92284ab02 RoomDelegate: Load avatar asynchronously
Speeds up scrolling through the list of rooms.
2024-12-27 12:16:09 +00:00
l10n daemon script
40718d1180 GIT_SILENT Sync po/docbooks with svn 2024-12-27 01:37:22 +00:00
Tobias Fella
ca325cb7bf Add Joshua as Maintainer 2024-12-26 13:52:44 +01:00
l10n daemon script
06e4fc0962 GIT_SILENT Sync po/docbooks with svn 2024-12-26 01:38:44 +00:00
Tobias Fella
8f82ce6ffb Use Quotient's Add3PIDJob 2024-12-25 22:02:10 +01:00
Tobias Fella
138f224109 Use Quotient's job for deleting devices 2024-12-25 21:51:40 +01:00
Tobias Fella
ef8c89b999 Use Quotient's job for password changing 2024-12-25 21:45:01 +01:00
James Graham
b595a2966c Thread alignment
It doesn't make sense for a thread to be on the right or tinted when the local user started it as they contain messages from multiple users. So always make them align left and never tint them.
2024-12-25 19:53:41 +00:00
Tobias Fella
3480c5f067 Remove unused forward declaration 2024-12-25 19:19:37 +01:00
Joshua Goins
a456b10420 Explicitly set the parent in QuickSwitcher
This sets the parent to the overlay, which makes sure it's actually
centered even when the right sidebar is opened.
2024-12-25 15:28:54 +00:00
Jan Rathmann
b7dee707a3 Port away from methods removed in libquotient. This fixes BUG: 497458 2024-12-25 01:58:55 +00:00
l10n daemon script
9f2f0f1375 GIT_SILENT Sync po/docbooks with svn 2024-12-25 01:49:27 +00:00
James Graham
fe7cf0a595 Add button to thread to reply
![image](/uploads/bf2b6857f797480b429db02c5d01a4f7/image.png){width=254 height=147}
2024-12-24 17:14:00 +00:00
James Graham
0f79c04d93 Fix new thread loading
If a thread was created by the local user fetchMore() won't find the pending event that created it so make sure it is found and added.
2024-12-24 16:20:49 +00:00
Tobias Fella
2d3373efbb Add test for invite action 2024-12-24 15:05:19 +01:00
l10n daemon script
f3a96b3562 GIT_SILENT Sync po/docbooks with svn 2024-12-24 01:33:01 +00:00
Tobias Fella
7f79fd95b5 Require passing tests on windows 2024-12-23 15:46:26 +01:00
Nicolas Fella
2eab366a1b Remove unneeded IDs from actions 2024-12-23 11:07:02 +00:00
Nicolas Fella
038a3bb5c8 Drop dead code for switchUserButton
It is never checked
2024-12-23 11:07:02 +00:00
Nicolas Fella
7bef8c99ec [UserInfo] Fix shortcut
Set the keysequence on the action directly

This makes it actually work
2024-12-23 11:07:02 +00:00
Nicolas Fella
5cbae6e8e6 Drop commented out code 2024-12-23 11:07:02 +00:00
l10n daemon script
862c022ec6 GIT_SILENT Sync po/docbooks with svn 2024-12-23 01:32:44 +00:00
Tobias Fella
71349b575b Refactor action definition
- Make an empty message type optional mean "no message"
- Set message type for all actions that send a message through the normal mechanism
- Remove now redundant bool specifying whether a message should be sent
2024-12-22 21:14:20 +01:00
Tobias Fella
2acc08402f Fix rainbowme 2024-12-22 20:35:23 +01:00
Tobias Fella
adf79e1926 Fixup disabling TextHandlerTest 2024-12-22 20:28:17 +01:00
Tobias Fella
d2e5c1d33b Disable TextHandlerTest on CI
It's broken for no apparent reason while working fine locally
2024-12-22 20:17:33 +01:00
Tobias Fella
3fce30f709 Add basic tests for actions 2024-12-22 19:51:07 +01:00
James Graham
6bdb67f504 Update string literals
Since _ls is now deprecated this is removed in favour of L1, I've also taken the oportunity to replace QStringLiteral and QLatin1String with their shortened form while we're at it.

There are also a few instances where the string literal type has been switch, the general rule being to use the one that matches the function type or value being compared to avoid conversions.
2024-12-22 18:23:55 +00:00
James Graham
314f86007e Fix New ThreadModel Messages
ThreadModel was not updated to use pendingEventAdded the same way MessageEventModel was so new messages in an exisiting thread were not being initialised properly. This fixes it to use the updated pendingEventAdded on new enough versions of libQuotient.
2024-12-22 10:11:56 +00:00
James Graham
476edc6ad3 Show thread on latest message
Use the new thread functionality in libQuotient to show the thread on the latest message rather than the root.

Note: to test you need to bump your libquotient minor version to 10 or higher.

Also Note: this reveals some other bugs in how new threads are shown or refreshed when new messages are added, this will be fixed in a later patch as some re-architecting is required
2024-12-22 10:11:37 +00:00
James Graham
a56cafb97e Remove makeMessageTimestamp from MessageEventModel as it is now unused 2024-12-22 10:11:16 +00:00
James Graham
6663b0c257 Custom Room Sort Order
Add the ability to sort rooms by a custom set of parameters.
2024-12-22 10:11:04 +00:00
l10n daemon script
c50d4289c4 GIT_SILENT Sync po/docbooks with svn 2024-12-22 01:33:09 +00:00
l10n daemon script
595080b5c1 GIT_SILENT Sync po/docbooks with svn 2024-12-21 01:45:26 +00:00
l10n daemon script
a9cbd766c8 GIT_SILENT made messages (after extraction) 2024-12-21 00:41:17 +00:00
l10n daemon script
fdfd49105f GIT_SILENT Sync po/docbooks with svn 2024-12-20 01:36:01 +00:00
l10n daemon script
c7afddcfab GIT_SILENT Sync po/docbooks with svn 2024-12-18 01:35:34 +00:00
l10n daemon script
9fe3d4faf0 GIT_SILENT made messages (after extraction) 2024-12-18 00:40:24 +00:00
l10n daemon script
41a827555c GIT_SILENT Sync po/docbooks with svn 2024-12-17 01:38:11 +00:00
l10n daemon script
c9317e4ec5 GIT_SILENT Sync po/docbooks with svn 2024-12-16 02:03:06 +00:00
l10n daemon script
0ae16ccf76 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-12-16 01:37:31 +00:00
l10n daemon script
73d3b638df GIT_SILENT made messages (after extraction) 2024-12-16 00:42:42 +00:00
Soumyadeep Ghosh
e2b0a105a7 snap: use cmake snap and use . as source
- override the `PATH`
- use gcc from toolchains PPA
2024-12-15 13:05:28 +00:00
l10n daemon script
195864d3ac GIT_SILENT Sync po/docbooks with svn 2024-12-15 02:03:11 +00:00
l10n daemon script
c4aa843038 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-12-15 01:35:34 +00:00
Joshua Goins
843da2664f Add better support for colored text (and shrugs) from other clients
Some clients - such as Element - can send colored text through <span>,
which fails to display in Qt's rich text parser. So we need to transform
that into CSS styles which is supported by Qt.

Notably this allows you to exchange rainbow shrugs through Matrix, which
is really important. And this means colored backgrounds for text is
supported too, I guess.
2024-12-14 13:46:56 +00:00
Joshua Goins
23eaa6a4c7 Fix web shortcuts not doing anything
This is because we're passing a QUrl into a QString, we need to turn it
into a string explicitly.

BUG: 496434
2024-12-14 09:26:24 +00:00
l10n daemon script
f29bb971e0 GIT_SILENT Sync po/docbooks with svn 2024-12-14 02:06:50 +00:00
l10n daemon script
266123a5e0 GIT_SILENT made messages (after extraction) 2024-12-14 00:49:37 +00:00
Volker Krause
9b0d01619c Update Android Gradle plugin version to 8.6.0
Necessary for building against Android SDK 35.
2024-12-13 17:06:27 +01:00
l10n daemon script
291162f5f0 GIT_SILENT Sync po/docbooks with svn 2024-12-13 01:31:25 +00:00
Thiago Sueto
29820e2ab2 Don't set emoji size to font size
https://invent.kde.org/network/neochat/-/merge_requests/2005 changed the custom emoji height (whose default is 32 on every Matrix client) to match font height (on my machine it becomes 17, my font is 12pt).

It makes emojis unreadable on non-HiDPI resolutions (1366x768, 1920x1080), and even in the MR itself you can see how much detail is lost. This is compounded by some other rendering bug where the emoji image becomes very jagged when downscaled.

That MR however was correct in that:
* we want custom emojis to have a different size than unicode emojis
* we want custom emojis to be centered according to the text (to make better use of line spacing/paddings)
* we don't want the line height to be changed (too much) by custom emojis
* we (probably) want custom emojis to be _displayed_ proportionally to the text

I'm investigating ways to solve this issue. It seems other Matrix clients (and even chat applications like Telegram or Discord) all globally suffer from this issue and have dealt with it in different ways, sometimes masquerading it and sometimes working around it.

For now though, we shouldn't break emoji legibility for our users. Affecting line height by a few pt is a minor issue compared to being almost unable to tell what inline emoji you or your interlocutor is using. Even just the "center emoji with text" thing already makes the line height issue 1/3 less of a problem. Once we improve the emoji rendering so it's more readable, _then_ it would make sense to decrease the emoji height to something like font.height * 1.6 or so.

This does not affect unicode emojis, as far as I can tell those are handled elsewhere. This only affects inline custom emojis.

Illegible on 1366x768 with 100% scaling and font size 11:

![image](/uploads/1d074c78d63aa1f28d9f3d204a656cc7/image.png){width=1025 height=576}

![Screenshot_20241212_144737](/uploads/7ae8e080f383461dcef3320575c05b24/Screenshot_20241212_144737.png)

Legible:

![Screenshot_20241212_150257](/uploads/4f9395bd25025317005aaf1b9a1633c0/Screenshot_20241212_150257.png)

![Screenshot_20241212_150357](/uploads/a5fbb8885d601592591e99c0cc669794/Screenshot_20241212_150357.png)
2024-12-12 18:12:38 +00:00
l10n daemon script
a92a72cebd GIT_SILENT Sync po/docbooks with svn 2024-12-12 01:31:53 +00:00
Kai Uwe Broulik
fe09dc23a6 Main: Set window title to current room name 2024-12-11 17:36:41 +01:00
Tobias Fella
9cd4a7416e Fix crash when sending messages
ECM recently started adding -fhardened, which makes us crash here since we're doing things that aren't valid, but happened to work out fine previously.
2024-12-11 16:05:19 +01:00
l10n daemon script
f6e3210b0d GIT_SILENT Sync po/docbooks with svn 2024-12-11 01:30:44 +00:00
Tobias Fella
16d33eb02c Don't show "This message was deleted" for state events
The result is unexpected and confusing
2024-12-10 12:58:24 +01:00
Tobias Fella
326512697c Show displayname instead of user id for join events 2024-12-10 12:46:54 +01:00
l10n daemon script
f25de891bf GIT_SILENT Sync po/docbooks with svn 2024-12-10 01:34:07 +00:00
l10n daemon script
e785533858 GIT_SILENT Sync po/docbooks with svn 2024-12-09 01:35:58 +00:00
l10n daemon script
0699bc4147 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-12-09 01:26:04 +00:00
James Graham
d07a8258e9 Room Custom Filter Prep
This is basically prep work for customisable sort orders. The room sort parameters are detached from the room sort model as multiple components will need to access the values. The sorting is then generified.

Some defunct sorting parameters are also removed.
2024-12-08 13:10:00 +00:00
l10n daemon script
d490e65315 GIT_SILENT Sync po/docbooks with svn 2024-12-08 01:30:05 +00:00
Tobias Fella
7a632c9561 Fix janky behavior of room drawer swipes
When not modal, dragging the edge of the room drawer to change its width felt very broken.
This seems to be a collision between Qt's dragging logic and our dragging logic,
so we disable theirs if the drawer is not modal
2024-12-07 12:39:19 +01:00
l10n daemon script
ec4b35fa5f GIT_SILENT Sync po/docbooks with svn 2024-12-07 01:32:24 +00:00
l10n daemon script
b263755629 GIT_SILENT Sync po/docbooks with svn 2024-12-06 01:31:21 +00:00
l10n daemon script
828585a260 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-12-06 01:25:13 +00:00
l10n daemon script
3b33121dbc GIT_SILENT made messages (after extraction) 2024-12-06 00:40:30 +00:00
Tobias Fella
21484c8184 Convert reuse data to new format 2024-12-05 18:12:07 +01:00
Soumyadeep Ghosh
020385c850 backend: allow users to sort based on last activity
This MR allows an option to prefer the last activity as the most
favorable parameter for sorting.
2024-12-05 16:32:40 +00:00
Kai Uwe Broulik
c585f3d8ae Add "Copy Link Address" context menu
Allows copying just the link address of a hyperlink.
2024-12-05 15:58:22 +00:00
l10n daemon script
3356e6c6cf GIT_SILENT Sync po/docbooks with svn 2024-12-05 01:31:30 +00:00
Joshua Goins
2fa6ad22a3 Expose access token under developer tools
I need this from time to time. For example, debugging an API call or
scripting something with the admin API. This is buried under developer
settings so hopefully no one starts sharing this willy-nilly.

Element Web does something similar, except theirs is hidden under Help &
About.
2024-12-04 21:42:10 +00:00
Joshua Goins
b887519f26 Add missing contexts for the rest of the settings header and page titles 2024-12-04 15:48:43 -05:00
Joshua Goins
b1e54a834c Fix capitalization of labels under General Settings
Buttons should be title case, and form headers should be sentence case.
Also, add an icon to the "Reset to defaults" button.
2024-12-04 15:41:36 -05:00
Joshua Goins
171e62a272 AccountMenu: Fix capitalization of items
This is a menu full of menu items, and should be using title case as
suggested by our HIG.
2024-12-04 15:38:00 -05:00
Joshua Goins
053770c117 snap: update libquotient 2024-12-04 20:05:07 +00:00
Tobias Fella
911f3e1f54 Fix some compilation warnings 2024-12-04 17:31:02 +01:00
l10n daemon script
1494ba95b3 GIT_SILENT Sync po/docbooks with svn 2024-12-04 01:32:09 +00:00
l10n daemon script
c0b00ce146 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-12-04 01:24:49 +00:00
l10n daemon script
47a08b829e GIT_SILENT made messages (after extraction) 2024-12-04 00:40:08 +00:00
Joshua Goins
953bb60aac Remove explicit quit connection with QQmlApplicationEngine
This is not needed, it already does this by itself.
2024-12-03 22:19:49 +00:00
Tobias Fella
fc4cb31277 Devtools: Use ChooseRoomDialog to select a room for inspection
The combobox has several drawbacks:
- It's not sorted in any meaningful way
- It doesn't have a search
- It doesn't show the icon and last message

This makes it hard to find the intended room in that dialog. The ChooseRoomDialog provides these things for us
2024-12-03 10:07:11 +01:00
l10n daemon script
9876636dbc GIT_SILENT Sync po/docbooks with svn 2024-12-03 01:31:25 +00:00
Heiko Becker
8314ab03bd GIT_SILENT Update Appstream for new release
(cherry picked from commit 1e29eca59a)
2024-12-03 01:10:01 +01:00
Tobias Fella
9d887ba3e7 Remove system information from device display name
BUG: 496901
2024-12-02 15:50:50 +00:00
l10n daemon script
1612a8a960 GIT_SILENT Sync po/docbooks with svn 2024-12-02 01:54:40 +00:00
l10n daemon script
99af210e62 GIT_SILENT made messages (after extraction) 2024-12-02 00:41:39 +00:00
Paul Brown
8fd108cde1 Added Stuart Turton as supporter 2024-12-01 19:09:18 +00:00
James Graham
ca81d35936 Post Message Refactor 2
Remove the need for NeoChat to have overloaded functions for posting messages and just use what quotient gives
2024-12-01 19:05:31 +00:00
James Graham
d65aacac6f postHtml Refactor
Use EventRelation and EventContent to form messages rather than writing custom Json.
2024-12-01 17:19:55 +00:00
l10n daemon script
43f052a363 GIT_SILENT Sync po/docbooks with svn 2024-12-01 01:31:34 +00:00
Paul Brown
0e0a38ffa2 Added supporter Joshua Strobl 2024-11-30 19:33:33 +00:00
Joshua Goins
819586fc4e Fix state keys developer tool page not working
Yet another applicationWindow failure
2024-11-30 16:15:47 +00:00
Joshua Goins
6b8a331428 Add icon for "Open developer tools" under Settings, add separator
It makes it look a little bit nicer, I think.
2024-11-30 16:15:28 +00:00
James Graham
57e7004e05 Fix removeConnection
Check m_accountsLoading and m_connectionsLoading separately for removal as when loadAccessTokenFromKeyChain() fails m_connectionsLoading won't have an entry for it
2024-11-30 15:27:09 +00:00
l10n daemon script
25c95cafe3 GIT_SILENT Sync po/docbooks with svn 2024-11-30 01:30:42 +00:00
l10n daemon script
54be1a8918 GIT_SILENT Sync po/docbooks with svn 2024-11-29 01:34:41 +00:00
l10n daemon script
d4a0573051 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-11-29 01:25:40 +00:00
Paul Brown
4a96eac67b Update org.kde.neochat.appdata.xml 2024-11-28 09:02:11 +00:00
Ingo Klöcker
2f4134a6d2 Add icon for F-Droid store listing
Our fastlane metadata tooling looks for an icon named like the application
icon specified in AndroidManifest.xml followed by "-playstore.png".
2024-11-27 22:08:34 +01:00
Laurent Montel
4f87dcc0c0 Add missing include moc 2024-11-27 20:44:46 +00:00
Nate Graham
47eba6b720 Make the room list slightly narrower by default
`GridUnit * 17` is 306px, which is quite wide. Given that the focus in
this app is on the content (i.e. the chat view) let's make the sidebar
a 36px narrower to make more room for content.

BUG: 496722
FIXED-IN: 24.12.0
2024-11-27 16:07:06 +00:00
l10n daemon script
cba537d561 GIT_SILENT Sync po/docbooks with svn 2024-11-27 01:31:59 +00:00
l10n daemon script
c9d03cb042 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-11-27 01:25:14 +00:00
Tobias Fella
e42c002fbd Fix visibility check 2024-11-26 21:58:39 +01:00
Tobias Fella
7c7b073a47 Fix some unqualified access warnings 2024-11-26 21:58:34 +01:00
l10n daemon script
20090d21eb GIT_SILENT Sync po/docbooks with svn 2024-11-26 01:30:45 +00:00
l10n daemon script
b0e69ff4b8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-11-26 01:24:17 +00:00
l10n daemon script
552bb0a98b GIT_SILENT made messages (after extraction) 2024-11-26 00:40:17 +00:00
l10n daemon script
19510858af GIT_SILENT Sync po/docbooks with svn 2024-11-25 01:33:01 +00:00
l10n daemon script
44b2f6ee63 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-11-25 01:24:13 +00:00
l10n daemon script
c5d3002f31 GIT_SILENT made messages (after extraction) 2024-11-25 00:40:24 +00:00
James Graham
2e3659d4ee Don't open the space home page when changing spaces on android
When I change space on android I just want to be able to select a room I'm in.
2024-11-24 13:13:47 +00:00
l10n daemon script
f8a5509a91 GIT_SILENT Sync po/docbooks with svn 2024-11-24 01:32:27 +00:00
James Graham
421f436871 Fix MessageContentModel crash
Make sure we check that the RoomMessageEvent exists before accessing anything
2024-11-23 22:20:05 +00:00
James Graham
a37c9d6cea Make sure space drawer icons are available for android 2024-11-23 17:09:44 +00:00
Tobias Fella
d14d576d99 Implement MSC 4228 Search Redirection
See https://github.com/matrix-org/matrix-spec-proposals/pull/4228 for details.
Since this is tricky to test without server-side support, I have added a basic implementation
to the mock server in appiumtests/login-server.py

1. Start appiumtests/login-server.py
2. Start neochat with "--test --ignore-ssl-errors" options
3. Open "Explore Rooms"
4. Search for the exact string "forbidden"
5. See new error message provided by server
2024-11-23 15:50:12 +01:00
James Graham
9391e44e4b EventHandler Cleanup
Remove functions from eventhandler and replace with now uplifted functions in libquotient
2024-11-23 14:21:13 +00:00
l10n daemon script
a7aebe3a61 GIT_SILENT Sync po/docbooks with svn 2024-11-23 01:29:28 +00:00
Paul Brown
1fca9021a4 Added supporter dabe 2024-11-22 22:04:28 +00:00
Joshua Goins
a39194b2ad Fix ShareActionStub for Windows and Android
Apparently, we are supposed to be setting source file properties for our QML files *before*
the QML module is created. Doing it after seemed to work until Qt 6.8, where it finally
broke. Notably, this makes the Android version work again but might also affect Windows.
2024-11-22 13:44:17 +00:00
l10n daemon script
bff93d9352 GIT_SILENT Sync po/docbooks with svn 2024-11-22 01:32:35 +00:00
l10n daemon script
d76c9cd16d GIT_SILENT Sync po/docbooks with svn 2024-11-21 01:30:26 +00:00
l10n daemon script
14774fe235 GIT_SILENT Sync po/docbooks with svn 2024-11-20 01:31:20 +00:00
l10n daemon script
39046632aa GIT_SILENT Sync po/docbooks with svn 2024-11-19 01:30:50 +00:00
Carl Schwan
fbb2afdb49 Remove layout attached properties
They don't do anything
2024-11-18 12:32:00 +00:00
James Graham
aff0402f71 Make sure the loading text for a new login wraps
Title

BUG: 493869
2024-11-18 08:42:19 +00:00
James Graham
cee9058c77 Fix Sed Edits
Make sure that for multiple sed edits we grab the eventID of the original message not the replacement

BUG: 496313
2024-11-18 08:41:52 +00:00
l10n daemon script
3f922b4c90 GIT_SILENT Sync po/docbooks with svn 2024-11-18 01:34:10 +00:00
l10n daemon script
02d2d31cf3 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-11-18 01:25:11 +00:00
Thiago Sueto
240cf6a0ed Make height of chatbar, userinfo bar and side tab bar the same
|Current state|With this MR|
|-|-|
|![Screenshot_20241115_171736](/uploads/858a8ca21a6f4024a20f6ba32225aece/Screenshot_20241115_171736.png)|![Screenshot_20241115_171650](/uploads/115f99c7bb2b93a542c42647f9cc25c7/Screenshot_20241115_171650.png)|
2024-11-17 18:47:45 +00:00
Tobias Fella
dcd9ee93de Escape display name in WelcomePage 2024-11-17 19:26:04 +01:00
Joshua Goins
2a8cd74ab1 Fix undefined access when loading stickers in chat
We need a check here, because stickers (and really, any images without a
tempSource) will try to access an undefined object.

This fixes the error:
"qrc:/qt/qml/org/kde/neochat/timeline/ImageComponent.qml:106: TypeError: Cannot read property 'source' of undefined"
2024-11-16 21:30:59 +00:00
Joshua Goins
63bc7055c2 Default to a more sensible sticker size
If we do not set the width/height for stickers (which don't have any)
then the height is okay, but the message has the maximum width which
looks odd.

Instead, let's limit all stickers to 256px and it makes them look much
nicer in chat.
2024-11-16 16:12:56 -05:00
Joshua Goins
1cca9733d6 Add a comment that these are not normal quotation marks
It can be hard to tell depending on which font you're viewing the code
with.
2024-11-16 16:02:12 -05:00
Joshua Goins
1104da5e2c TextHandler: Use the fancy Unicode quotation characters
As per our HIG, we should use these in quotations instead of the normal
quote characters.
2024-11-16 21:01:04 +00:00
Joshua Goins
3a9718c09d Limit the width of a user's QR code
This fixes the lopsided layout in the user details dialog.
2024-11-16 21:00:39 +00:00
Joshua Goins
55362c5573 RoomManager: Unify the resolveResource overloads
Every time I look at how resource resolving works, I always trip over
this unused overload. This behaves *different* than the other overload,
which has special cases for handling invalid Uris.

Now whether you pass in a Uri or a QString, it should behave the same.
2024-11-16 21:00:29 +00:00
Joshua Goins
0bba2299b3 Set the size of custom emoticons to the font height, and fix alignment
Currently custom emojis render weirdly in NeoChat. Not only are they
large, they're also in charge and like to mess up the layout of the
text.

Now that's fixed and they'll take up the same height as the surrounding
text. It's now centered in the text too.
2024-11-16 21:00:11 +00:00
Joshua Goins
45685af9e9 Add icons to the recommended space actions, fix spacing of the items 2024-11-16 20:59:57 +00:00
Joshua Goins
6c416a9338 Fix restoring the last used space on desktop
This was supposed to work, but it's done in the wrong order. We need to
set the current space first, and then select the room - otherwise
it doesn't get restored.
2024-11-16 20:59:45 +00:00
Joshua Goins
1b0027e1d2 Ensure it's not possible for the recommended space avatar to assert 2024-11-16 20:59:02 +00:00
Joshua Goins
2409adf516 Fix avatars not loading in the room completion model 2024-11-16 20:59:02 +00:00
Joshua Goins
554801dfe4 Make sure RoomInformation's source is type url 2024-11-16 20:59:02 +00:00
Joshua Goins
20c23917e9 Remove now unused NeoChatRoomMember::avatarMediaId() 2024-11-16 20:59:02 +00:00
Joshua Goins
ef953b7574 Remove more needless usages of makeMediaUrl
This is only really needed in specific cases, e.g. localUser which isn't
attached to a connection and thus needs a little help. Notes for when
this is needed is added for future readers.
2024-11-16 20:59:02 +00:00
Joshua Goins
6b79795229 Change how room avatars are passed, fix friend avatars not loading
The problem lies in how media URLs work, in this case it the old
NeoChatRoom::avatarMediaId could pass a mxc url *or* a path that can
be put into root.connection.makeMediaUrl. So normal rooms with avatars
loaded, but never friends because room members gave the mxc URL.

Instead, change everything to use avatarMediaUrl which corrects this
issue by always passing a mxc URL to QML. This also removes the need to
call makeMediaUrl.

Fixes #675
2024-11-16 20:59:02 +00:00
Joshua Goins
9cb7ec2348 Add ellipses to the "Forward" message action, because it opens a dialog 2024-11-16 18:53:53 +00:00
Joshua Goins
437c981d30 Don't show the file name underneath the image
This still keeps custom image descriptions, but no longer shows it for
images where it was the same as their filename.
2024-11-16 13:18:46 -05:00
Joshua Goins
0334cae4c8 Change the room alias text color to disabled
It's less important than the title, and this should reduce it's visual
prominence.
2024-11-16 16:40:57 +00:00
Joshua Goins
24c405d747 Add a separator between the report and copy message actions 2024-11-16 11:39:18 -05:00
Joshua Goins
a3f5962809 DelegateContextMenu: Add support for separators in the mobile menu too 2024-11-16 11:30:49 -05:00
Joshua Goins
0deb7495f0 Re-arrange the file and message context menus, add separators
Like the room context menu, this is a jumbled list of actions that could
use some organization. Also, the text for "Copy Text" and "Copy Link" is
clearer.
2024-11-16 11:23:39 -05:00
Joshua Goins
d34f89fc4b DelegateContextMenu: Add support for separator actions 2024-11-16 11:22:37 -05:00
Joshua Goins
a909ed498f Hide the category list in the emoji picker when there is none
This is easy to test if you have no stickers. It should no longer have
a weird empty space above the placeholder message.
2024-11-16 16:03:36 +00:00
Joshua Goins
16f4e17e8f Improve how stickers appear in the emoji picker
First, the fill mode for the sticker images shouldn't stretch them.
Also make sure there is enough padding in the category so the image
doesn't appear larger than the button. Finally, set the source size for
the images so Qt can smooth them out better.
2024-11-16 16:03:24 +00:00
Joshua Goins
0e9592a96c Settings: Use symbolic version of the NeoChat icon
To match the rest of the icons in this sidebar, we can reuse our tray
icon.
2024-11-16 16:03:09 +00:00
Joshua Goins
704ee6a53a Add placeholder icon when there's no emojis or stickers 2024-11-16 10:50:49 -05:00
Joshua Goins
5b9afbce9a Settings: Request symbolic versions of the icons
According to the HIG, we should be using symbolic versions of these
icons at this size. Not that we have symbolic versions for these icons
yet, but it's still safe to do as they'll fall back to the old ones.
2024-11-16 09:48:13 -05:00
Thiago Sueto
396cc8e8ef Make top margin consistent across Neochat settings
This standardizes on the same value used for KirigamiAddons pages like AboutKDE and About, namely largeSpacing * 4.

Now, when switching between settings pages you no longer have settings inconsistently changing heights willy nilly, header notwithstanding.

The only page that's missing is the Spellchecking page, as that needs to be fixed in Kirigami Addons' private Sonnet page.
2024-11-16 14:37:01 +00:00
Thiago Sueto
bf776b5c06 Fix inconsistent wording about leaving current space/room
For rooms, we already say "Leave this room".

When viewing a Space page, we have both "Leave the space" and "Leave this room". The "Leave the space" VS "Leave this space" was bothering me, and the Space page should say "Leave this space" instead of "Leave this room".
2024-11-16 14:36:30 +00:00
Joshua Goins
be319f88d3 "Save As" action should have ellipses
Because you have to interact with the save dialog before doing anything
else.
2024-11-16 14:25:47 +00:00
Joshua Goins
af40d555d4 Improve the layout and function of the room context menu
The room context menu is a jumbled mess of actions, so the first idea of
this commit is to organize them. The first item is "Mark as Read"
because let's be honest, you're going to be using that the most. Then
the next "group" of actions are what users can "do" with the room. This
is like "Notification settings", "Favorite" and etc. Then there's room
settings, and leave.

Secondly, the "Favorite" action now uses the same icon we use elsewhere.

Third, "Notification State" is a weird name for this action and renamed
to simply "Notifications".

Finally, the "Mark as Read" action is now disabled when there's nothing
else to read.
2024-11-16 14:25:12 +00:00
Joshua Goins
f802dbe686 Port from deprecated AboutKDE component to AboutKDEPage 2024-11-16 14:24:10 +00:00
Joshua Goins
2379e3d83b Don't scroll up when clicking on the same room over and over
If you try to click on your current room in the list, it scrolls up the
messages a bit. This is because in RoomManager::visitRoom it's being
called with an empty eventId and we will happily emit a goToEvent. This
is despite there being nothing to go to.

Fixes #677.
2024-11-16 14:18:32 +00:00
Joshua Goins
9e90ac0412 Add margins to the room drawer header to match Kirigami
Otherwise it sticks to the left of the drawer and looks kinda ugly.
2024-11-16 14:16:50 +00:00
Joshua Goins
c27948ca3c Change the leave button in the drawer to "Leave this space" if needed 2024-11-16 14:14:32 +00:00
Joshua Goins
c3b9d664df "Room Information" title should be capitalized 2024-11-16 14:13:32 +00:00
Joshua Goins
31ef0a5223 Make it so the filename is filled out by default when saving files
This was never ported from the Qt labs platform FileDialog, because
currentFile doesn't exist anymore. It's now called selectedFile.
2024-11-16 14:12:19 +00:00
Joshua Goins
14c58acea1 Improve the appearance of the welcome page user list
Before it only listed the user id, and nothing else. If you had multiple
accounts, it's a little difficult to tell them apart. Now the user
selection appears like how they are displayed elsewhere in NeoChat, with
the display name and avatar.

| Before | After |
| ------ | ------ |
|   ![Screenshot_20241115_221425](/uploads/3986e4c7bbb7dcdca67ee30bb529767e/Screenshot_20241115_221425.png){width=786 height=822}     |        ![Screenshot_20241115_221149](/uploads/57eb1a7e57ba5ae8c41dd922cbf39c62/Screenshot_20241115_221149.png){width=786 height=822} |
2024-11-16 14:11:55 +00:00
l10n daemon script
5dae20603e GIT_SILENT Sync po/docbooks with svn 2024-11-16 01:34:25 +00:00
Joshua Goins
3f6fa94289 Port from Kirigami Add-ons Banner to Kirigami InlineMessage 2024-11-15 17:29:56 +00:00
l10n daemon script
117615a8b0 GIT_SILENT Sync po/docbooks with svn 2024-11-15 01:32:04 +00:00
l10n daemon script
4a52773c7d GIT_SILENT Sync po/docbooks with svn 2024-11-14 01:31:26 +00:00
l10n daemon script
edfee495c6 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-11-14 01:24:49 +00:00
l10n daemon script
7d112df7c6 GIT_SILENT made messages (after extraction) 2024-11-14 00:40:15 +00:00
l10n daemon script
9acaaade45 GIT_SILENT Sync po/docbooks with svn 2024-11-13 01:30:31 +00:00
l10n daemon script
aaca28dbf6 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-11-13 01:24:06 +00:00
Paul Brown
d4ef5f9d4d Update org.kde.neochat.appdata.xml 2024-11-12 19:02:36 +00:00
James Graham
2095dea801 Add #if for patch to fix pendingEventAdded event ref 2024-11-12 16:25:23 +00:00
James Graham
a36f7ef10d Fix test 2024-11-12 16:25:23 +00:00
James Graham
9874962ee3 Make sure that the content model is loaded properly when a new event is set. This fixes seeing an unknown event message for all new events. Instead a loading symbol is briefly seen before switching to the actual content. 2024-11-12 16:25:23 +00:00
l10n daemon script
4b08022075 GIT_SILENT Sync po/docbooks with svn 2024-11-12 01:33:25 +00:00
l10n daemon script
dc3db3aec4 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-11-12 01:26:03 +00:00
l10n daemon script
0568c2a93d GIT_SILENT Sync po/docbooks with svn 2024-11-11 01:35:46 +00:00
l10n daemon script
7ab0a6fc9e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-11-11 01:24:43 +00:00
Joshua Goins
d6b780762e PollHandler: Make sure it's not constructible from QML 2024-11-10 15:16:26 +00:00
Joshua Goins
5ef66b5cf6 PollHandler: Ensure that m_pollStartEvent is always initialized to null
Otherwise it may be undefined, and we DO create default-constructed
PollHandler. For example, one is used as a fallback poll object
in NeoChatRoom::poll.

This is blind fix for a pretty nasty poll-related crash we saw a few
months ago.

BUG: 493649
2024-11-10 15:16:26 +00:00
l10n daemon script
19e8cd5e48 GIT_SILENT Sync po/docbooks with svn 2024-11-10 01:35:11 +00:00
l10n daemon script
df5117892f SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-11-10 01:24:25 +00:00
l10n daemon script
aaa4216f55 GIT_SILENT made messages (after extraction) 2024-11-10 00:40:38 +00:00
Joshua Goins
85ee5084b6 Add m.room.create state events to sync_response
In case we need to access the creation state in an appium test in the
future.
2024-11-09 23:21:37 +00:00
Joshua Goins
bb9ce117de Hide rooms that have a defined room type
I have a room with a custom type that's only for holding data, and
doesn't need to be shown in the room list. Currently the spec is a bit
vague about what clients should do, but hiding them is probably fine
for now.
2024-11-09 23:21:37 +00:00
Carl Schwan
00c5aa26bb RoomGeneralPage: Add missing separator
And some other minor fixes
2024-11-09 23:11:19 +00:00
Joshua Goins
bae4de227c Make closing link previews instant, as it should be
We were missing a endResetModel() call, now with it added the removal
happens instantly.
2024-11-09 23:10:54 +00:00
Joshua Goins
253f891c5a Stop being able to crash NeoChat by pressing a button repeatedly
If you spam click the "Close link preview" button, it's possible to
crash NeoChat. This is because the index check is wrong for the array
size.

It's possible to even do this due to a bug causing the removal to be
reflected visually too slowly, that's fixed in the next commit.
2024-11-09 23:10:54 +00:00
Joshua Goins
6966159062 Improve clicking link previews
First of all, clicking on them actually works - because we were missing
an import for RoomManager. Secondly, we use a dedicated TapHandler
since onLinkActivated sucks. We want to be able to click anywhere on the
preview to go to the website/room anyway.
2024-11-09 23:10:40 +00:00
Joshua Goins
07d3b80c3e Don't set isThread on the message and file delegate context menus
It doesn't have a property called isThread, and I don't know where it
went - if it ever existed?
2024-11-09 23:10:31 +00:00
Joshua Goins
a41d0f3214 Make fullscreen images focused when they're opened
Otherwise keyboard shortcuts don't work until you tap the image, which
makes no sense.

BUG: 484322
2024-11-09 23:10:21 +00:00
Joshua Goins
1ee15de78b Fix viewing any kind of data in developer tools
Fix pageStack being undefined, so we're able to view event data again.
2024-11-09 23:10:08 +00:00
Carl Schwan
b044358970 Update checkbox of PollComponent
Use FormCheckDelegate instead of a CheckBox inside a RowLayout. This
increase the click area particularly on mobile.
2024-11-09 23:09:51 +00:00
Oliver Beard
d2e11bb3bb timeline: Round separators for replies and link previews 2024-11-09 23:09:33 +00:00
Joshua Goins
a55bac899c README: Change snap store badge to the one from apps.kde.org
It seems CORS is blocking access to the badge, but we have rehosted on
apps.kde.org.
2024-11-09 21:32:45 +00:00
Joshua Goins
c2380fb8df Update network proxy page with the improved version from Tokodon
This functions the same, but looks a bit nicer.
2024-11-09 17:11:11 +00:00
Joshua Goins
f31c644b13 Update desktop file and app description to match AppStream data
This was updated to "Chat on Matrix" but in other places it was never
switched from "Matrix client" and the like. Now it should be more
consistent.
2024-11-09 17:11:00 +00:00
Joshua Goins
26cd621d0e Clarify that sorting rooms by activity isn't the only thing it does
Recently, it also sorts rooms based on unread notification count and
importance. This adds a clarification to the setting so users (like me)
aren't confused why it isn't sorting only by activity.
2024-11-09 16:46:54 +00:00
l10n daemon script
4c58512c54 GIT_SILENT Sync po/docbooks with svn 2024-11-09 01:30:21 +00:00
Albert Astals Cid
04c1b47660 GIT_SILENT Upgrade release service version to 25.03.70. 2024-11-08 19:38:32 +01:00
l10n daemon script
7b249e9fa6 GIT_SILENT Sync po/docbooks with svn 2024-11-08 01:30:13 +00:00
l10n daemon script
46593ef68f GIT_SILENT Sync po/docbooks with svn 2024-11-07 01:31:11 +00:00
Eren Karakas
b70f73c7d6 Make send message and insert newline shortcuts configurable
Currently both Enter and Ctrl+Enter send the message in ChatBar on
desktop. This might be unexpected behavior to users coming from other
chat applications (eg. WhatsApp, Telegram, Element) as those send
with Enter only by default. They allow changing send to Ctrl+Enter
in settings and other option is used to insert a newline.

BUG: 476758
2024-11-06 21:09:58 +00:00
l10n daemon script
ece5e34fa2 GIT_SILENT Sync po/docbooks with svn 2024-11-06 01:31:11 +00:00
Joshua Goins
74b400288d ManualRoomDialog: Use Window.window attached property
This fixes a runtime error since applicationWindow is undefined.
2024-11-05 16:45:37 +00:00
Joshua Goins
83f19b0631 ExploreRoomsPage: Fix "Enter a room address" button not working
This was due to an undefined applicationWindow singleton, but we don't
actually need it and can use Overlay.overlay directly.
2024-11-05 16:45:37 +00:00
l10n daemon script
c905d2d6fb GIT_SILENT Sync po/docbooks with svn 2024-11-05 01:30:46 +00:00
l10n daemon script
d0c1eb2f04 GIT_SILENT Sync po/docbooks with svn 2024-11-04 01:28:25 +00:00
Tobias Fella
d7d9d29c1d Remove no longer needed ifdefs 2024-11-03 18:42:56 +01:00
Tobias Fella
2a3f019ec6 Port away from Quotient::Omittable 2024-11-03 18:26:46 +01:00
Tobias Fella
d384d50b0d Remove olm target check
Olm isn't option in libQuotient anymore, there's no point in checking
2024-11-03 18:21:19 +01:00
Tobias Fella
be8cb12bba Require libQuotient 0.9 2024-11-03 17:48:40 +01:00
l10n daemon script
a1aa2918be GIT_SILENT Sync po/docbooks with svn 2024-11-03 01:27:04 +00:00
l10n daemon script
d7536bccb3 GIT_SILENT Sync po/docbooks with svn 2024-11-02 01:29:54 +00:00
l10n daemon script
6b677355e1 GIT_SILENT made messages (after extraction) 2024-11-02 00:39:52 +00:00
James Graham
85d625f6ac Delete ActionsHandler
Move the fucntionality of ActionsHandler into ChatbarCache and ActionsModel.

At this stage there wasn't much left that is was doing and the functionality could easily move.
2024-11-01 17:00:08 +00:00
l10n daemon script
f5d6f87afe GIT_SILENT Sync po/docbooks with svn 2024-11-01 01:29:19 +00:00
Joshua Goins
31d755f407 ManualRoomDialog: Change title of the dialog to reduce duplication
"Room ID or Alias" is duplicated twice here, once in the dialog title
and a second time as the label for the text field. Let's change it to a
more suitable name "Manually Enter a Room".
2024-10-30 22:25:53 -04:00
Joshua Goins
ebfc20d4b4 ExploreRoomsPage: Add better text to the "Enter a room address" button
This adds a short explanatory label to the "Enter a room address" button
in this list, in case the user does not know where to find their room
address.

Also changes the name of the button to "Enter a Room Manually" to refer
that you can enter aliases here as well.
2024-10-30 22:24:20 -04:00
l10n daemon script
b83d42103f GIT_SILENT Sync po/docbooks with svn 2024-10-31 01:30:42 +00:00
Heiko Becker
c9856347fe GIT_SILENT Update Appstream for new release
(cherry picked from commit 4b7011fe14)
2024-10-31 01:14:26 +01:00
l10n daemon script
7224c92caf SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-10-30 01:23:46 +00:00
l10n daemon script
a84f98c96f GIT_SILENT made messages (after extraction) 2024-10-30 00:39:47 +00:00
l10n daemon script
a40bccc29d GIT_SILENT Sync po/docbooks with svn 2024-10-28 01:33:27 +00:00
l10n daemon script
171897161c GIT_SILENT made messages (after extraction) 2024-10-28 00:40:09 +00:00
l10n daemon script
013ad49e2b GIT_SILENT Sync po/docbooks with svn 2024-10-27 01:34:19 +00:00
l10n daemon script
b357586164 GIT_SILENT made messages (after extraction) 2024-10-27 00:40:08 +00:00
James Graham
5642f3416a Pester Network Error Messages
Stop sending a pester message using showPassiveNotification every time there is a network error. There is already a proper handling with `isOnline` in `NeochatConnection`. This just causes issues overlapping content.

BUG: 488572
2024-10-26 12:28:28 +00:00
l10n daemon script
9bbb1710df GIT_SILENT made messages (after extraction) 2024-10-26 00:40:19 +00:00
l10n daemon script
e2b7679252 GIT_SILENT Sync po/docbooks with svn 2024-10-25 01:30:33 +00:00
l10n daemon script
5c353cd4b5 GIT_SILENT made messages (after extraction) 2024-10-25 00:40:01 +00:00
l10n daemon script
cba6dc994f GIT_SILENT Sync po/docbooks with svn 2024-10-24 01:29:20 +00:00
l10n daemon script
b0c4b7fc2a GIT_SILENT made messages (after extraction) 2024-10-24 00:39:47 +00:00
James Graham
ed7aff1f24 Updates for further event content changes
Adapt to https://github.com/quotient-im/libQuotient/pull/812
2024-10-23 16:38:51 +00:00
l10n daemon script
33f4be0d88 GIT_SILENT made messages (after extraction) 2024-10-23 00:40:25 +00:00
l10n daemon script
1178cafef0 GIT_SILENT made messages (after extraction) 2024-10-22 00:39:47 +00:00
l10n daemon script
1be97e65b4 GIT_SILENT Sync po/docbooks with svn 2024-10-21 01:30:29 +00:00
Carl Schwan
634cefc694 Simplify appstream summary
- matrix -> Matrix
- Remove "with your friends" as NeoChat is not only about chatting with
  your friend

CCBUG: 480167
2024-10-20 23:33:48 +00:00
l10n daemon script
36469c6097 GIT_SILENT Sync po/docbooks with svn 2024-10-20 01:30:26 +00:00
l10n daemon script
0cd9c6a434 GIT_SILENT Sync po/docbooks with svn 2024-10-19 01:31:03 +00:00
l10n daemon script
e285a94273 GIT_SILENT Sync po/docbooks with svn 2024-10-17 01:30:25 +00:00
James Graham
a2ec6d97b1 Update for the latest event content changes to libquotient 2024-10-16 17:32:55 +00:00
l10n daemon script
b42fd3fc51 GIT_SILENT Sync po/docbooks with svn 2024-10-16 01:32:19 +00:00
Tobias Fella
12971bb08b Minor cleanup 2024-10-15 22:01:32 +02:00
James Graham
79deda4f2d Make sure that content is kept alive so fileInfo can be used throughout the function 2024-10-15 16:30:57 +00:00
James Graham
365af2cd6c Mobile Pages
Currently the page experienc on mobile is suboptimal as back gestures do not work and the startup behaviour is not ideal.

This reworks it so that pages are now pushed as a layer on mobile and at startup only a saved space is restored. It is also setup so that on mobile you'll never see a blank room page (like when you select friends or home).
2024-10-15 16:13:02 +00:00
l10n daemon script
cc50e76c0d GIT_SILENT Sync po/docbooks with svn 2024-10-15 01:28:56 +00:00
James Graham
16df22af68 Update for the API changes to RoomMessageEvent in libquotient 0.9 2024-10-14 21:59:56 +01:00
l10n daemon script
53a957fa15 GIT_SILENT Sync po/docbooks with svn 2024-10-14 01:27:49 +00:00
James Graham
69571489fa Mobile DelegateContextMenu
Make sure that the mobile DelegateContextMenu is getting the author data correctly
2024-10-13 14:47:10 +00:00
James Graham
3a66b4d67e Fix mobile ExploreComponent
Make sure that the search filter is removed when another button is pressed.
Make sure that the popup closes when one of the other menus is open.
Make the separator is at the top on NavigationTabBar
2024-10-13 12:41:56 +00:00
l10n daemon script
ba8d2b1281 GIT_SILENT Sync po/docbooks with svn 2024-10-12 01:29:09 +00:00
Tobias Fella
11185c127d Escape display name in verification event 2024-10-11 22:46:38 +02:00
Tobias Fella
0ab3bfd4f3 Fix crash when opening invitation
There seem to be problems with the model not updating correctly when the room is set. This fix is a bit dirty, but seems to work well enough

BUG: 493197
2024-10-11 22:15:38 +02:00
Tobias Fella
b5fdb3d0db Fix transitioning from invitation page to normal room page 2024-10-11 21:11:17 +02:00
Tobias Fella
9ef342e448 Fix emoji detection
The previous code considered "123" to be an emoji
2024-10-11 21:00:51 +02:00
Tobias Fella
0bda65b5ac Make sure that we don't immediately open all new rooms
Some confusing interaction with the code removed here causes us to open all rooms that come in.
We generally don't want that. I also don't understand why we're connecting for new rooms here - the room is already available in this case.
2024-10-11 20:44:15 +02:00
James Graham
005b7a760c Request Notification Permission
If notification permission has not been granted and permission has not previously been asked for request notification permission.
2024-10-11 16:28:59 +00:00
Tobias Fella
ab3c40a709 Don't double-escape subject 2024-10-11 16:12:00 +02:00
Tobias Fella
a809b7f11e Fix avatar size for some uncommon cases 2024-10-11 15:07:46 +02:00
l10n daemon script
702c7d49a8 GIT_SILENT Sync po/docbooks with svn 2024-10-11 01:34:35 +00:00
Tobias Fella
a2afaf40cd Remove some leftover debug logging 2024-10-10 22:06:19 +02:00
Joshua Goins
eb900a5c2c Fix access of notifications manager in UnifiedPush codepath 2024-10-08 07:56:11 -04:00
l10n daemon script
14eadb3b92 GIT_SILENT Sync po/docbooks with svn 2024-10-08 01:29:52 +00:00
l10n daemon script
a5d84bb266 GIT_SILENT made messages (after extraction) 2024-10-08 00:39:44 +00:00
Oliver Beard
5a03ce4e95 qml/RoomDrawer: Add & fix separators
A separator has been added to the drawer view's left side, and the position of the NavigationTabBar has been set so it correctly draws the separator at the top and not the bottom.
2024-10-07 18:43:40 +00:00
l10n daemon script
607db82db0 GIT_SILENT Sync po/docbooks with svn 2024-10-07 01:28:24 +00:00
Heiko Becker
56b302d4c8 GIT_SILENT Update Appstream for new release
(cherry picked from commit 765292e0e9)
2024-10-06 22:02:31 +02:00
James Graham
1237e9d4bd NotificationManager rework
Rework notifications manager to no longer be a singleton, but a component of controller.

The dependency on it for neochat room and connection is also removed.
2024-10-06 17:14:18 +00:00
Carl Schwan
71468e453c RoomGeneralPage: Move avatar setting outside of FormCard 2024-10-06 09:38:37 +00:00
Nicolas Fella
d0a915e81c Add missing QML import name 2024-10-06 09:38:19 +00:00
l10n daemon script
e7751f40fa GIT_SILENT Sync po/docbooks with svn 2024-10-06 01:28:31 +00:00
l10n daemon script
498240c6ec SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-10-06 01:22:10 +00:00
l10n daemon script
d448cf4c7e GIT_SILENT made messages (after extraction) 2024-10-06 00:39:44 +00:00
James Graham
d7d9f254ff Remove the dependence on RoomManager from NeochatConnection.
At the same time use the roomCreated signal from connection for auto resolving as it's specifically designed for user created rooms.
2024-10-05 18:39:21 +01:00
James Graham
aedba5c650 Strip single <p> tags inside TextHandler rather than actions handler 2024-10-05 17:05:36 +00:00
James Graham
a4e9794b13 MessageComponent
It feels weird to have anything that needs MessageComponent have to depend on all of MessageContentModel and pull in it's dependencies. This moves MessageComponent into its own header.
2024-10-05 15:51:19 +00:00
James Graham
4bd4bd6f22 Rework ActionsHandler
Rework ActionsHandler as static helper functions.

The functions are now invoked from ChatBarCache so there is no need to pass an actions handler object around qml simplifying the code.
2024-10-05 13:44:53 +00:00
l10n daemon script
ac9bfbff78 GIT_SILENT Sync po/docbooks with svn 2024-10-05 01:29:07 +00:00
James Graham
e26392ce94 requestDirectChat
Use Quotient::connection::requestDirectChat directly as it can already handle all the conditions.
2024-10-04 16:52:05 +00:00
l10n daemon script
a314e56425 GIT_SILENT Sync po/docbooks with svn 2024-10-04 01:30:17 +00:00
James Graham
4af27f7609 Remove unneeded includes 2024-10-03 23:22:48 +01:00
James Graham
773017c881 errorOccured
Have controller link to neochatconnection for errorOccured rather than call directly to remove dependency on controller.

For all the same reasons as network/neochat!1926
2024-10-03 20:32:30 +00:00
James Graham
153cbeae8a ShowMessage
Move showMessage to RoomManager and merge warning in. A new Message type enum is created aligned with the Kirgami.MessageType used by Kirigami.Banner to avoid needing to translate from 2 enums. 

showMessage is also sent as a signal from NeoChatRoom (and via the room from ActionsModel), this removes the need for them to have a dependency on Controller (and RoomManager). While not necessarily the cause of Windows crashes the spaghetti dependencies of RoomManager and Controller throughout the code base has made debugging that harder so this aims to simplify that as well.
2024-10-03 18:42:29 +00:00
l10n daemon script
777ea9fbe0 GIT_SILENT Sync po/docbooks with svn 2024-10-03 01:28:58 +00:00
James Graham
d22cc7f40a Use Knotificationpermission 2024-10-02 21:07:58 +00:00
Carl Schwan
c28ca9087c RemoveChildDialog: Don't wrap delegates in FormCard 2024-10-02 17:12:36 +00:00
l10n daemon script
857412d9cc GIT_SILENT Sync po/docbooks with svn 2024-10-02 01:29:32 +00:00
James Graham
4b132460f6 Remove unused include utils.h in neochatroom 2024-10-01 19:31:52 +01:00
James Graham
644f5c0ce1 Permission Manager
Add permission manager from Itinerary so that Android permissions can be checked.

Note at the moment the request permission functions are not hooked up so on Android the permission will need to be manually set on. I'll hook this up later but I wanted to confirm my suspicion on notifications being the current cause of crashes.
2024-10-01 17:29:39 +00:00
l10n daemon script
45439e17c9 GIT_SILENT Sync po/docbooks with svn 2024-10-01 01:29:28 +00:00
Carl Schwan
485e0f0510 Make hover actions position logic more robust 2024-09-30 20:30:36 +00:00
Carl Schwan
2969d20a92 Put hover actions in the RowLayouts
Simplify the code compared to use an ActionToolBar and this should makes
it more reliable.
2024-09-30 20:30:36 +00:00
Soumyadeep Ghosh
7cf97a5c9b snap: update to latest tag 2024-09-28 12:59:32 +05:30
l10n daemon script
f2894ed774 GIT_SILENT Sync po/docbooks with svn 2024-09-27 01:31:05 +00:00
Tobias Fella
3e1044b8fd Adapt to libQuotient changes 2024-09-26 19:55:41 +02:00
l10n daemon script
0c6480c5e0 GIT_SILENT Sync po/docbooks with svn 2024-09-26 01:29:11 +00:00
Luc Schrijvers
232c45979a Disable KRunner, X11, and DBus on Haiku 2024-09-25 13:31:00 +00:00
James Graham
848031c315 Add the notifcation permision for modern android versions 2024-09-25 05:22:26 +00:00
l10n daemon script
bf2389c31c GIT_SILENT Sync po/docbooks with svn 2024-09-25 01:30:30 +00:00
James Graham
d87bba7993 Revert "snap: update for latest tag"
This reverts commit 6e81701d4b
2024-09-24 21:57:18 +00:00
Carl Schwan
9b837a8656 SelectParentDialog: Fix selecting room 2024-09-24 21:08:34 +00:00
Carl Schwan
90061caec3 Fix undefined StyledText error
StyledText is an enum for Text not TextEdit
2024-09-24 19:30:27 +00:00
Soumyadeep Ghosh
6e81701d4b snap: update for latest tag 2024-09-24 17:59:10 +05:30
l10n daemon script
2164c4c3f8 GIT_SILENT Sync po/docbooks with svn 2024-09-24 01:36:38 +00:00
Nate Graham
a0665187c6 Use common key for saving window state data
We typically use "MainWindow" here, not "Main".
2024-09-23 14:37:32 -06:00
l10n daemon script
77e933f620 GIT_SILENT Sync po/docbooks with svn 2024-09-23 01:27:36 +00:00
l10n daemon script
deed9cf6d7 GIT_SILENT Sync po/docbooks with svn 2024-09-22 01:31:14 +00:00
Carl Schwan
fad4e506bc Fix display name in verification message
Previously this would be undefined and i18n doesn't handle this very
well
2024-09-21 13:26:03 +00:00
Carl Schwan
9d6b940b78 Port away from Qt.Plaform.labs
This bring a QtWidget dependency on Android
2024-09-21 12:12:14 +00:00
Carl Schwan
cfb663d399 RoomGeneralPage: Split general info in two card
So that the save button isn't floating in the middle of the card
2024-09-21 12:11:50 +00:00
Carl Schwan
4620c176b6 AppearanceSettingsPage: Hide separator for transparancy setting on Android 2024-09-21 12:11:39 +00:00
Carl Schwan
8c927a59d9 NetworkProxyPage: Add separator between form delegates 2024-09-21 12:11:27 +00:00
Carl Schwan
2fe9bc9846 Fix arrow icons on Android 2024-09-21 12:11:14 +00:00
Carl Schwan
b9615eadb3 Use FormTextAreaDelegate 2024-09-21 12:11:04 +00:00
Volker Krause
e4e5d14d6e Use released KQuickImageEditor 2024-09-21 09:46:33 +00:00
Carl Schwan
75eddd2a6f amdroid: Add missing icon for preferences 2024-09-21 11:45:38 +02:00
l10n daemon script
634407a22d GIT_SILENT Sync po/docbooks with svn 2024-09-21 01:31:02 +00:00
Carl Schwan
42dd2e5413 Ensure floating buttons have correct size on mobile 2024-09-20 19:52:58 +00:00
Carl Schwan
2a6e3c0add Remove global menu support from Android
This pull out QtWidgets which we don't need
2024-09-20 12:25:19 +00:00
Volker Krause
abb81e0d8e Update craft.ini
KF 6.6 for KColorScheme is sufficient meanwhile, but we need a newer
KQuickImageEditor to properly load with Qt6.
2024-09-20 10:49:33 +00:00
l10n daemon script
e9a4b43331 GIT_SILENT Sync po/docbooks with svn 2024-09-20 01:35:20 +00:00
Tobias Fella
08b2c39a61 Make ChooseRoomDialog a SearchPage
Makes it look a bit nicer and more standardised
2024-09-19 19:51:32 +02:00
James Graham
f89cec9c55 Make sure that m_components cannot be accessed out of bounds in closeLinkPreview
https://crash-reports.kde.org/organizations/kde/issues/67352/?project=18&query=is%3Aunresolved+issue.priority%3A%5Bhigh%2C+medium%5D&referrer=issue-stream&statsPeriod=14d&stream_index=5
2024-09-19 17:18:25 +00:00
James Graham
4c49ca2a51 NeochatRoomMember ID fallback
Make sure that when the returned RoomMember in NeochatRoomMember is empty that displayname and similar functions return the member Matrix ID

BUG: 491025
2024-09-19 15:43:02 +00:00
Tobias Fella
52ab6f484b Fix crash in MessageContentModel 2024-09-19 16:45:05 +02:00
Tobias Fella
2a5359e73b Fix NeoChatRoom::directChatRemoteMember
- Don't access member that's not there
- Use NeoChatRoomMember instead of RoomMember

BUG: 492733
2024-09-19 16:04:27 +02:00
l10n daemon script
977ea73237 GIT_SILENT Sync po/docbooks with svn 2024-09-19 01:29:31 +00:00
Tobias Fella
a769b904dc Fix compilation 2024-09-18 14:36:12 +02:00
l10n daemon script
5def5124ef GIT_SILENT Sync po/docbooks with svn 2024-09-18 01:32:34 +00:00
l10n daemon script
40c3cc7f9e GIT_SILENT Sync po/docbooks with svn 2024-09-17 01:31:27 +00:00
l10n daemon script
17c0906044 GIT_SILENT Sync po/docbooks with svn 2024-09-16 01:42:20 +00:00
James Graham
38cfc915f1 Use autoTransform on images
closes network/neochat#674
2024-09-15 10:21:54 +00:00
James Graham
1821d9fc04 Move reply pane to use MessageContentModel
Move reply pane to use MessageContentModel. This means the reply pane component is no longer required.

This commit also limits the size of code and image componets in a reply to keep them from getting too huge.
2024-09-15 08:39:22 +00:00
James Graham
ec6a8dd028 Only save eventId in MessageContentModel
Turns out trying to manage pointers in the model is a bad idea so only save eventId in MessageContentModel, events pointers will now only be obtained temporarily then discarded to avoid both creating additional copies of the event in the model and potential sources of crashes.

This also creates a basic unit test that we can add to going forward.
2024-09-15 08:28:46 +00:00
l10n daemon script
e0c3b7f808 GIT_SILENT Sync po/docbooks with svn 2024-09-15 01:32:10 +00:00
l10n daemon script
155dc4919e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-09-15 01:23:53 +00:00
l10n daemon script
a38c53b2be GIT_SILENT Sync po/docbooks with svn 2024-09-14 01:34:50 +00:00
James Graham
67dfc7b32e Fix Eventhandler strings for translation
Change the generic representations of events in event handler to always have a full string to aid translation.

The aggregated list is then converted to be a simple list of single event generic descriptions to avoid string puzzles.

Fixes network/neochat#638

BUG: 466201, BUG: 491024
2024-09-13 17:11:50 +00:00
Tobias Fella
f156551d4f Fix compilation against changes in libQuotient 2024-09-13 15:43:10 +02:00
Tobias Fella
5c04eb85af Fix filtering users in the member list 2024-09-13 14:36:27 +02:00
l10n daemon script
1efa27177a GIT_SILENT Sync po/docbooks with svn 2024-09-13 01:30:57 +00:00
Bart Ribbers
17da652152 Don't open a room by default on mobile
Since the room window is fullscreen on mobile and you can't see the room list,
the first thing you'll be doing is backing out so you can choose the actual room you want to see
2024-09-12 15:17:38 +00:00
Tobias Fella
4ff866ea29 use kcolorscheme master 2024-09-12 13:58:46 +02:00
Tobias Fella
3c9c7abe35 Try fixing android 2024-09-12 13:58:43 +02:00
l10n daemon script
157017126a GIT_SILENT Sync po/docbooks with svn 2024-09-12 01:26:57 +00:00
l10n daemon script
928e4ae5ed SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-09-12 01:20:59 +00:00
l10n daemon script
2bc790f4cb GIT_SILENT made messages (after extraction) 2024-09-12 00:39:36 +00:00
l10n daemon script
a3148b264c GIT_SILENT Sync po/docbooks with svn 2024-09-11 01:27:19 +00:00
Carl Schwan
16b27700f5 Unify redaction handling
The code in messageeventmodel was calling to EventHandler::getBody who
already handles reaction handlings
2024-09-10 12:08:00 +00:00
Carl Schwan
9ee10b6968 Escape html from redaction message 2024-09-10 12:08:00 +00:00
l10n daemon script
4d0db0b5c2 GIT_SILENT Sync po/docbooks with svn 2024-09-10 01:26:40 +00:00
l10n daemon script
6e49aaf17b GIT_SILENT Sync po/docbooks with svn 2024-09-09 01:28:45 +00:00
Joshua Goins
1092d75f2e Remove vestigial references to window geometry
These weren't removed in d165cd955d
because I forgot.
2024-09-08 07:32:00 +00:00
Joshua Goins
8059c3797d Remove unused lambda capture variables
This removes two compile time warnings.
2024-09-08 07:24:24 +00:00
Joshua Goins
1302d62ad9 SpaceDrawer: Remove seemingly non-existent signal call 2024-09-08 07:23:58 +00:00
Joshua Goins
8eaae4034d Shorten the error message passive notification
The default timeout is a bit long, "short" is 3 seconds shorter than the
default. For  long-term network errors, we have a banner telling you so
anyway. This should hopefully reduce the notification spam when you have
temporary network dropouts.
2024-09-08 07:23:30 +00:00
l10n daemon script
354e3414a1 GIT_SILENT Sync po/docbooks with svn 2024-09-08 01:28:05 +00:00
James Graham
fc24beae6d Use im-kick-user consistently for logout.
I went with im-kick-user as it's fully red at all sizes.

BUG: 491355
2024-09-07 12:41:26 +00:00
Claire Elford
923cc67b55 Add test for missing character before a Matrix ID 2024-09-07 10:19:12 +00:00
Claire Elford
30e24069bc Fix missing character before a Matrix ID
When you send messages like "a @blankeclair:catgirl.cloud b" or
"]#rainversewiki:catgirl.cloud", they would be rendered like
"a@blankeclair:catgirl.cloud b" and "#rainversewiki:catgirl.cloud"
respectively. This commit fixes that by not matching the character before the
MXID in the regex.
2024-09-07 10:19:12 +00:00
Claire Elford
f7533a454c Fix increasing font size of certain emojis
Before this commit, NeoChat has two methods of detecting whether or not a piece
of text was an emoji. One is through a regex, and the other is by using the ICU
library. The two methods are used in different parts of the code.

This commit removes the regex detector and instead uses ICU for all the places
where NeoChat needs to figure out whether or not a string is an emoji. This
fixes increasing the font size for messages that only consist of emoji when
certain emoji are used that the regex did not handle (such as the transgender
symbol and transgender flag emojis).
2024-09-07 09:49:27 +00:00
Claire Elford
ab4e1a86dc Fix parsing self-closing tags with no space (such as <br/>)
If there was no space between the tag name and the slash of a self-closing tag,
the code assumes that the tag name is "br/". This commit adds the slash as a
character to close a tag on, so that "<br/>" is treated as a self-closing "br".

BUG: 487377
2024-09-07 12:50:18 +10:00
l10n daemon script
d28c2ed113 GIT_SILENT Sync po/docbooks with svn 2024-09-07 01:27:17 +00:00
Heiko Becker
3a467328f5 GIT_SILENT Update Appstream for new release
(cherry picked from commit b6dac3bbdf)
2024-09-07 00:48:52 +02:00
Tobias Fella
979d83cb01 Remove calls from tests 2024-09-06 08:21:06 +00:00
Joshua Goins
d165cd955d Use the new KConfig WindowStateSaver
This removes some NeoChat-specific code we have for saving/restoring the
window.
2024-09-06 08:21:06 +00:00
l10n daemon script
6eb770343e GIT_SILENT Sync po/docbooks with svn 2024-09-06 01:34:07 +00:00
James Graham
54be52b855 Fix default permissions settings
Make sure that if default permissions or basic permissons are not present in the power level event that they are set properly when changed rather than in the event section.

Also define some of the commonly used strings

BUG: 491371
2024-09-05 13:48:42 +00:00
Tobias Fella
d201333409 Don't consider events that change membership to be renames
Otherwise, the "Show rename events" flag affects the visibility of events where we don't expect it
2024-09-05 13:27:52 +02:00
Tobias Fella
3db8b4cd17 Ask for a reason when kicking a user 2024-09-05 13:22:23 +02:00
l10n daemon script
0e246a00bc GIT_SILENT Sync po/docbooks with svn 2024-09-05 01:26:38 +00:00
l10n daemon script
e638fa8929 GIT_SILENT Sync po/docbooks with svn 2024-09-04 01:26:36 +00:00
l10n daemon script
cdc982ad91 GIT_SILENT Sync po/docbooks with svn 2024-09-03 01:26:14 +00:00
Joshua Goins
bff69e21ad Add icons for the menus in the message context menu
In Qt6 we can now assign icons to menus, so let's add what's missing.
2024-09-02 17:28:03 +00:00
Joshua Goins
e117cc0cfb Move the "Show User" action to DelegateContextMenu, add it for media
This was missing from the media context menu, and should be added. Since
it's shared between messages and files, it's now a common action.
2024-09-02 17:28:03 +00:00
Joshua Goins
3af1a88e05 Don't show the "Web Search" action in the media context menu
All this does is try to web search for the filename of the image, which
is useless. Let's hide it entirely in this case.
2024-09-02 17:28:03 +00:00
Joshua Goins
aa116a35f5 Web Shortcuts: kcmshell5 does not exist anymore on Plasma 6
This is hardcoded, but it's probably a safe assumption to think most
people running modern NeoChat are using Plasma 6 anyway.
2024-09-02 17:15:37 +00:00
Joshua Goins
ac232d7f55 Change the "configure room" button icon to something more fitting
This button doesn't actually configure anything, you can do plenty of
actions like "mark as read" and such. Since the button isn't solely for
configuration, we should use an overflow menu icon instead.
2024-09-02 17:02:36 +00:00
Joshua Goins
928911e33c Settings: Overhaul the Security page
This improves the organization of this page, which is starting to become
a bit of a mess. The "Hide images and video events" option is moved
here, and the page is rebranded accordingly for "Security & Safety".
Unnecessary headings are removed, and the ignored users button is moved
to the top of the page.

Explanations for the import/keys buttons are added. The key display
is removed as it's not useful for the user (because they don't know what
to do with it) nor developers (because you can't copy it.) We can add
it back somewhere else.

This has the added benefit of making the whole page fit in the default
settings window size too.
2024-09-02 16:13:12 +00:00
Joshua Goins
e3c30f5bb3 Settings: Hide "minimize to system tray" when system tray is disabled
We do this for the state events setting, so let's do it here too.
2024-09-02 16:01:51 +00:00
Tobias Fella
4b51855528 Add name for Avatar in RecommendedSpaceDialog 2024-09-02 17:26:14 +02:00
Tobias Fella
79c27db0a9 Improve InviteUserPage 2024-09-02 16:33:45 +02:00
Tobias Fella
78e42ab352 Make it possible to invite users that were previously in the room by command 2024-09-02 15:54:40 +02:00
Tobias Fella
93909c45ee Refactor dialogs for reporting, banning, and removing messages 2024-09-02 15:18:32 +02:00
Joshua Goins
eda0bf4b23 LocationChooser: Add a "Locate" button to locate yourself
The map centers on London by default, but for the other people living
outside it may find it hard to figure out where they are. This adds a
button that calls into QtPositioning to center the map over where you
are.
2024-09-02 13:09:21 +00:00
Joshua Goins
4f4b10e0b6 LocationChooser: Add a "Re-center" action to find the pinned location
It's somewhat easy to scroll or pan away from the pin you placed, so
let's add an action to re-center the map if you want to find it again.
2024-09-02 13:09:21 +00:00
Joshua Goins
2b374a8bec Add an icon when you only have invites but no direct messages
There's an edge case with the friends icon, where it will display a
blank circle if you only have pending invites but no actual direct
messages. Now an icon is added to make it clear there is pending invites
and it's not a visual bug.
2024-09-02 12:40:54 +00:00
Tobias Fella
7821de4a8d Don't end kick messages without a reason with a ":"
BUG: 492512
2024-09-02 14:39:17 +02:00
Tobias Fella
86b88c851f Close AccountSwitchDialog when logging in a new connection
Otherwise, the dialog is still opened after login has finished
2024-09-02 14:38:33 +02:00
Tobias Fella
1157882f1b Don't register ThreadChatBarModel as a QML_ELEMENT
It's not needed and doesn't work
2024-09-02 13:36:32 +02:00
Tobias Fella
594d1373c9 Cleanup 2024-09-02 13:30:15 +02:00
Tobias Fella
1e6948bbc7 Fix crash during logout 2024-09-02 12:49:38 +02:00
Tobias Fella
41845b97d5 Fix crash on logout 2024-09-02 12:45:11 +02:00
Tobias Fella
bb56f74622 Fix initials for avatar in UserInfo 2024-09-02 10:34:39 +02:00
l10n daemon script
a98f6ac331 GIT_SILENT Sync po/docbooks with svn 2024-09-02 01:26:52 +00:00
Joshua Goins
15d6287995 LocationHelper: Move clamp from zoomToFit to QML
The OSM plugin has a different zoom tolerance than what we're hardcoding
here. This fixes the map looking funky from being too zoomed while
trying to fit multiple location points at once.
2024-09-01 18:48:20 +00:00
Joshua Goins
0242ab72e8 Allow opening locations in your preferred map
Once someone shares a location with you, typically you want to open it
in your preferred mapping application or website. For example, being
sent a location to a restaurant and needing to route it via Google Maps.

Now in NeoChat you can click on the "Open Externally" button on a
location message. On KDE Plasma, the default application can be set
under System Settings. On Android, this URI is handled by Google Maps
and possibly others.
2024-09-01 18:23:49 +00:00
Joshua Goins
4b7cbf37d5 AuthorDelegate: Don't make empty space clickable 2024-09-01 15:55:51 +00:00
Joshua Goins
0ccfe7d991 AuthorDelegate: Add pointing hand cursor to indicate you can tap
It's not immediately obvious that you can press on this static text to
bring up the user's details. This isn't a problem with the avatar - for
example - because it has a pointing hand cursor. Let's do the same here.
2024-09-01 15:55:51 +00:00
Joshua Goins
ab5585cd06 Make the SectionDelegate look just a little bit better
This has insets on it - probably from qqc2-desktop-style - and makes it
look extremely bad when scrolling through messages as the background
size doesn't match. Now the insets are set to zero, except for topInset.
This is done to work around a visual bug where you can see a one-pixel
line right above the SectionDelegate when scrolling.
2024-09-01 11:42:17 -04:00
Joshua Goins
b25a0a7a4e Settings: Hide certain pages when we have no connection
This hides the "Notifications", "Security", "Accounts" and "Devices"
page from the settings if we have no connection. This can now happen
since the user is able to enter the full settings without being logged
in from the welcome page.
2024-09-01 14:21:14 +00:00
Joshua Goins
f574c12adc WelcomePage: Redesign to center the contents, other misc improvements
We now remove the header from the page, and replace it with a separator
(it still lives with an InlineMessage for error handling.) The contents
of this page are now centered, and the maximum width of the buttons are
reduced.

Along with that are two smaller misc improvements. One is that the
duplicate separator underneath "Register" is now gone. Another is that
the full settings page may now be opened from here, allowing users to
access more than proxy settings.
2024-09-01 14:21:14 +00:00
James Graham
05a2f03c18 Make use of the proposed new KColorScheme API
Make use of new API proposed in frameworks/kcolorscheme!12
2024-09-01 14:17:41 +00:00
l10n daemon script
cbc2e65856 GIT_SILENT Sync po/docbooks with svn 2024-09-01 01:26:36 +00:00
l10n daemon script
1df80a7d2a GIT_SILENT Sync po/docbooks with svn 2024-08-31 01:27:27 +00:00
l10n daemon script
050a014df7 GIT_SILENT Sync po/docbooks with svn 2024-08-30 01:35:35 +00:00
l10n daemon script
4775ae09b0 GIT_SILENT Sync po/docbooks with svn 2024-08-29 01:27:27 +00:00
l10n daemon script
8d4c3bb4fc GIT_SILENT Sync po/docbooks with svn 2024-08-28 01:38:01 +00:00
l10n daemon script
439260ff03 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-08-28 01:25:46 +00:00
James Graham
5b04ad6805 Minor fixes for MessageContentModel and ThreadModel 2024-08-27 15:58:27 +01:00
James Graham
6d77ed1e0e Create an LRU cache for linkpreviewers
Create an LRU cache for linkpreviewers to stop the storage growing continuously as new links are made.
2024-08-27 08:15:03 +00:00
l10n daemon script
cc7f783b50 GIT_SILENT Sync po/docbooks with svn 2024-08-27 01:29:27 +00:00
James Graham
1d7ed1983b Use the ChatBar Component for new thread messages
![image](/uploads/a24dea919e7f165d602991659f517c22/image.png){width=148 height=210}

Note: there is still an issue where after starting a new thread the threaded messages only appear after a restart as the root event needs re-downloading from the server to get the thread info added. My plan is to tackle this next.
2024-08-26 19:13:19 +00:00
Tobias Fella
c0151353c5 Add an option to hide images and videos by default
Implements #658
2024-08-26 17:42:29 +02:00
l10n daemon script
72994248fa GIT_SILENT Sync po/docbooks with svn 2024-08-26 01:35:00 +00:00
l10n daemon script
af0d3d5ee1 GIT_SILENT Sync po/docbooks with svn 2024-08-25 01:26:59 +00:00
James Graham
07dd1d2e91 Make sure that the reply message is hidden if a user is ignored.
This will hide the content when a user ignores and re show it if unignored in the same session.

Note: If the client is restarted the rely will be blanked as the server refuses to send the message. However if unignoring a restart is currently required to get the full timeline back. This can't be trivially fixed as it takes a bit of time for the server to deal with the unblock and allow the message to be downloaded. With no signals available to jump off we'd just have to poll the endpoint which considering this is not going to happen often seems like a bad idea for minimal gain.

Closes network/neochat#657
2024-08-24 16:37:51 +00:00
Tobias Fella
185a88a16e Fix opening ignored users page 2024-08-24 17:32:32 +02:00
Tobias Fella
e3059e636a Fix ignoring invitations 2024-08-24 17:32:15 +02:00
Tobias Fella
aeb566746a Use plaintext for reply author component 2024-08-24 17:30:46 +02:00
Tobias Fella
8da567d9fa Don't run QtKeychain job in a nested event loop
Doing that causes deadlocks and there's no need for it here
2024-08-24 11:21:20 +02:00
Tobias Fella
d99f69cc24 Adapt to libQuotient API change 2024-08-24 11:03:28 +02:00
l10n daemon script
8240962400 GIT_SILENT Sync po/docbooks with svn 2024-08-24 01:27:32 +00:00
Tobias Fella
bd1d4289c0 Ensure that room list does not show rooms without title during startup
There's a brief moment during startup where the model knows about the rooms, but their state
is not loaded, which makes them show up in the room list with ugly fallback titles.
To prevent this, we delay closing the welcome page until the basestate is loaded.
2024-08-23 17:08:46 +02:00
James Graham
5d2139471a MessageEditComponent Updates
Rename MessageEditComponent to ChatBarComponent in preparation for also using it with threads and cleanup.
2024-08-23 14:56:01 +00:00
Tobias Fella
d49a64ac1e Remove unused MatrixImageProvider sources 2024-08-23 16:36:07 +02:00
James Graham
cd867ea581 Rework event handler to be just a series of static helper functions
- Clear out unused functions
- All functions are now static

This is because we pretty much always used it in the form:
```
EventHandler eventHandler(room, event);
eventHandler.function();
```
This simplifies it all to a single call.
2024-08-23 14:30:03 +00:00
James Graham
32fd62c484 Add option to reset all config values to their default
Closes network/neochat#504
2024-08-23 09:20:09 +00:00
l10n daemon script
f2c561bd15 GIT_SILENT Sync po/docbooks with svn 2024-08-23 01:27:31 +00:00
James Graham
80734944d3 Use sections for power levels in the user list
Closes network/neochat#654
2024-08-22 19:34:31 +00:00
James Graham
b3afa9f595 Add delegates to show room upgrades into the timeline model.
The delegates are at the beginning for upgraded rooms and end for predecessors.

Closes: network/neochat#620 and network/neochat#619
2024-08-22 17:21:36 +00:00
l10n daemon script
656558850c GIT_SILENT Sync po/docbooks with svn 2024-08-22 01:30:41 +00:00
Tobias Fella
e41cca9be0 Make room leaving more robust 2024-08-21 20:31:33 +02:00
Laurent Montel
46916b34d4 Remove duplicate headers from headers/cpp 2024-08-21 12:28:57 +00:00
l10n daemon script
4f9ca3e74d GIT_SILENT Sync po/docbooks with svn 2024-08-20 01:36:45 +00:00
l10n daemon script
2bcdd0f52b GIT_SILENT Sync po/docbooks with svn 2024-08-19 01:30:37 +00:00
James Graham
56d790dda9 Thread View
So at the moment this remains behind the feature flag as this only adds a threadmodel and a basic visualisation. There is much more to come to get it ready for full release.
2024-08-18 15:19:03 +00:00
James Graham
149013d2ff Fix pending events not showing when the server event turns up 2024-08-18 15:26:31 +02:00
Tobias Fella
776807580a Re-add pending event indicator
This seems to have been accidentally removed

BUG: 491277
2024-08-18 15:26:30 +02:00
Tobias Fella
75e9eee3a9 Fix pending events all showing the same text
The content models were stored in the hasmap under the same key, since they all don't have a valid event id yet.
Store them under their transaction id instead.

BUG: 491277
2024-08-18 15:26:28 +02:00
l10n daemon script
183615fa7b GIT_SILENT Sync po/docbooks with svn 2024-08-16 01:25:55 +00:00
Heiko Becker
7405fbaa16 GIT_SILENT Update Appstream for new release
(cherry picked from commit 86d85c6ce7)
2024-08-16 00:35:07 +02:00
Andreas Sturmlechner
22743b6d8b Include missing ECMQmlModule
Amends bc67033c00 and e0c3a1c143

No idea why this isn't caught by CI, but it fails for me otherwise.

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
2024-08-15 19:47:13 +00:00
l10n daemon script
b5864f02cb GIT_SILENT Sync po/docbooks with svn 2024-08-15 01:28:27 +00:00
Julius Künzel
373431fb1a Add job to publish to Microsoft Store
This still requires a manual action in the MS Partner Center, but makes the submission easier.
Note that on purpose the job will only be available on release branches, not on master
2024-08-10 10:38:18 +02:00
Julius Künzel
29167fbdf2 Enable appx build for Windows 2024-08-10 10:38:16 +02:00
Tobias Fella
699ac3a8e6 Remove undefined function declarations 2024-08-10 10:35:38 +02:00
l10n daemon script
d7b572faaf SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-08-10 01:26:10 +00:00
l10n daemon script
a09b4e7f2c GIT_SILENT made messages (after extraction) 2024-08-10 00:41:18 +00:00
l10n daemon script
a794420d3e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-08-09 01:21:45 +00:00
l10n daemon script
8b606266c5 GIT_SILENT made messages (after extraction) 2024-08-09 00:39:31 +00:00
l10n daemon script
11e4329d5e GIT_SILENT Sync po/docbooks with svn 2024-08-07 01:28:10 +00:00
James Graham
68dfc6ca81 Show notification counts on the room Avatars when collapsed.
Show notification counts on the room Avatars when collapsed.

BUG: 468520
2024-08-06 20:51:16 +00:00
l10n daemon script
e0c8945431 GIT_SILENT Sync po/docbooks with svn 2024-08-06 01:27:29 +00:00
l10n daemon script
fe60ee00fb GIT_SILENT Sync po/docbooks with svn 2024-08-04 01:27:54 +00:00
l10n daemon script
5990e00577 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-08-04 01:20:55 +00:00
l10n daemon script
358a699290 GIT_SILENT Sync po/docbooks with svn 2024-08-03 01:28:22 +00:00
l10n daemon script
da6e4378d9 GIT_SILENT Sync po/docbooks with svn 2024-08-02 01:30:14 +00:00
l10n daemon script
5edb0629b3 GIT_SILENT Sync po/docbooks with svn 2024-08-01 01:31:30 +00:00
Tobias Fella
5170854a2c Add UI for importing and exporting megolm keys 2024-07-31 23:05:54 +02:00
James Graham
37d6033df4 Manage MessageContentModels properly so we don't leak memory.
- Manage MessageContentModels properly so we don't leak memory creating new ones every time the role is refreshed.
- Parent and reply MessageContentModels to their message to make sure they get cleaned up when the parent is deleted.
- Make sure ReactionModels are cleaned up on room change to stop that list just growing.
2024-07-31 17:57:11 +00:00
l10n daemon script
ea2f891533 GIT_SILENT Sync po/docbooks with svn 2024-07-30 01:30:47 +00:00
Tobias Fella
42cec7d5ba Show time without timezone in tooltip
Constructing the timezone string is relatively heavy and is done for each delegate, even when the tooltip is never shown
2024-07-29 17:46:27 +02:00
Tobias Fella
2df2e39d43 Show time without seconds in timeline 2024-07-29 17:46:15 +02:00
l10n daemon script
b34525a4d8 GIT_SILENT Sync po/docbooks with svn 2024-07-29 01:29:11 +00:00
l10n daemon script
0a7bd64b0d GIT_SILENT Sync po/docbooks with svn 2024-07-28 01:30:28 +00:00
James Graham
11fd4f88ec Create NeochatRoomMember as a shim for RoomMember
The intention is that NeochatRoomMember can be created passed to QML and then be fully managed by it. It effectively just grabs the current RoomMember, calls the correct function then discards it so that we don't end up trying to access an already deleted state event.
2024-07-27 08:46:56 +00:00
l10n daemon script
4d9452b862 GIT_SILENT Sync po/docbooks with svn 2024-07-27 01:30:45 +00:00
Joshua Goins
060e30e612 Suggest what to do on the empty welcome screen
A simple change, adds a sentence to the "Welcome to NeoChat" message
when it first starts up and you have nothing selected.
2024-07-26 19:32:10 +00:00
Joshua Goins
ade7270add ThreePIdCard: Use Title Case and add an icon for the "Add" button 2024-07-26 19:10:30 +00:00
Joshua Goins
338428b0c0 AccountEditor: Improve strings a little
Changes things to Title Case as necessary, and shortens the QR code
option to be more succinct.
2024-07-26 19:10:30 +00:00
Joshua Goins
54574e4450 AccountEditor: Add placeholder text for "Label"
This makes it much clearer what possible purpose this field could do.
2024-07-26 19:10:30 +00:00
Joshua Goins
ae564451b8 AccountEditor: Add icons to all of these form card buttons
This helps make them stand out apart from the text they are surrounded
by.
2024-07-26 19:10:30 +00:00
Joshua Goins
9a4504ce61 Make the "Unignore this user" button work on the Ignored Users page
This function now takes a QString. This should be fine to use since it's
in the 0.8.2 release which we require.
2024-07-26 19:01:19 +00:00
Joshua Goins
80785a2ff3 Use a Kirigami.PlaceholderMessage in the ignored list
This makes it look cleaner when there's nothing there, and looks
 standard beside other KDE applications. Also removes a duplicate
"Ignored Users" form header that didn't add anything.
2024-07-26 19:01:19 +00:00
Joshua Goins
cb8ed02e82 Fix the emoji page not doing anything
This is yet more stuff broken due to referencing a implicit pageStack
that no longer exists.
2024-07-26 18:55:23 +00:00
Joshua Goins
a64c1b8eab Add a "Show QR code" to the account menu
Making this a couple of clicks away under the account menu should make
it easier to show the QR code without digging through the settings.
2024-07-26 18:44:05 +00:00
Tobias Fella
d43aa169c3 Use let kconfig register the config class 2024-07-26 19:25:55 +02:00
Tobias Fella
8ae7141851 Use cmake function instead of kcfgc 2024-07-26 19:25:00 +02:00
Joshua Goins
d3908db2c9 Fix Carl's avatar in the about data
This is supposed to be a QUrl to catch the correct overload.
2024-07-26 07:41:21 +00:00
Yuri Chornoivan
55de838a55 Fix minor typo 2024-07-26 08:36:41 +03:00
l10n daemon script
4cdfc38b87 GIT_SILENT Sync po/docbooks with svn 2024-07-26 01:26:00 +00:00
Joshua Goins
51197d7c1a Don't flag invite notifications as persistent
These really don't need to be persistent, as they even stick around
when NeoChat is closed. This also spams the user's notification system
usually, if they get lots of invitations at once which don't go away
automatically.
2024-07-25 20:11:50 +00:00
Joshua Goins
2a2a2e0c05 Hint that the user can auto-reject invitations on the invite page
This should help make the new setting more discoverable.
2024-07-25 19:58:58 +00:00
Joshua Goins
07fee30cc0 Allow blocking invites from people you don't share a room with
Matrix currently has a significant moderation loophole, thanks to
invites. Right now, anyone can invite anyone to a room - and clients
like NeoChat will gladly display these rooms to them and even give you
a notification.

However, this creates a pretty easy attack since room names and avatars
are arbitrary and this is a known vector of harassment in the Matrix
community. There's currently no tools to block this server-side, so
let's try to improve the situation where we can.

This adds a new setting to the Security page, wherein it allows you to
block invites from people you don't share a room with. This prevents the
notification from appearing and NeoChat will attempt to leave the room
immediately.

Since this depends on MSC 2666 - a currently unstable feature - the
server may not support it and NeoChat will disable the setting in this
case.
2024-07-25 19:58:58 +00:00
Joshua Goins
83c6ce0ace Don't display notifications for invite rooms
Sometimes a ghost notification will appear, this is sometimes a stray
m.room.invite notification we didn't handle or some other event. Let's
outright reject all notifications from Invite-type rooms to prevent this
from happening altogether.
2024-07-25 15:35:12 -04:00
Joshua Goins
fb7303efa0 Revert "Allow blocking invites from people you don't share a room with"
This reverts commit ef5585d312. This was
supposed to be in an MR.
2024-07-25 15:04:53 -04:00
Joshua Goins
ef5585d312 Allow blocking invites from people you don't share a room with
Matrix currently has a significant moderation loophole, thanks to
invites. Right now, anyone can invite anyone to a room - and clients
like NeoChat will gladly display these rooms to them and even give you
a notification.

However, this creates a pretty easy attack since room names and avatars
are arbitrary and this is a known vector of harassment in the Matrix
community. There's currently no tools to block this server-side, so
let's try to improve the situation where we can.

This adds a new setting to the Security page, wherein it allows you to
block invites from people you don't share a room with. This prevents the
notification from appearing and NeoChat will attempt to leave the room
immediately.

Since this depends on MSC 2666 - a currently unstable feature - the
server may not support it and NeoChat will disable the setting in this
case.
2024-07-25 15:03:22 -04:00
James Graham
11475259a1 Make sure that apostrophes are unescaped when visualising messages
Title

BUG: 488325
2024-07-23 17:27:00 +00:00
l10n daemon script
9df4cd6f13 GIT_SILENT Sync po/docbooks with svn 2024-07-23 01:27:45 +00:00
Albert Astals Cid
c9583964c8 GIT_SILENT Upgrade release service version to 24.11.70. 2024-07-21 12:54:43 +02:00
l10n daemon script
5022ed1a63 GIT_SILENT Sync po/docbooks with svn 2024-07-21 01:27:43 +00:00
James Graham
799ffa18c4 Fix the javascript when using .? 2024-07-20 22:35:41 +00:00
Tobias Fella
6323e27040 Remove customemojimodel_p.h
It's been unused for a long time
2024-07-20 22:49:22 +02:00
Tobias Fella
03acb26109 Fix some clazy warnings 2024-07-20 22:38:45 +02:00
Tobias Fella
34fc1f6a6b Fix text alignment in ReadMarkerDelegate 2024-07-20 21:54:55 +02:00
James Graham
042032ec46 Update user sort
Update the user model so it also sorts by power level and update how we initialize the model to improve performance.

The following is also changed:
- Store a single `UserListModel` in `RoomManager` and use it for everything, this means we don't create extra models (incluiding the long initialisation for each in big rooms)
- By using the single model once it has loaded the users of the new room opening and closing the draw now happens instantly (previously the model would have to be loaded every time the drawer was opened).
- To stop the initial loading and room change of Neochat slowing down (as the `UserListModel` would be loaded before the `TimelineView` is shown) the initialisation of the model is delayed until the `TimelineView` has loaded. This prioritises showing some messages in the timeline over populating the model so in large rooms the user list will initially be blank, but this keeps the initial load snappier.
2024-07-20 18:12:30 +00:00
James Graham
73de99f661 Create a list model for readmarkers
Create a list model for read markers. The primary reason is to stop `RoomMembers` being accessed after their state event is deleted. With this the read marker doesn't pass and `RoomMember` objects to qml.
2024-07-20 18:05:15 +00:00
l10n daemon script
cc068f9ebb GIT_SILENT Sync po/docbooks with svn 2024-07-19 01:26:38 +00:00
l10n daemon script
2bfc2b1944 GIT_SILENT Sync po/docbooks with svn 2024-07-18 01:23:41 +00:00
l10n daemon script
029936112f GIT_SILENT made messages (after extraction) 2024-07-18 00:39:13 +00:00
Andreas Gattringer
d5e400e8a4 stop video on destruction to avoid segfault 2024-07-17 11:08:53 +00:00
Andreas Gattringer
9dbb9c3f3b fix filedownload on maximized view and context menu
- move the logic for remembering local filenames from
  messagecontentmodel to neochatroom
- use it also when maximized and in context menu opening, to stop
  re-downloading
- make onFileTransferCompleted signal connection one-shot (stops memory
  leak)
2024-07-17 08:29:29 +00:00
l10n daemon script
a101e6b0a7 GIT_SILENT Sync po/docbooks with svn 2024-07-17 01:24:34 +00:00
Andreas Gattringer
c525ea55ce fix typo in PollComponent that causes polls to not be checked correctly 2024-07-16 21:41:25 +02:00
Andreas Gattringer
8ca45f298f show thumbail when video is stopped 2024-07-16 12:27:35 +02:00
Andreas Gattringer
cb4c6cb677 Audio filename, caption and seeking
- display caption independent of filename (consistancy to File)
- fix audio seeking not working
- change two comments and a variable name
2024-07-16 12:27:35 +02:00
Andreas Gattringer
d574a97a35 take the correct filename for synthax highlighting in code block 2024-07-16 12:27:35 +02:00
Andreas Gattringer
20f9a86ad9 stop assigning undefined to bool in TimelineView and MessageDelegate 2024-07-16 12:27:35 +02:00
Andreas Gattringer
a4a411cf1f correctly display filename in MimeComponents
(previously it would include the caption text and save with it as
filename)
Don't append filename to the caption.

Relevant spec: https://spec.matrix.org/latest/client-server-api/#mfile
2024-07-16 12:27:35 +02:00
Andreas Gattringer
029bda5734 fix code preview components
- fix them vanishing after "opening" a file (they get downloaded to
  /tmp/ without extension, which caused them to lose preview)
- make all text/plain mimetype files preview
- don't show them in Replies (in consistency with media components)
2024-07-16 12:27:35 +02:00
Andreas Gattringer
0fd578e6aa Refactor MimeComponent
- Fix size and duration not showing in MimeComponents in replies
- Display Itinerary in replies as MimeComponent (in consistency with media
  components)
2024-07-16 12:27:35 +02:00
l10n daemon script
95e1bee5e6 GIT_SILENT Sync po/docbooks with svn 2024-07-16 01:23:40 +00:00
Tobias Fella
c8dc10f311 Don't escape display name for leave events in subtitle 2024-07-15 22:04:32 +02:00
l10n daemon script
a00f4e393b GIT_SILENT Sync po/docbooks with svn 2024-07-15 01:26:14 +00:00
l10n daemon script
5a7dea8857 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-07-15 01:18:59 +00:00
Andreas Gattringer
27e8970fff fix segfault at loadError from message with attached file 2024-07-14 19:46:04 +00:00
Andreas Gattringer
7848274ba1 fix resetting of message content components
and don't reset whole Moessage content when author changes
2024-07-14 18:25:02 +02:00
l10n daemon script
145bf0298b GIT_SILENT Sync po/docbooks with svn 2024-07-14 01:23:33 +00:00
James Graham
0392a33b54 Content Model Author
Make sure that the Author in the content model is only ever updated int he following circumstacnes:
- The member updates their displayname or avatar
- A previously hidden author line is shown

This is done by only doing a full reset on initialisation or when a previously hidden author is shown. The rest of the time we only reset the other content in the message, i.e. everything below the author line.
2024-07-13 16:01:42 +00:00
Andreas Gattringer
b211f46e3e Do heavy things less often on room change event 2024-07-13 15:22:52 +00:00
James Graham
709711c3ca Fix the InlineMessages for the room upgrades in RoomSettings
Fix the InlineMessages for the room upgrades in RoomSettings, they should show even if we aren't currently in the room. Resolve resource can join the predecessor/sucessor if required.

Closes network/neochat#618
2024-07-13 15:14:50 +00:00
l10n daemon script
841607406f GIT_SILENT Sync po/docbooks with svn 2024-07-13 01:25:56 +00:00
Andreas Gattringer
70b726b04d reset currentRoom before opening last room of connection 2024-07-12 07:41:25 +00:00
l10n daemon script
2799248106 GIT_SILENT Sync po/docbooks with svn 2024-07-12 01:24:11 +00:00
Carl Schwan
2321299084 Pass ApplicationWindow to AccountMenu 2024-07-11 20:55:04 +00:00
Andreas Gattringer
aa00773a3b update only position of HoverActions when contentY of TimelineView
changes
2024-07-11 14:06:58 +02:00
l10n daemon script
733de1d0e1 GIT_SILENT Sync po/docbooks with svn 2024-07-11 01:24:16 +00:00
Tobias Fella
c16e4ad412 Fix opening pages from account menu 2024-07-10 21:39:15 +02:00
l10n daemon script
d1cf7a07f1 GIT_SILENT Sync po/docbooks with svn 2024-07-10 01:25:42 +00:00
James Graham
8751f6fea7 Never refresh the author role except when a member updated signal is generated. This should remove a potential source of crashes where a RoomMember object tries to access an already deleted room member state event 2024-07-09 20:21:13 +01:00
Andreas Gattringer
ea1b577ec7 fix room settings not opening from RoomDrawerPage, by launching it according to RoomDrawer 2024-07-09 10:49:18 +02:00
l10n daemon script
a41afa70eb GIT_SILENT Sync po/docbooks with svn 2024-07-08 01:23:33 +00:00
Tobias Fella
e11c97cdc0 Move NeoChatRoom::showMessage to Controller
It doesn't fit into NeoChatRoom conceptually
2024-07-07 13:44:55 +02:00
l10n daemon script
d76e44512e GIT_SILENT Sync po/docbooks with svn 2024-07-07 01:24:08 +00:00
l10n daemon script
fd1931377d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-07-07 01:17:56 +00:00
James Graham
68ce6c4ed7 It seems like it's possible for contentModel.Author to be accessed before the contentModel is set so make sure this fails nicely 2024-07-06 20:05:16 +00:00
Carl Schwan
a2ee330307 Use new SearchDialog from Kirigami 2024-07-06 18:16:43 +00:00
Tobias Fella
c3a17f951e Only enable taphandler for mouse clicks
BUG: 486545
2024-07-06 20:11:21 +02:00
Nicolas Fella
443c0f34d7 Rework Add Server dialog
Use plain items instead of FormCard delegate items, this isn't a FormCard

Set placeholder text for textfield

Remove redundant subtitle

Use inlinemessage for errors

Before:

![image.png](/uploads/375d3c668271f6bce699cc9462f6deb9/image.png){width=405 height=247}

After:

![image.png](/uploads/b8d79a4fdb0914d1f82ecec0760ad80f/image.png){width=404 height=234}
2024-07-06 18:10:34 +00:00
Tobias Fella
8725600368 Port away from deprecated QDateTime constructor 2024-07-06 20:00:04 +02:00
Tobias Fella
3b83b7f190 Set Qt policy 4 2024-07-06 20:00:04 +02:00
Tobias Fella
e0c3a1c143 Port to ecm_add_qml_module 2024-07-06 19:50:20 +02:00
Tobias Fella
bec1ad7bee Fix crashes when logging out of connection 2024-07-06 19:44:00 +02:00
Tobias Fella
9e6c00f78c Fix logout from account menu 2024-07-06 19:28:54 +02:00
Tobias Fella
abbbd9d705 Use RoomMember object for code component 2024-07-06 16:27:08 +02:00
Tobias Fella
4a5c012f05 Fix avatar in chatbar 2024-07-06 16:22:03 +02:00
Tobias Fella
319862b3d4 Fix avatars in full window image view 2024-07-06 16:20:16 +02:00
Tobias Fella
1fcf58024d Fix avatars in CodeMaximizeComponent 2024-07-06 16:18:49 +02:00
Tobias Fella
9db162d0fc Fix avatar in state delegates 2024-07-06 16:16:44 +02:00
Tobias Fella
13b15390c3 Fix crashes due to event being deleted 2024-07-06 15:54:29 +02:00
l10n daemon script
799b62e9d2 GIT_SILENT Sync po/docbooks with svn 2024-07-06 01:25:14 +00:00
Tobias Fella
d91ed535ad Don't access event after it was deleted
- NeoChat stores pointer to event
- Event is replaced
- libQuotient deletes the event and notifies us that the event changes
- We're accessing the event to check its id
- Boom

Make this not boom by accessing the ID that we're additionally storing anyway.
2024-07-05 16:54:38 +02:00
l10n daemon script
c48b9874bf GIT_SILENT Sync po/docbooks with svn 2024-07-04 01:22:48 +00:00
l10n daemon script
6a788f6c32 GIT_SILENT Sync po/docbooks with svn 2024-07-03 01:26:09 +00:00
Tobias Fella
53519a604e Don't store member objects in userlistmodel 2024-07-02 18:17:27 +02:00
l10n daemon script
2818b87f02 GIT_SILENT Sync po/docbooks with svn 2024-07-02 01:24:50 +00:00
l10n daemon script
50e10133b9 GIT_SILENT Sync po/docbooks with svn 2024-07-01 01:23:04 +00:00
James Graham
068161719e Update author documentation now we've moved to RoomMember 2024-06-30 17:59:40 +01:00
James Graham
c8d5d095e0 REmove unneeded includes 2024-06-30 17:59:40 +01:00
James Graham
52d07320ef Make the author line in the bubble and reply be part of the content model 2024-06-30 17:59:40 +01:00
Tobias Fella
158b9ea2ca Fix opening QR code 2024-06-30 18:06:57 +02:00
James Graham
6a100bfbab When switching rooms first set the room to nullptr to clear any objects in MessageEventModel and UserListModel 2024-06-30 14:24:21 +00:00
Tobias Fella
b3bd6ee176 Fix showing avatar image in HiddenDelegate 2024-06-30 15:53:02 +02:00
Tobias Fella
04696b27eb Use type for member property 2024-06-30 15:53:02 +02:00
Tobias Fella
332937dbc1 Register RoomMember as foreign type 2024-06-30 15:52:45 +02:00
l10n daemon script
92d932ce5c GIT_SILENT Sync po/docbooks with svn 2024-06-30 01:25:04 +00:00
Carl Schwan
af3c4f536a Fix dev tools 2024-06-29 18:03:43 +02:00
Carl Schwan
b98ca5af52 Use SpellcheckingConfigurationModule 2024-06-29 18:03:43 +02:00
Carl Schwan
a15a11f44b Rework config dialog
Use new KirigamiAddons ConfigurationsView as a replacement for
CategorizedSettings. Fix some issues on desktop when running Qt 6.8
and some less recent issues on mobile.

Visually this looks the same.
2024-06-29 18:03:40 +02:00
Tobias Fella
1460132772 Fix typing indicator 2024-06-29 17:30:29 +02:00
Tobias Fella
76d68bb3e4 Fix tests 2024-06-29 17:30:29 +02:00
Tobias Fella
08df0ebbea user details dialog fixes 2024-06-29 17:30:29 +02:00
Tobias Fella
e918db2cc1 Port away from function that we can't use yet 2024-06-29 17:30:29 +02:00
James Graham
2e0dc8db94 Make sure that the member objects get updated for the MessageEventModel and MessageContentModel when the user updates their avatar or name 2024-06-29 17:30:29 +02:00
James Graham
b78a9f2a9c Find users by Id in UserListModel as there may be users with the same display name which will end up with the wrong member replaced 2024-06-29 17:30:28 +02:00
James Graham
832e6b9de0 Make sure that the member object gets switched when a member's avatar or name is updated because the old state event will now be deleted and we need to ref the new one. 2024-06-29 17:30:28 +02:00
James Graham
feec7ca408 Don't store RoomMembers in ReactionModel
Don't store RoomMember objects in the reaction model just grab them everytime incase the state event is replaced.
2024-06-29 17:30:28 +02:00
James Graham
408f0a12e2 Use new libquotient functionality to encrypt direct chats by default
Needs https://github.com/quotient-im/libQuotient/pull/730
2024-06-29 17:30:28 +02:00
James Graham
35ab4e6e09 Use updated membersTyping functions from libquotient 2024-06-29 17:30:28 +02:00
James Graham
430bafafe7 Make use of new RoomMember item from libquotient
Depends on https://github.com/quotient-im/libQuotient/pull/695

Currently basic just to show a working implementation using RoomMember. Currently only the room event and search models are moved over. Will change everything else over once the dependent pr is complete.
2024-06-29 17:30:28 +02:00
James Graham
58d727350d Remove uses of Quotient:Omittable
Note this technically won't build for now because of the lack of RoomMember support but I'll push that at the quotient-next branch next. 

This is needed as well to get a branch that builds on dev.
2024-06-29 17:30:04 +02:00
l10n daemon script
c6a4057659 GIT_SILENT Sync po/docbooks with svn 2024-06-29 01:24:06 +00:00
Heiko Becker
60ac806690 GIT_SILENT Update Appstream for new release
(cherry picked from commit c00debf1c3)
2024-06-28 23:18:10 +02:00
James Graham
e9263fc596 Use the new libquotient version of the serveracl event
Use with https://github.com/quotient-im/libQuotient/pull/729
2024-06-28 15:02:56 +02:00
Tobias Fella
3dd28a0382 Unconditionally use SSSS 2024-06-28 14:33:23 +02:00
l10n daemon script
066cb8184e GIT_SILENT Sync po/docbooks with svn 2024-06-28 01:33:31 +00:00
l10n daemon script
373e22b999 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-06-28 01:20:45 +00:00
Tobias Fella
fd8725f649 Add basic cross-signing support
(cherry picked from commit e1795076c8c41a34b91c31df35d1e344d0b14887)
2024-06-27 18:51:38 +02:00
Tobias Fella
3d433762b1 Fix ifs for ssss 2024-06-27 18:23:29 +02:00
Tobias Fella
ea4cb5bf62 Disable FreeBSD CI 2024-06-27 18:08:47 +02:00
Tobias Fella
a6ca3b8203 Require libQuotient 0.8.2 2024-06-27 18:08:28 +02:00
l10n daemon script
bc4ceb6d52 GIT_SILENT Sync po/docbooks with svn 2024-06-27 01:26:42 +00:00
l10n daemon script
24480229cd GIT_SILENT Sync po/docbooks with svn 2024-06-26 01:25:49 +00:00
l10n daemon script
8b10573197 GIT_SILENT Sync po/docbooks with svn 2024-06-25 01:23:09 +00:00
l10n daemon script
cbc81e8285 GIT_SILENT Sync po/docbooks with svn 2024-06-24 01:22:01 +00:00
Tobias Fella
0b9a978061 Update global menu 2024-06-23 21:09:33 +02:00
l10n daemon script
e974e5d13b GIT_SILENT Sync po/docbooks with svn 2024-06-23 01:25:25 +00:00
l10n daemon script
5a42e86bf6 GIT_SILENT Sync po/docbooks with svn 2024-06-22 01:29:39 +00:00
l10n daemon script
889946e186 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-06-22 01:19:19 +00:00
l10n daemon script
5c47e8044e GIT_SILENT made messages (after extraction) 2024-06-22 00:39:08 +00:00
l10n daemon script
1a974ac305 GIT_SILENT Sync po/docbooks with svn 2024-06-21 01:23:47 +00:00
Tobias Fella
db1bf61805 GlobalMenu: remove shortcut for QuickSwitcher
The shortcut needs to work when there is no Global Menu, so it's also in QuickSwitcher.qml.
It can't be in both places, since that breaks it. So we remove it here.

BUG: 488212
2024-06-20 18:14:36 +02:00
Tobias Fella
5456b4a7ff Fix global menu 2024-06-20 18:03:42 +02:00
l10n daemon script
a08ffaae77 GIT_SILENT Sync po/docbooks with svn 2024-06-20 01:27:52 +00:00
l10n daemon script
18445f55f0 GIT_SILENT Sync po/docbooks with svn 2024-06-19 01:24:36 +00:00
Albert Astals Cid
2daf3b5c4b CI: Disable requiring Windows tests passing
Has been broken for 4 consecutive weeks
2024-06-18 22:42:00 +02:00
l10n daemon script
923b844212 GIT_SILENT Sync po/docbooks with svn 2024-06-18 01:29:17 +00:00
James Lyne
0aec9f8472 Fix search results on room search page
Add missing IsEditable role to search model
2024-06-17 20:15:36 +00:00
l10n daemon script
23b0c8a143 GIT_SILENT Sync po/docbooks with svn 2024-06-17 01:25:34 +00:00
l10n daemon script
3c2c2e2bd8 GIT_SILENT Sync po/docbooks with svn 2024-06-16 01:24:54 +00:00
l10n daemon script
c1465a7368 GIT_SILENT Sync po/docbooks with svn 2024-06-14 01:22:57 +00:00
l10n daemon script
be1dadab74 GIT_SILENT Sync po/docbooks with svn 2024-06-13 01:23:33 +00:00
Derry Tutt
1cba39eae9 Update strings to be more clear for the average user 2024-06-12 19:37:39 +00:00
Tobias Fella
a0c8bdf021 Make notifications more useful
- Refactor and cleanup code
- Don't paginate through notifications - it spams the server with requests and realistically only contains anything relevant on startup after a long time, in which case you're going to lose some notification anyway
- Only show newest notification for the respective room, closing the old notification if one exists
- Only show text of this notification

BUG: 475228
2024-06-12 21:28:09 +02:00
l10n daemon script
6fdb22a5b5 GIT_SILENT Sync po/docbooks with svn 2024-06-12 01:26:41 +00:00
l10n daemon script
19c370a273 GIT_SILENT made messages (after extraction) 2024-06-12 00:38:48 +00:00
Tobias Fella
861336ea97 Remove unnecessary check 2024-06-11 21:48:56 +02:00
l10n daemon script
24219bcb03 GIT_SILENT Sync po/docbooks with svn 2024-06-11 01:29:06 +00:00
Tobias Fella
77ed762e2c Use plaintext for room aliases 2024-06-10 22:20:37 +02:00
l10n daemon script
d45b6cb03d GIT_SILENT Sync po/docbooks with svn 2024-06-10 01:35:39 +00:00
Heiko Becker
9a921b2e0d GIT_SILENT Update Appstream for new release
(cherry picked from commit c5c47d7b67)
2024-06-10 00:48:21 +02:00
l10n daemon script
c17e213e11 GIT_SILENT Sync po/docbooks with svn 2024-06-09 01:23:44 +00:00
Joshua Goins
6275d7afaa Switch from QQC2.ApplicationWindow.overlay to QQC2.Overlay.overlay
Closes #648
2024-06-08 11:47:30 -04:00
Joshua Goins
364eda6400 Fix keyboard navigation on search pages
Some of our search pages (such as the room and user search) has a list
header item. Due to how this works, it's not actually a part of the
list view keyboard navigation and a whole separate item. So in the tab
order, it comes *after* the list view which makes no sense. And it's
part of the list view, so users must expect it to be selectable with the
up and down arrows like other items.

This simple change makes it so it behaves as expected. The first actual
list item is selected by default, but it's possible to navigate to the
list header item via the up arrow key and then return to the list view
using the down arrow. The list header item is also removed from the tab
order and the whole page is much nicer to use now.
2024-06-08 15:44:38 +00:00
Joshua Goins
ccf34cfe20 The "Search Room" action should be called "Search Rooms" 2024-06-08 15:42:10 +00:00
Joshua Goins
7daae6a2d9 Fix the tooltips for the two drawer buttons at the top
One of them didn't even have a tooltip, which is a simple oversight
since it already has accessible text. The tooltips now use the attached
property instead of creating a new QQC2.ToolTip too.
2024-06-08 15:42:10 +00:00
Joshua Goins
277a4ad124 Fix keyboard navigation in space drawer
Some of the items were able to activated via the keyboard, but many were
not like the notifications and "create a space" buttons. This is because
the signals were hooked up to onClicked but the accessible and keyboard
nav were hooked up to onSelected. All of the buttons trigger their
actions with onSelected now.
2024-06-08 15:32:37 +00:00
Joshua Goins
b11d46e34a Add keyboard navigation for server selection in room search dialog
This was previously not keyboard navigable at all, making it
impossible to switch servers in this dialog solely with a keyboard. This
patch makes it possible to do some basic selection but not deletion yet,
but it's a good start.
2024-06-08 15:32:26 +00:00
Joshua Goins
e8ad0a055d Remove room member highlight on click
Previously it was possible to keep clicking and highlighting each member
which doesn't make any sense. We could make this exclusive by having it
highlight only when index == currentIndex, but honestly it doesn't need
to be highlighted at all. Clicking on a room member opens their user
card, there's no persistent state the user needs to keep track of here.
2024-06-08 11:25:49 -04:00
Joshua Goins
8a8c745d77 Use Qt.alpha in ThemeRadioButton
This was newly added in Qt6 and simplifies a Qt.rgba call we used here.
2024-06-08 14:35:09 +00:00
Joshua Goins
a523fe7674 Add focus border for the theme radio button, used on the Appearance page
Otherwise it's impossible to tell which option you're on, if you're
solely using a keyboard.
2024-06-08 14:35:09 +00:00
Joshua Goins
dc9a150929 Fix QR code not showing when tapping the button under account settings 2024-06-08 14:34:58 +00:00
Joshua Goins
be66ffef0f Fix map copyright link activation
The argument was missing, so it wasn't possible to actually click and
visit the copyright notices linked on maps.
2024-06-08 14:34:48 +00:00
Joshua Goins
f278cc0c86 Don't show the map if there's no locations available
It's hard to the read the text when there's a beige map behind it, and
unnecessary anyway.
2024-06-08 14:34:48 +00:00
Nicolas Fella
7f72808a9a Fixup AttachDialog
Use standard spacing values

Use implicit button size
2024-06-08 14:34:40 +00:00
Joshua Goins
1d5297c0f0 Rename the header for room actions "Actions" instead of "Options"
These aren't really configurable options in the usual sense, but rather
actions you can take in the room.
2024-06-08 14:34:21 +00:00
Joshua Goins
e40528ba45 Use a more natural sounding action name for favoriting the room
"Make room favorite" doesn't sound very natural in English, but
"Favorite this room" is and fits in with the rest of the actions here.
2024-06-08 14:34:21 +00:00
Tobias Fella
29972b5867 Port away from commitSingleShot 2024-06-08 15:43:16 +02:00
James Graham
91109ca845 Get 3PID binds on startup
Get binds on startup and update the staus properly after bind/unbinding 3PIDs
2024-06-08 08:42:34 +00:00
l10n daemon script
8e5ccb5461 GIT_SILENT Sync po/docbooks with svn 2024-06-08 01:27:06 +00:00
l10n daemon script
8a75967953 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-06-08 01:19:18 +00:00
l10n daemon script
3f4965b182 GIT_SILENT made messages (after extraction) 2024-06-08 00:39:04 +00:00
l10n daemon script
2ac266029c GIT_SILENT Sync po/docbooks with svn 2024-06-07 01:22:56 +00:00
l10n daemon script
3261231d07 GIT_SILENT made messages (after extraction) 2024-06-07 00:38:46 +00:00
l10n daemon script
95ce6385b0 GIT_SILENT Sync po/docbooks with svn 2024-06-05 01:36:19 +00:00
Volker Krause
64c5894602 Fix notifyrc file location 2024-06-04 15:01:54 +00:00
l10n daemon script
8c4839c300 GIT_SILENT Sync po/docbooks with svn 2024-06-04 01:22:51 +00:00
l10n daemon script
80c2bc1a52 GIT_SILENT Sync po/docbooks with svn 2024-06-03 01:23:01 +00:00
l10n daemon script
bcd417e039 GIT_SILENT Sync po/docbooks with svn 2024-06-02 01:24:06 +00:00
l10n daemon script
ac216f697f GIT_SILENT Sync po/docbooks with svn 2024-06-01 01:24:07 +00:00
l10n daemon script
9893fae27c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-06-01 01:18:01 +00:00
l10n daemon script
cb183efa66 GIT_SILENT made messages (after extraction) 2024-06-01 00:39:03 +00:00
Carl Schwan
87d707bc21 CreateRoomDialog: Add missing formcard separators 2024-05-31 10:38:47 +00:00
James Graham
227ebd610a Support binding 3PIDs
Closes network/neochat#565
2024-05-31 09:25:42 +00:00
James Graham
ab4af48e52 Integrate NeoChatMaximizeComponent with MediaManger
Needs libraries/kirigami-addons!227

Closes network/neochat#641
2024-05-31 09:01:13 +00:00
l10n daemon script
78a8227219 GIT_SILENT Sync po/docbooks with svn 2024-05-31 01:31:41 +00:00
l10n daemon script
ec73a53101 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-05-31 01:19:16 +00:00
l10n daemon script
3fb1d086b7 GIT_SILENT Sync po/docbooks with svn 2024-05-30 01:24:46 +00:00
l10n daemon script
5d4a12c127 GIT_SILENT Sync po/docbooks with svn 2024-05-29 01:36:10 +00:00
Carl Schwan
d2a79214b5 Fix crash when sending message
Ensure the message has an eventId which only happens after the message
is sent.
2024-05-28 15:21:04 +02:00
Laurent Montel
db57111188 Use 6.7 image 2024-05-28 06:49:38 +02:00
l10n daemon script
b22276bcd5 GIT_SILENT Sync po/docbooks with svn 2024-05-28 01:22:05 +00:00
Tobias Fella
6e2d85f2d2 Add some Q_UNUSEDs 2024-05-27 20:06:28 +02:00
James Graham
efb72652ce Use MessageContentModel for replies
This allows code and other components to be displayed nicely.
2024-05-27 14:54:42 +00:00
l10n daemon script
3615c3e8e5 GIT_SILENT Sync po/docbooks with svn 2024-05-27 01:25:06 +00:00
Nicolas Fella
8186ee0e3f Add missing dependencies to QML modules 2024-05-26 16:15:57 +02:00
Nicolas Fella
74aa14c011 Make org.kde.neochat import all submodules
This way we don't need to explicitly import the various submodules and instead only import org.kde.neochat
2024-05-26 16:15:43 +02:00
l10n daemon script
aa68369f95 GIT_SILENT Sync po/docbooks with svn 2024-05-26 01:22:22 +00:00
Laurent Montel
7837364b86 Add missing include moc 2024-05-25 18:38:20 +00:00
James Graham
31f0e39617 Convert TimelineDelegate to cpp
There are 2 main reason for doing this:
1. Because I can, I wanted to see if I could do it
2. It gets rid of the janky qml re parenting stuff so should be faster.
2024-05-25 17:06:13 +00:00
James Graham
a48151920d Permission model
Add a model for managing permissions (power levels) in rooms. This gets rid of a whole bunch of boiler plate in NeoChat and as a bonus makes it easy to add a feature to allow setting the permission level for any event.
2024-05-25 16:25:39 +00:00
Tobias Fella
8199653ddd Use simpler and less restrictive server url regex
The old regex was too restrictive. The new one will allow invalid urls, but we don't gain anything from preventing that

BUG: 486888
2024-05-25 15:00:12 +02:00
Tobias Fella
9d650519c7 Don't suggest joining the last opened room when neochat is started after the cache was cleared 2024-05-25 14:45:45 +02:00
l10n daemon script
a545eaca97 GIT_SILENT Sync po/docbooks with svn 2024-05-25 01:25:23 +00:00
James Graham
9da9de2d2d Make sure to ask before leaving a room
Make sure to ask before leaving a room

BUG: 486546
2024-05-24 08:12:26 +00:00
James Graham
c9ddd9d513 Improve the behaviour of jump to last unread message.
Improve the behaviour of jump to last unread message. The view will now jump as high as possible if the last unread message isn't loaded. This at least triggers more items to load which will eventually get the user to the last unread message.
2024-05-24 07:55:05 +00:00
Carl Schwan
415cfd57e7 Use standard Dialog background for emoji dialog 2024-05-22 10:00:51 +00:00
l10n daemon script
b1ede93cdb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-05-22 01:19:14 +00:00
l10n daemon script
32df465c8a GIT_SILENT made messages (after extraction) 2024-05-22 00:39:06 +00:00
l10n daemon script
2f1c5df11d GIT_SILENT Sync po/docbooks with svn 2024-05-21 01:29:24 +00:00
l10n daemon script
f85f6a7fdc GIT_SILENT Sync po/docbooks with svn 2024-05-20 01:24:20 +00:00
l10n daemon script
93cc80a4b3 GIT_SILENT Sync po/docbooks with svn 2024-05-19 01:24:46 +00:00
Heiko Becker
0f3e401d42 GIT_SILENT Update Appstream for new release
(cherry picked from commit c66c035dbb)
2024-05-17 00:50:28 +02:00
l10n daemon script
a9f2c33053 GIT_SILENT Sync po/docbooks with svn 2024-05-16 01:36:22 +00:00
l10n daemon script
c5ef8c3fec SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-05-16 01:17:33 +00:00
l10n daemon script
ad696bd60b GIT_SILENT Sync po/docbooks with svn 2024-05-15 01:23:49 +00:00
Tobias Fella
9da7462f3e Fix compatibility with newer quotient job api 2024-05-14 16:50:38 +02:00
l10n daemon script
0ecdf354c6 GIT_SILENT Sync po/docbooks with svn 2024-05-14 01:25:59 +00:00
l10n daemon script
67f10632fb GIT_SILENT Sync po/docbooks with svn 2024-05-13 01:27:15 +00:00
l10n daemon script
044b910357 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-05-13 01:17:24 +00:00
James Graham
3de943e50f Set Identity server
Part of network/neochat#565
2024-05-12 18:22:27 +00:00
James Graham
1a2272249d Support adding 3 PIDs
Implements part of network/neochat#565

Note the phone number stuff is untested as neither kde.org or matrix.org have them switched on.
2024-05-12 17:02:09 +00:00
James Graham
0dfeec6cae Make sure that the link preview sizes correctly so that there is no bubble overflow 2024-05-12 13:13:11 +00:00
l10n daemon script
8d193021ab GIT_SILENT Sync po/docbooks with svn 2024-05-12 01:30:54 +00:00
Carl Schwan
f45226a680 Port all confirm dialogs to Kirigami.PromptDialog 2024-05-10 12:54:13 +00:00
l10n daemon script
40d55805ff GIT_SILENT Sync po/docbooks with svn 2024-05-10 01:24:43 +00:00
l10n daemon script
7d6d0b012b GIT_SILENT Sync po/docbooks with svn 2024-05-09 01:29:36 +00:00
l10n daemon script
d7d2c6bf01 GIT_SILENT made messages (after extraction) 2024-05-09 00:39:06 +00:00
Akseli Lahtinen
ce1c6096d3 Check for tagToken length
Sometimes this part of the code causes segfault for me.

I don't know what the root cause is though, it's *very* random. I guess the tagToken should always be long enough, but sometimes it's just one character.
2024-05-08 19:41:39 +00:00
l10n daemon script
8c4ea6180a GIT_SILENT Sync po/docbooks with svn 2024-05-08 01:30:36 +00:00
l10n daemon script
95649ba758 GIT_SILENT Sync po/docbooks with svn 2024-05-07 01:25:20 +00:00
l10n daemon script
2b61f2a9e8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-05-07 01:16:57 +00:00
Tobias Fella
47242aa66c Remove remaining uses of MatrixImageProvider and remove it 2024-05-06 18:18:48 +02:00
Tobias Fella
31a8abe615 Don't use applicationWindow() for loading key verification sessions 2024-05-06 15:54:50 +02:00
Tobias Fella
4dae3c34b4 Move HoverLinkIndicator to separate file 2024-05-06 15:54:49 +02:00
Tobias Fella
65aa8919b9 Port ConfirmUrlDialog away from applicationWindow() 2024-05-06 15:54:49 +02:00
Tobias Fella
acf8eac0d4 Cleanup JoinRoomDialog 2024-05-06 15:54:49 +02:00
Tobias Fella
e8aa29d3c2 Move direct chat confirmation dialog to separate file 2024-05-06 15:54:49 +02:00
Tobias Fella
a36194afe2 Remove unused component 2024-05-06 15:54:49 +02:00
Tobias Fella
8554898e45 Move consent sheet to separate file 2024-05-06 15:54:46 +02:00
l10n daemon script
55b29f645b GIT_SILENT Sync po/docbooks with svn 2024-05-06 01:25:56 +00:00
l10n daemon script
52cc91ba3e GIT_SILENT made messages (after extraction) 2024-05-06 00:38:19 +00:00
Tobias Fella
c9e3a9f8fe Add back include 2024-05-05 21:56:00 +02:00
Tobias Fella
c3de788956 Cleanup includes 2024-05-05 21:49:43 +02:00
Tobias Fella
53e3c36f7e Explicitely include QFont 2024-05-05 21:33:47 +02:00
Tobias Fella
20908107a0 Remove unused includes 2024-05-05 21:21:43 +02:00
l10n daemon script
cbe1a0d6f8 GIT_SILENT Sync po/docbooks with svn 2024-05-05 01:26:11 +00:00
Tobias Fella
7d8c79ec57 Remove unused include 2024-05-04 11:27:30 +02:00
Tobias Fella
9bb89c728f Move KUnifiedPush include to source file 2024-05-04 11:22:00 +02:00
Tobias Fella
be2e28cc53 Cleanup API 2024-05-04 11:17:45 +02:00
Tobias Fella
57be57971d Remove unused include 2024-05-04 11:17:08 +02:00
Tobias Fella
64eed47f04 Port some things away from Omittable 2024-05-04 10:56:12 +02:00
l10n daemon script
7659105fda GIT_SILENT Sync po/docbooks with svn 2024-05-04 01:33:07 +00:00
Carl Schwan
18c9376992 Fix micro spacing inconsistency in SpaceHierarchyDelegate
Exposing index allows RoundedItemDelegate to use a consistent padding
for the first and last item in the listview.
2024-05-04 00:36:34 +02:00
Tobias Fella
3a4aca7fbd Fix module 2024-05-03 22:40:32 +02:00
Tobias Fella
85ff8cdd4a Fix spacing of HiddenDelegate 2024-05-03 14:57:18 +02:00
l10n daemon script
b1048cb84a GIT_SILENT Sync po/docbooks with svn 2024-05-03 01:24:47 +00:00
l10n daemon script
ff9cf9abf6 GIT_SILENT Sync po/docbooks with svn 2024-05-02 01:23:33 +00:00
l10n daemon script
157c84663d GIT_SILENT Sync po/docbooks with svn 2024-05-01 01:23:12 +00:00
Tobias Fella
908e4fb5a4 Add test for room creation 2024-04-30 23:37:33 +02:00
Tobias Fella
fdca7d58e5 Push ImageEditorPage using pushDialogLayer
BUG: 486315
2024-04-30 23:36:17 +02:00
Tobias Fella
2eb26d512b Fix opening room on mobile 2024-04-30 22:05:22 +02:00
Tobias Fella
b7fdf7d60f Port away from qstr 2024-04-30 21:39:13 +02:00
Tobias Fella
2a1e66468d Fix if X11 on apple 2024-04-30 21:28:38 +02:00
Tobias Fella
cd7faf751e Show captions 2024-04-30 20:28:53 +02:00
Bart De Vries
d79d806cda Add "No Proxy" option to proxy settings 2024-04-30 20:19:22 +02:00
Bart De Vries
cae389c04c Make neochat obey the system-wide proxy settings 2024-04-30 20:19:22 +02:00
Tobias Fella
4e6850a60c Adapt to behavior change in libQuotient 2024-04-30 17:37:22 +02:00
l10n daemon script
a71f8cf358 GIT_SILENT Sync po/docbooks with svn 2024-04-30 01:24:36 +00:00
Carl Schwan
fe6ff9b2b6 Cleanup quick switcher
- Make it modal
- Fix spacing
- Use bottom separator instead of frame for search field
2024-04-29 16:54:25 +00:00
l10n daemon script
5a0f3e474d GIT_SILENT Sync po/docbooks with svn 2024-04-29 01:25:09 +00:00
Nate Graham
cd9c4239b1 Revert "Preserve mx-reply in the edited message if it exists"
This reverts commit fa57db8e83, because it
caused the last message you replied to to be shown as a reply in every
subsequent message you send, but they're only visible to people using
clients that aren't NeoChat, so you don't immediately realize that
you're causing pandemonium in your chatrooms.
2024-04-28 08:05:52 -06:00
James Graham
0cf1d87b12 Fix the master show link preview setting and add back the per room setting
Title

BUG: 486126
2024-04-28 10:51:44 +00:00
l10n daemon script
99d91c1e07 GIT_SILENT Sync po/docbooks with svn 2024-04-28 01:21:04 +00:00
l10n daemon script
457f80bc9b GIT_SILENT Sync po/docbooks with svn 2024-04-27 01:20:24 +00:00
Tobias Fella
968e3fc23b Cleanup Main.qml 2024-04-26 22:59:06 +02:00
Tobias Fella
b1e338579d Port UserConsentSheet to Kirigami.Dialog 2024-04-26 22:51:48 +02:00
Tobias Fella
7e4361bb5e Fix AddServerSheet 2024-04-26 19:11:03 +02:00
l10n daemon script
dd35fa3d91 GIT_SILENT Sync po/docbooks with svn 2024-04-26 01:20:19 +00:00
Tobias Fella
affb911d97 Create QML module for chatbar 2024-04-25 23:02:59 +02:00
Tobias Fella
785f9cd1b6 Fix some warnings 2024-04-25 22:57:24 +02:00
Tobias Fella
419056f098 Fix QML warnings 2024-04-25 22:56:28 +02:00
Tobias Fella
396db18de2 Fix unqualified access 2024-04-25 22:53:16 +02:00
Tobias Fella
f124721cd9 Fix qmlls warning 2024-04-25 22:52:38 +02:00
Tobias Fella
52e49b49fb Remove unnecessary parent 2024-04-25 22:51:59 +02:00
Tobias Fella
10e03777e9 Fix qmlls warning 2024-04-25 22:48:55 +02:00
Tobias Fella
27538b72e9 Remove unused imports 2024-04-25 22:48:20 +02:00
Tobias Fella
19ace37a75 Fix HoverLinkIndicator warnings 2024-04-25 22:47:55 +02:00
Tobias Fella
90c5377ef0 Port direct chat confirmation dialog away from OverlaySheet 2024-04-25 22:47:17 +02:00
Tobias Fella
f0e3d3e474 Fix some dialog parenting 2024-04-25 22:46:03 +02:00
Tobias Fella
26064ebf8c Remove stray log statement 2024-04-25 22:34:40 +02:00
Tobias Fella
1d92b74131 Use escaped room name in ConfirmLeaveDialog 2024-04-25 22:30:53 +02:00
l10n daemon script
5f83c137d2 GIT_SILENT Sync po/docbooks with svn 2024-04-25 01:21:47 +00:00
Joshua Goins
fa57db8e83 Preserve mx-reply in the edited message if it exists 2024-04-24 19:03:28 +00:00
Joshua Goins
9d3c2e19f5 Strip replies when calling EventHandler::getMarkdownBody()
This matches previous behavior before
e2eb6ab33c and including the markdown
blockquote breaks edits. This also adds a test to ensure it does indeed
get stripped.
2024-04-24 19:03:28 +00:00
l10n daemon script
46a9600d55 GIT_SILENT Sync po/docbooks with svn 2024-04-24 01:29:43 +00:00
James Graham
de40701cf6 Multiple Link Previews
- Show a preview for each link in the text below the block in which it appears.
- Allow link previews to be dismissed
2024-04-23 19:45:33 +00:00
Tobias Fella
307536c6b6 Use escaped title in devtools 2024-04-23 13:27:15 +02:00
Tobias Fella
203be8bd35 Work around QML opening dialog in wrong window 2024-04-23 13:24:00 +02:00
Tobias Fella
1e644587b3 Replace Quotient::Connection with NeoChatConnection where possible 2024-04-23 12:35:15 +02:00
James Graham
66a60f09e3 Refactor the MessageComponentModel component update 2024-04-23 11:39:18 +02:00
Tobias Fella
69b6f16ec1 Remove search bar; Use QuickSwitcher instead 2024-04-23 10:19:43 +02:00
l10n daemon script
10b4274a3d GIT_SILENT Sync po/docbooks with svn 2024-04-23 01:29:16 +00:00
James Graham
28c9d94457 Fix Roomlist Shortcuts
Fix the ctrl + pgup/pgdwn shortcuts for the room list so that they work with tree model

BUG: 485949
2024-04-22 22:01:46 +00:00
Tobias Fella
d74fd1a560 Force author display name in HiddenDelegate to PlainText 2024-04-22 23:14:31 +02:00
James Graham
624b1b06c5 Make the SpaceDrawer navigable with the keyboard. 2024-04-22 18:18:15 +02:00
Carl Schwan
95376c2ccc Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Carl Schwan <carl@carlschwan.eu>
2024-04-22 14:58:44 +00:00
James Graham
1eb622165b Use AvatarButton in UserInfo instead of a custom button. This has the advantage of showing keyboard focus properly 2024-04-22 16:50:56 +02:00
Nate Graham
9d6ba324fb Use more appropriate icons and tooltips for the room info drawer handles
Right now they use the standard text but left and right arrow icons,
which is a bit odd, and I think fails to convey what will happen when
clicked especially whern the drawer is closed.

Instead, let's use descriptive tooltip text for both, and a descriptive
icon for the the "this will open the drawer" handle button. For the one
to close the drawer, the default icon seems better, so let's stop
overriding it.
2024-04-22 08:10:39 +00:00
l10n daemon script
d462852ab9 GIT_SILENT Sync po/docbooks with svn 2024-04-22 01:28:36 +00:00
l10n daemon script
eeec81898b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-04-22 01:15:14 +00:00
James Graham
ab0c8b8170 Use new cornerRadius Kirigami unit across the app 2024-04-21 19:19:57 +02:00
James Graham
91d295e0bb Make sure that tab can be used to navigate away from the chatbar 2024-04-21 17:18:12 +00:00
James Graham
125974dd7a Add Carl's focus title hack as a devtool option 2024-04-21 17:02:26 +00:00
Tobias Fella
92895a7d00 Improve CodeComponent background 2024-04-21 18:21:54 +02:00
Nate Graham
d9308440e6 Make the "add new" menu button a hamburger menu
I know hamburger menus sometimes aren't amazing, but the current icon is
misleading. It's a plus button which generally means "create new".
However the menu is full of actions not related to creating new things,
including:

- Explore Rooms
- Find your Friends
- Scan a QR Code

These actions may technically result in a new room appearing in the
sidebar, but that's not a user's definition of creating a new thing;
these are *joining* a thing, and the fact that a new entry appears in
the sidebar is an implementation detail.

As a result the existing icon is inaccurate, and also holds back the
menu from adding additional items in the future that are even less
related to creating new rooms. An example would be the quick room
switcher, which is not exposed visibly in the UI anywhere, and could not
logically live in the current menu without changing its icon and text.
2024-04-21 15:07:29 +00:00
James Graham
5340142c06 Change actionChanged to notificationActionChanged
Change actionChanged to notificationActionChanged to avoid any clashes with ItemDelegate action property signals
2024-04-21 14:37:02 +00:00
James Graham
012d30ee9f Elide the Hidden delegate text 2024-04-21 13:33:00 +02:00
James Graham
031d69d996 Only override the DelegateType when showing hidden messages 2024-04-21 13:25:49 +02:00
James Graham
8b63c18f65 Implement devtoool to show hidden timeline messages 2024-04-21 10:50:59 +00:00
James Graham
dc2f11eb2b Fancy Effects 2021-2024 gone but never forgotten
Remove fancy effects as it's busted and causing CPU spikes.
2024-04-21 10:50:45 +00:00
James Graham
13e64a9487 Use 0.8.x for libQuotient flatpak 2024-04-21 12:41:21 +02:00
Albert Astals Cid
6a3c88ae5b GIT_SILENT Upgrade release service version to 24.07.70. 2024-04-21 12:28:32 +02:00
l10n daemon script
08a7e324aa GIT_SILENT Sync po/docbooks with svn 2024-04-21 01:23:23 +00:00
James Graham
9202a4525f Make sure the user can get to the navigationtabbar 2024-04-20 17:21:21 +00:00
Carl Schwan
bfc756fb35 rejrejore 2024-04-20 17:21:21 +00:00
Carl Schwan
2a735ff1cc jreojreojr 2024-04-20 17:21:21 +00:00
James Graham
551092a1b4 Make sure the drawer get active focus on open 2024-04-20 17:21:21 +00:00
Carl Schwan
ddd12688aa RoomInformation: allow tabbing on actions 2024-04-20 17:21:21 +00:00
l10n daemon script
71767c4172 GIT_SILENT Sync po/docbooks with svn 2024-04-20 01:23:40 +00:00
l10n daemon script
ee405fbff6 GIT_SILENT Sync po/docbooks with svn 2024-04-19 01:25:40 +00:00
James Graham
c87c6fbabb Add kitemmodels back to Permissions.qml 2024-04-18 20:48:24 +01:00
Tobias Fella
096b36b89b Try fixing test some more 2024-04-18 19:19:31 +02:00
Tobias Fella
c3db90d2e3 Make DrKonqi work with NeoChat 2024-04-18 18:49:12 +02:00
Tobias Fella
b7df10aa45 Try fixing appium test 2024-04-18 18:15:15 +02:00
l10n daemon script
fea5e02e7d GIT_SILENT Sync po/docbooks with svn 2024-04-18 01:18:34 +00:00
Tobias Fella
cb94261727 Fix compatibility with libQuotient dev branch 2024-04-17 13:01:32 +02:00
l10n daemon script
efac7e4860 GIT_SILENT Sync po/docbooks with svn 2024-04-17 01:25:31 +00:00
Tobias Fella
0f6fd3adee Remove outdated event registrations 2024-04-16 22:39:16 +02:00
James Graham
e5e0405401 Fix typo 2024-04-16 21:16:21 +01:00
Tobias Fella
bb35e9ce15 Add option to show all rooms in "uncategorized" tab 2024-04-16 20:49:17 +02:00
Tobias Fella
5881db4e55 Add missing import to global menu 2024-04-16 20:25:04 +02:00
Tobias Fella
89f7167b08 Remember previous downloads after restarts
Fixes #636
2024-04-16 17:55:26 +02:00
l10n daemon script
3b39fcff84 GIT_SILENT Sync po/docbooks with svn 2024-04-16 01:27:26 +00:00
Tobias Fella
0daf45a465 Fix opening account editor 2024-04-15 17:48:26 +02:00
Tobias Fella
c0d7b96e79 Mark ThreePIdModel as uncreatable 2024-04-15 17:15:01 +02:00
Laurent Montel
a247e40865 Add missing includes moc 2024-04-15 08:10:50 +02:00
Laurent Montel
c3e7a99bca Add missing #pragma once 2024-04-15 08:10:22 +02:00
l10n daemon script
9080d8be6a GIT_SILENT Sync po/docbooks with svn 2024-04-15 01:20:15 +00:00
James Graham
b7ee83f6b6 Add visualisation of the account's third party IDs in the account editor.
A category won't be shown if there are no relevant IDs (will add the ability to add new ones later).

Part of network/neochat#565

![image](/uploads/7da00b0b4acf90d145c09969ac2a91e1/image.png)
2024-04-14 16:37:34 +00:00
James Graham
1e24bde9a9 Add hover button for maximising a code block
Forgot to add it with the maximize mr
2024-04-14 16:32:12 +00:00
l10n daemon script
ba82df1152 GIT_SILENT Sync po/docbooks with svn 2024-04-14 01:20:38 +00:00
Tobias Fella
8980fe7838 Improve README 2024-04-13 21:59:16 +02:00
James Graham
ef34ed7c20 Fix Verification Window Sizing
Update the layouts in the device verifcation process to make sure that all possible window sizes can be handled

BUG: 485309
2024-04-13 18:51:06 +00:00
James Graham
17d60b79ca Fix showing the unread count for DM section when not selected 2024-04-13 15:15:27 +00:00
James Graham
ab0a32c339 Add a debug options page to devtools with the option to always allow verification for now
Closes network/neochat#646
2024-04-13 15:11:25 +00:00
James Graham
697778df8d Fix feature flag devtools page by adding necohat import as this is where config comes from now 2024-04-13 15:28:26 +01:00
Yuri Chornoivan
55caf84b94 Fix minor typos 2024-04-13 08:47:48 +03:00
l10n daemon script
335c012f1b GIT_SILENT Sync po/docbooks with svn 2024-04-13 01:25:05 +00:00
Tobias Fella
3c4c538de8 Use declarative type registration for remaining types 2024-04-12 22:17:39 +02:00
Tobias Fella
c344a3ee55 Devtools: Implement changing room state 2024-04-12 22:08:33 +02:00
l10n daemon script
d2695947ed GIT_SILENT Sync po/docbooks with svn 2024-04-12 01:22:49 +00:00
Tobias Fella
21beeef920 Load Main qml component from module 2024-04-11 21:01:55 +02:00
James Graham
a4630a53fa Create QML module for login 2024-04-11 18:56:08 +00:00
Tobias Fella
f5aef8d0c3 Use Qt.createComponent in non-weird way
Fixed #647
2024-04-11 18:16:19 +02:00
l10n daemon script
e044e66030 GIT_SILENT Sync po/docbooks with svn 2024-04-11 01:23:29 +00:00
James Graham
88bfacd386 Show QR code for room in drawer 2024-04-10 18:19:05 +00:00
James Graham
c61c73088f Add button to get a QR code for the local user to the account editor page 2024-04-10 17:19:11 +00:00
l10n daemon script
2887263f26 GIT_SILENT Sync po/docbooks with svn 2024-04-10 01:24:51 +00:00
James Graham
72b90bdf5c Fix gaps at the top and bottom of SpaceHomePage witht he wrong background colour.
Note: the bottom gap only happened after a room was loaded for the first time
2024-04-09 19:03:24 +00:00
James Graham
163b02f023 Add image info for stickers
Closes network/neochat#584
2024-04-09 18:54:59 +00:00
James Graham
1a96899336 Linkpreviewer Improvements
- Have LinkPreviewers stored in NeoChatConnection so that they don't have to be reloaded everytime the MessageContentModel is refreshed
- This means the link is never changed (it will be swiched for a new previewer with the new link)
- LinkPreviewers are stored by URL so they can be re-used by any event with the same URL

BUG: 484927  (because the offending code is ripped out)
2024-04-09 18:35:16 +00:00
l10n daemon script
554c086aba GIT_SILENT Sync po/docbooks with svn 2024-04-09 01:25:03 +00:00
Heiko Becker
1fad9bf7db GIT_SILENT Update Appstream for new release
(cherry picked from commit 86e8dc2e40)
2024-04-08 17:57:25 +02:00
l10n daemon script
22d922e451 GIT_SILENT Sync po/docbooks with svn 2024-04-08 01:23:31 +00:00
snow flurry
70bff21632 Render custom emoji icons in the completion pane 2024-04-07 19:40:02 +00:00
James Graham
f58c390a47 Re-add requirement for having devtools active for the show message source action
Re-add requirement for having devtools active for the show message source action

BUG: 485140
2024-04-07 08:40:14 +00:00
l10n daemon script
089a9abcb4 GIT_SILENT Sync po/docbooks with svn 2024-04-07 01:23:56 +00:00
Joshua Goins
bf1c76d0a6 Force the choose room dialog's search dialog to be focused
This makes it possible to open the share dialog and start typing to find
the room immediately.
2024-04-06 15:40:03 -04:00
Joshua Goins
879da627b1 Fix the share dialog not showing up
Seems to be a leftover from the refactor to use modules.
2024-04-06 15:39:36 -04:00
James Graham
9b93eb44d5 Show a verified icon for verified devices rather than a verify option 2024-04-06 14:19:38 +00:00
l10n daemon script
b30220eca9 GIT_SILENT Sync po/docbooks with svn 2024-04-06 01:23:47 +00:00
l10n daemon script
d270d4e5e1 GIT_SILENT Sync po/docbooks with svn 2024-04-05 01:21:52 +00:00
l10n daemon script
21da6cb0f4 GIT_SILENT Sync po/docbooks with svn 2024-04-04 01:24:44 +00:00
l10n daemon script
6ac75df935 GIT_SILENT Sync po/docbooks with svn 2024-04-03 01:24:31 +00:00
l10n daemon script
f29781349c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-04-03 01:14:45 +00:00
Tobias Fella
bb776d5c2b Only ask for URL opening confirmation for QR codes
BUG: 484870
2024-04-02 19:47:07 +02:00
James Graham
6cfab9e3ea Tree Model 2 Electric Boogaloo
This draws heavily on what @carlschwan did in network/neochat!1579 but I found it easier to start again and grab the bits as I needed them plus some other copying from what I did in the Space tree model.

From my current limited testing this seems to work nicely try and break it.
2024-04-02 14:44:20 +00:00
l10n daemon script
6373186c15 GIT_SILENT Sync po/docbooks with svn 2024-04-02 01:18:19 +00:00
Nate Graham
e342de3bc1 Make ConfirmUrlDialog HIG-compliant
* "URL" is an acronym; make it all caps
* Use descriptive context-appropriate buttons instead of "Yes" and "No"
* Use KUIT markup for styling the link
2024-04-01 11:32:27 -06:00
Tobias Fella
4cd7b69ea5 Fix QML warning 2024-04-01 15:48:42 +02:00
Tobias Fella
988e8529da Remove leftover signal handler 2024-04-01 15:43:31 +02:00
James Graham
6a32d1e961 Create component for showing a maximize version of a code snippet 2024-04-01 11:20:10 +00:00
James Graham
0552c798fb Create qml module for devtools 2024-04-01 10:58:29 +00:00
l10n daemon script
a53ad41879 GIT_SILENT Sync po/docbooks with svn 2024-04-01 01:17:50 +00:00
Tobias Fella
92351edcd0 Fix location delegates
- Mark OSMLocationPlugina as singleton in cmake
- Use this plugin for the LocationChooser
2024-03-31 20:57:58 +02:00
James Graham
878eb48cb0 Shut qt up about models passed to QML
Shutup qt about below

```
SortFilterRoomListModel is neither a QObject, nor default- and copy-constructible, nor uncreatable. You should not use it as a QML type.
SortFilterRoomTreeModel is neither a QObject, nor default- and copy-constructible, nor uncreatable. You should not use it as a QML type.
SortFilterSpaceListModel is neither a QObject, nor default- and copy-constructible, nor uncreatable. You should not use it as a QML type.
```
2024-03-31 17:49:35 +00:00
James Graham
053ca6bed8 Move the various room models into RoomManager
Move the various room models into RoomManager. This means the same room models are always used and is a base from which further logic can be moved from QML to cpp.
2024-03-31 12:56:27 +00:00
Tobias Fella
78ae14ab2f Stay in DM tab when selecting a DM 2024-03-31 14:31:22 +02:00
l10n daemon script
5fdc2ad765 GIT_SILENT Sync po/docbooks with svn 2024-03-31 01:30:45 +00:00
Tobias Fella
b75dbe8d5c Rework roommanager for improved stability
Fixes #645

- Active space handling is moved from QML to RoomManager
- Active tab in SpaceDrawer (space / no space / DM) is unified in a single variable
- RoomList & RoomPage loading is simplified: We're always pushing a RoomPage now; if there is no room, a placeholder is shown
- SpaceHomePage is moved into RoomPage; This replaces the entire push/replace room/spacehome logic
- If the current room is a space, the space home is shown, otherwise the timeline
- The concept of "previous room" is removed entirely. If we're leaving the active room, the placeholder room page is shown
- When clicking on a space in the list, the space room list is switched and the space home page is shown

In short, these changes should (after some initial regressions) lead to a less crashy NeoChat :)
2024-03-31 00:22:23 +01:00
James Graham
eaf4663c84 RoomManger connection
RoomManger should just get it's connection from Controller, no need to involve QML
2024-03-30 19:48:34 +00:00
James Graham
64b8cd5bcc Space Search
Allow to refine searches to spaces only in the main exlore function.
Show which rooms are spaces in the search page.

Closes #577
2024-03-30 19:37:46 +00:00
James Graham
482d61ee47 Fix marking messages as read when the window is thin
Make sure that messages are not marked as read when going back to the roomlist after entering a room when neochat is thin and only showing a single page

Fixes #642
2024-03-30 19:32:19 +00:00
l10n daemon script
276dcce95e GIT_SILENT Sync po/docbooks with svn 2024-03-30 01:18:07 +00:00
Tobias Fella
217f9e2e02 Set OUTPUT_DIRECTORY for qml modules
This fixes some cmake warning and might make qmlls happier
2024-03-29 20:06:26 +01:00
Tobias Fella
f40a0a6f5f Remove unused property 2024-03-29 16:43:06 +01:00
Tobias Fella
9bd67acc2f Remove leftover signal 2024-03-29 16:05:07 +01:00
James Graham
e87da0feb0 Add pagination to space hierarchy cache
Add pagination to space hierarchy cache to ensure all rooms get cached.
2024-03-29 15:03:50 +00:00
Tobias Fella
2608d879fa Add "Leave room" button to sidebar
BUG: 484425
2024-03-29 13:53:59 +01:00
Tobias Fella
6ab61fd41f Fix opening the last room active room if it's not in a space
At the moment, the saved room was effectively always overridden by the first room in the list
2024-03-29 13:29:41 +01:00
Tobias Fella
30dd6297ee Make sure we're switching out of the space home page when leaving the currently opened space 2024-03-29 11:57:06 +01:00
Tobias Fella
ce02183f82 Fix plural handling in space member strings 2024-03-29 11:56:29 +01:00
Tobias Fella
7c74a6cbe1 Improve space management strings 2024-03-29 11:56:06 +01:00
Tobias Fella
e6a11b2ad8 Make various models more robust against deleted rooms 2024-03-29 11:55:14 +01:00
James Graham
158942d1b5 UserInfo compact
Make UserInfo work in compact mode. This includes showing the account switch popup in a dialog

BUG: 482261
2024-03-29 09:09:13 +00:00
l10n daemon script
aaa97ec029 GIT_SILENT Sync po/docbooks with svn 2024-03-29 01:30:58 +00:00
Tobias Fella
882ead5715 Remove external room window feature
At its best, this worked ok-ish, though it was always missing basic features.

It's also a massive memory leak and significantly complicates the codebase.
(Which is not yet cleaned up by this commit)

Currently, it is entirely broken and noone noticed or cared enough to report or fix that.

BUG: 455984
2024-03-28 22:05:50 +01:00
Tobias Fella
ab4519dedd Show custom delegate for in-room user verification
This is independent of the in-room verification actually working, but prevents a fallback from appearing
2024-03-28 22:03:58 +01:00
Tobias Fella
c3fd2428a2 Add QR code scanner 2024-03-28 22:02:55 +01:00
James Graham
fbb4b962fa Support selected text for replies in the right click menu
Support selected text for replies in the right click menu

BUG: 463885
2024-03-28 21:01:21 +00:00
Tobias Fella
9bf65de649 Use custom room drawer icons 2024-03-28 21:34:47 +01:00
Tobias Fella
75f069cb7d SpaceChildrenModel: Handle space being deleted 2024-03-28 16:46:38 +01:00
l10n daemon script
87d50125ab GIT_SILENT Sync po/docbooks with svn 2024-03-28 01:38:17 +00:00
l10n daemon script
dc2cf21cb8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-03-28 01:18:33 +00:00
Tobias Fella
bae14ecd35 Simplify spacedrawer width code 2024-03-27 21:09:27 +01:00
Gary Wang
b48c1c3b80 Allow show sender detail from message context menu
When curtain user is spamming a lot of messages in a short amount
of time, mod need to scroll all the way up to the first spam message to
know who send those spam message, thus start banning them.

This patch add a context menu to open the sender detail dialog, it could
make banning the spam user and batch-deleting spam messages easier.
2024-03-27 19:39:29 +00:00
James Graham
0f9eb4beeb Fix logout current connection crash
Make sure that the neochat can handle switching connection when the current one is logged out. This is mostly about using QPointer to handle use after free issues due to room objects being deleted.
2024-03-27 15:25:24 +00:00
l10n daemon script
0ab8624d79 GIT_SILENT Sync po/docbooks with svn 2024-03-27 09:54:21 +00:00
l10n daemon script
e872c934c3 GIT_SILENT Sync po/docbooks with svn 2024-03-27 01:31:49 +00:00
James Graham
c3d5d18aae Use unique pointers for space child items 2024-03-26 13:41:03 +00:00
James Graham
ff5853a850 Create a QML module for settings 2024-03-26 13:23:43 +00:00
l10n daemon script
f772906324 GIT_SILENT Sync po/docbooks with svn 2024-03-26 01:31:34 +00:00
l10n daemon script
07eabb2dc1 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-03-26 01:13:52 +00:00
l10n daemon script
b3c88763a4 GIT_SILENT Sync po/docbooks with svn 2024-03-25 01:31:49 +00:00
Tobias Fella
f7081f8829 Always encrypt DMs when creating them 2024-03-24 11:36:21 +01:00
James Graham
ceef2167fd Don't Maximize Stickers
Make sure that sticker don't open the maximize component as they aren't in the media model

BUG: 482701
2024-03-24 10:01:41 +00:00
James Graham
1dcfd94328 Fix Message Components for Tags with Attributes
Don't assume that the close tag is the length of the start tag +1

BUG: 482331
2024-03-24 10:01:00 +00:00
l10n daemon script
a1aa0804e2 GIT_SILENT Sync po/docbooks with svn 2024-03-24 01:20:31 +00:00
l10n daemon script
77176478eb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-03-24 01:14:27 +00:00
l10n daemon script
bf4ebfa7a8 GIT_SILENT made messages (after extraction) 2024-03-24 00:38:05 +00:00
Tobias Fella
6e7d622b41 Fix crash when visiting user
We're adding the "join" action so that rooms are joined.
libQuotient doesn't like it when we the action is join and the uri is for a user.

BUG: 483744
2024-03-23 20:46:56 +01:00
Tobias Fella
8398b7d24d Fix manual user search dialog 2024-03-23 20:45:15 +01:00
James Graham
aef9b7375a Fix Opening Maximized Media
Make sure the Image and Video Components can correctly get the index for opening the Maximize Media component.
2024-03-23 17:52:29 +00:00
James Graham
ba45318b56 Improved itinerary delegates
Steal the look of itinerary items from itinerary but simplified. Also includes new support for flights and restaurants

![image](/uploads/a574d2362edad52ecf91ce89a1849f27/image.png)
2024-03-23 09:33:51 +00:00
l10n daemon script
7d4f8780ad GIT_SILENT Sync po/docbooks with svn 2024-03-23 01:19:12 +00:00
l10n daemon script
b504c990f8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-03-23 01:13:26 +00:00
Tobias Fella
e07b876677 Add UI for entering key backup passphrase 2024-03-22 22:04:07 +01:00
Tobias Fella
a0bfd34951 Fix removing a parent space when we're not joined 2024-03-21 21:25:26 +01:00
l10n daemon script
b173714bbe GIT_SILENT Sync po/docbooks with svn 2024-03-21 01:20:56 +00:00
l10n daemon script
db4021b601 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-03-21 01:14:53 +00:00
l10n daemon script
2f46fd1d2c GIT_SILENT Sync po/docbooks with svn 2024-03-20 01:22:05 +00:00
Tobias Fella
1f85f848e2 Clean up button 2024-03-19 21:31:11 +01:00
Tobias Fella
d7e0954e86 Fix opening manual room dialog 2024-03-19 21:27:18 +01:00
James Graham
1671e05d12 More file previews
This adds previews for downloaded pdfs and code files.

![image](/uploads/9c199e91a1b4ea296c9b82a76e11038b/image.png)

![image](/uploads/17ea3869469417ee78e650ce750dbeb7/image.png)
2024-03-19 20:06:32 +00:00
Tobias Fella
33c55d1563 Add back errouneously removed import 2024-03-19 21:00:48 +01:00
Tobias Fella
4984181613 Refactor and improve emoji detection in reactions
UCHAR_EMOJI_PRESENTATION is replaced with UCHAR_EMOJI, which seems to be more useful for decting emojis.
The lambda is also turned into a proper function as there's no apparent reason for it to be a lambda.
2024-03-19 20:51:50 +01:00
Tobias Fella
af75136269 Bump compiler settings level to 6.0 2024-03-19 20:05:23 +01:00
l10n daemon script
c8eb75a148 GIT_SILENT Sync po/docbooks with svn 2024-03-19 01:22:10 +00:00
Joshua Goins
5109b4fcd1 Fix the quick format bar not actually doing anything 2024-03-18 20:17:06 +00:00
Joshua Goins
1b7f482d0b Exclude lonely question marks from the linkify regex
Many URLs we see in the KDE rooms end with a question mark, without a
space. The linkify regex for plain URLs incorrectly considered them as
part of the link, which usually breaks them when opened in a web
browser. Now the regex excludes these, unless they are accompanied by
another character (so links like kde.org/realurl?is=true will still
work.)
2024-03-18 15:46:22 -04:00
James Graham
6f9a273d39 Timeline Module
Move all the timeline QML files into their own QML module. Having them all in the same location is annoying and hard to work with.
2024-03-18 18:39:59 +00:00
l10n daemon script
51d354a9c8 GIT_SILENT Sync po/docbooks with svn 2024-03-18 01:31:43 +00:00
l10n daemon script
40b2b9554b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-03-18 01:13:51 +00:00
l10n daemon script
ba1aca84ff GIT_SILENT Sync po/docbooks with svn 2024-03-17 01:30:01 +00:00
James Graham
17688a49d5 Remove stray log 2024-03-16 13:33:37 +00:00
James Graham
5ff199cc3e Itinerary Component
Move the itinerary model representation to it's own component and instantiate from MessageComponentModel. This starts to lay some groundwork for previewing other files.
2024-03-16 09:28:30 +00:00
l10n daemon script
81a79105d7 GIT_SILENT Sync po/docbooks with svn 2024-03-16 01:34:25 +00:00
l10n daemon script
e39760ccfb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-03-16 01:15:17 +00:00
Heiko Becker
1c43da2532 GIT_SILENT Update Appstream for new release
(cherry picked from commit f731877519)
2024-03-15 22:12:56 +01:00
Joshua Goins
2846def00f Fix typo in MessageEditComponent 2024-03-15 15:12:46 -04:00
Joshua Goins
e2eb6ab33c Don't destroy formatting when editing previous messages
Adds a few new methods to grab the markdown/slightly rich text from the
message, and will intelligently re-insert user mentions as needed.
2024-03-15 14:54:06 -04:00
Joshua Goins
35b08d085c Prevent collision between KUnifiedPush DBus and KRunner DBus
These share the same D-Bus service name (org.kde.neochat) which comes
with a fun little addition: KRunner activation! While this is not a
problem while NeoChat is running - since it's already registered - this
becomes an issue while searching for NeoChat in something like the
Kickoff. The Kickoff (and consequently, KRunner) tries to activate the
NeoChat D-Bus service which runs our unified push parts.

This introduces a "FakeRunner" which watches closely for calls to the
KRunner interface while we're in unified push mode (or directly called
from D-Bus but not running) so it quits immediately.
2024-03-15 18:41:04 +00:00
Joshua Goins
064b0581a7 Make the tabs in developer tools full-width
It looks slightly better, and since there's only four tabs it increases
the tappable area for them.
2024-03-15 18:39:21 +00:00
l10n daemon script
0cc38aa69a GIT_SILENT Sync po/docbooks with svn 2024-03-15 01:31:04 +00:00
l10n daemon script
8312483659 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-03-15 01:13:30 +00:00
l10n daemon script
0ceb0b4421 GIT_SILENT Sync po/docbooks with svn 2024-03-14 01:32:04 +00:00
l10n daemon script
cc373365fb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-03-14 01:14:11 +00:00
l10n daemon script
75d9b6e2a1 GIT_SILENT Sync po/docbooks with svn 2024-03-13 01:20:21 +00:00
l10n daemon script
78fa38ba68 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-03-13 01:15:08 +00:00
l10n daemon script
0b28712a34 GIT_SILENT made messages (after extraction) 2024-03-13 00:38:07 +00:00
Tobias Fella
48937c8d9a Make sure that timeline is scrolled to end when switching room 2024-03-12 22:45:29 +01:00
l10n daemon script
8c966a5e1a GIT_SILENT Sync po/docbooks with svn 2024-03-12 01:18:54 +00:00
l10n daemon script
f49dd371b7 GIT_SILENT made messages (after extraction) 2024-03-12 00:37:52 +00:00
Tobias Fella
6947fbc12a Add purpose plugin
Implements #182
2024-03-11 20:07:00 +01:00
Nicolas Fella
550dc43dc0 Remove manual window toggling for system tray icon
KStatusNotifierItem automatically does this for us
since we associate our window with it

Doing it again causes the window to be toggled again, which means
it won't be shown

BUG: 479721

BUG: 482779
2024-03-11 11:31:49 +01:00
l10n daemon script
23c9a4fea7 GIT_SILENT Sync po/docbooks with svn 2024-03-11 01:18:43 +00:00
Carl Schwan
7d26f3351f Fix crash in RoomTreeModel 2024-03-10 19:15:05 +01:00
Tobias Fella
b546554fef Require frameworks 6.0 2024-03-10 14:30:49 +01:00
James Graham
cc058a7cd3 Re-order spaces by dragging and dropping
Title
2024-03-10 11:18:28 +00:00
James Graham
7654b83339 Move the devtools button to UserInfo
Makes more sense now that room is selectable anyway and allows access from space home pages
2024-03-10 10:55:05 +00:00
James Graham
93426546ad Make sure that the MessageSourceSheet component is created properly in devtools 2024-03-10 10:25:53 +00:00
l10n daemon script
23bc38ca6c GIT_SILENT Sync po/docbooks with svn 2024-03-10 01:30:55 +00:00
Tobias Fella
5ccce364d3 Allow opening the settings from the welcome page
This is required to configure a proxy before logging in
2024-03-09 11:49:18 +01:00
l10n daemon script
b488b55a71 GIT_SILENT Sync po/docbooks with svn 2024-03-09 01:23:06 +00:00
l10n daemon script
0bace17074 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-03-09 01:14:29 +00:00
Tobias Fella
ad6c7dbd1f Don't link KDBusAddons on windows 2024-03-08 22:01:55 +01:00
James Graham
2a6e63595e Fix space tree refresh
Stop space hierarchy being duplicated. This is done by making sure old jobs are cleared at all resets and to make doubly sure when a child is inserted it overrides itself so there can never be duplicates
2024-03-08 18:36:43 +00:00
l10n daemon script
4d62ad1938 GIT_SILENT Sync po/docbooks with svn 2024-03-08 01:18:17 +00:00
l10n daemon script
e7c3a24011 GIT_SILENT Sync po/docbooks with svn 2024-03-07 01:17:40 +00:00
l10n daemon script
37468607fe GIT_SILENT Sync po/docbooks with svn 2024-03-06 01:18:26 +00:00
Albert Astals Cid
5b007129e3 flatpak: Switch to non-preview runtime 2024-03-06 00:33:31 +01:00
Tobias Fella
93ceb4d49c Improve hover link indicator accessibility
It's a bit pointless, since hovering it requires a mouse... but it's better than the previous behavior
2024-03-05 19:14:31 +01:00
Tobias Fella
85b806fcba Fix appstream 2024-03-05 18:27:39 +01:00
l10n daemon script
20596aabb8 GIT_SILENT Sync po/docbooks with svn 2024-03-05 01:18:31 +00:00
l10n daemon script
825108c59e GIT_SILENT made messages (after extraction) 2024-03-05 00:37:50 +00:00
James Graham
09c31b20e6 stripBlockTags Fixes
Make the code more robust by accounting for things like tag attributes
2024-03-04 21:05:11 +00:00
James Graham
78271a3738 Add highlight and copy button to code component 2024-03-04 20:09:22 +00:00
James Graham
e029aaadfc No Code String Convert
No need to try and convert code strings anymore this is now handled in KSyntaxHighlighter

see frameworks/syntax-highlighting!603 and frameworks/syntax-highlighting!604
2024-03-04 18:05:25 +00:00
l10n daemon script
f6efa35ed2 GIT_SILENT Sync po/docbooks with svn 2024-03-04 01:18:21 +00:00
l10n daemon script
728bad00b4 GIT_SILENT made messages (after extraction) 2024-03-04 00:37:35 +00:00
James Graham
97f3013f7a Visualise readacted messages
Make sure that a text delegate is added for redacted messages so that a message can be shown when show deletions is on
2024-03-03 16:33:21 +00:00
Tobias Fella
269a832ac9 Fix binding loop in NotificationsView 2024-03-03 16:56:18 +01:00
Tobias Fella
3b5b7af531 Fix QML warning 2024-03-03 16:43:52 +01:00
l10n daemon script
76e7eb7009 GIT_SILENT Sync po/docbooks with svn 2024-03-03 01:23:44 +00:00
l10n daemon script
fa99b8829d SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-03-03 01:15:35 +00:00
l10n daemon script
98b749ee9f GIT_SILENT made messages (after extraction) 2024-03-03 00:38:27 +00:00
Joshua Goins
cb9fd02dc7 Show link preview for links in room topics
This has an important security benefit, to prevent hiding fake links
behind real-looking ones.
2024-03-02 23:15:28 +00:00
Joshua Goins
1f4a271dd6 Remove unnecessary regex in room topic component
This makes Markdown links work again
2024-03-02 23:15:28 +00:00
Tobias Fella
bdf192df58 Use plaintext in devtools room selection combo 2024-03-02 19:36:46 +01:00
Tobias Fella
1249304907 Add devtools button to account menu 2024-03-02 19:07:13 +01:00
Tobias Fella
10e3ab1f78 Hide typing notifications for ignored users
Fixes #635
2024-03-02 18:43:08 +01:00
James Graham
59ea270b2f Fix the top section heading in the timeline. It was previously causing anchor loops 2024-03-02 10:28:04 +00:00
l10n daemon script
3b748e2e21 GIT_SILENT Sync po/docbooks with svn 2024-03-02 01:18:53 +00:00
l10n daemon script
432fae5ce2 GIT_SILENT made messages (after extraction) 2024-03-02 00:37:39 +00:00
James Graham
f557ceda19 Notification Consistency
Make sure that the new rules for counting notifications for muted, mention and low priority rooms is applied consistently to the room list, space drawer and the task manager notification badge

implements #644
2024-03-01 17:56:13 +00:00
Tobias Fella
943f6c762c Fix (un)ignoring unknown users 2024-03-01 09:32:45 +00:00
l10n daemon script
5a9293e293 GIT_SILENT Sync po/docbooks with svn 2024-03-01 01:32:00 +00:00
l10n daemon script
a1bc52c1a5 GIT_SILENT made messages (after extraction) 2024-03-01 00:38:01 +00:00
Carl Schwan
dcd752be8f Fix compilation error 2024-02-29 23:48:35 +01:00
Carl Schwan
deb2c61b28 Improve appstream metadata 2024-02-29 23:48:35 +01:00
Joshua Goins
5e346283a9 Add app identifier in donation url 2024-02-29 20:11:16 +00:00
Carl Schwan
dc1e4219a0 Add more appstream urls 2024-02-29 09:08:30 +00:00
l10n daemon script
a916f70698 GIT_SILENT Sync po/docbooks with svn 2024-02-29 01:19:12 +00:00
l10n daemon script
77da4d2d53 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-02-29 01:13:28 +00:00
James Graham
1ae3fc86da Updated room sorting
Change the LastActivity sort order to Activity and update to a more flexible way of sorting based on an order from model roles.
Add options to actually switch between Alphabetical and Activity

Based on some old work by @tdfischer 

implements #103
2024-02-28 17:57:32 +00:00
l10n daemon script
0c24996b44 GIT_SILENT Sync po/docbooks with svn 2024-02-28 01:18:27 +00:00
l10n daemon script
1cbb4a93eb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-02-28 01:13:32 +00:00
James Graham
1fac6ca34a Split text section into blocks
The aim is to be able to use separate delegate for things like codeblocks and quotes so that they can be styled differently.

![image](/uploads/c813c0d1767f45df14cebe632e2ee10a/image.png)
2024-02-27 18:52:06 +00:00
l10n daemon script
ca439b0f86 GIT_SILENT Sync po/docbooks with svn 2024-02-27 01:19:14 +00:00
l10n daemon script
f70febc8d3 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-02-27 01:13:57 +00:00
Tobias Fella
628de56087 Devtools: Split state keys into a separate list 2024-02-26 17:05:28 +01:00
Tobias Fella
bc67033c00 Adapt to QTP0001 2024-02-26 16:49:17 +01:00
l10n daemon script
e0ba2a179c GIT_SILENT Sync po/docbooks with svn 2024-02-26 01:20:46 +00:00
Tobias Fella
e0ce5d9544 Show AccountData in Devtools 2024-02-25 21:05:12 +01:00
Tobias Fella
38acfe04b9 Fix sharing 2024-02-25 20:13:39 +01:00
Tobias Fella
5b0068d9e4 Cache space hierarchy to disk
This significantly improves the startup experiences by eliminating
the changes in the space drawer while neochat loads.

Implements #640
Replaces !1563
2024-02-25 20:12:07 +01:00
James Graham
38edad2ac5 Make sure that only text messages can be edited 2024-02-25 17:20:49 +00:00
Tobias Fella
e95f191dc6 Add view of ignored users and allow unignoring them 2024-02-25 18:03:10 +01:00
Tobias Fella
8ae92ff4d4 Port room upgrade dialog to Kirigami.Dialog 2024-02-25 17:55:05 +01:00
Tobias Fella
40e15d456a Favourites -> Favorites
BUG: 481814
2024-02-25 16:35:10 +01:00
l10n daemon script
a1b3308cd7 GIT_SILENT Sync po/docbooks with svn 2024-02-25 01:23:35 +00:00
l10n daemon script
48ef19e4be GIT_SILENT Sync po/docbooks with svn 2024-02-24 01:17:25 +00:00
l10n daemon script
d3f00b9246 GIT_SILENT Sync po/docbooks with svn 2024-02-23 01:18:21 +00:00
Tobias Fella
89de676982 Don't build kirigami-addons master 2024-02-22 19:06:14 +01:00
Tobias Fella
6dec624d22 Pin kirigami-addons 2024-02-22 19:05:00 +01:00
Tobias Fella
d4eb9ea320 Move ShowAuthorRole to MessageFilterModel
Only there can it be calculated correctly.
Fixes #632
2024-02-22 18:42:04 +01:00
l10n daemon script
1cfaa88989 GIT_SILENT Sync po/docbooks with svn 2024-02-22 01:19:42 +00:00
James Graham
82ae0891a8 Create a feature flag page in devtools. 2024-02-21 23:53:51 +00:00
James Graham
58c43b0cd4 Make sure that the room isn't already in the model before appending.
Make sure that the room isn't already in the model before appending. Move it if it's in the wrong catgeory
2024-02-21 23:52:10 +00:00
Tobias Fella
1c373031bd Html-escape display name in user detail sheet 2024-02-21 18:10:32 +01:00
Tobias Fella
e93842a95f Fix saving images from maximize component
Fixes #643
2024-02-21 16:51:23 +01:00
l10n daemon script
9cdb34cb1d GIT_SILENT Sync po/docbooks with svn 2024-02-21 01:19:26 +00:00
James Graham
864f9b8f74 Add feature flag for reply in thread
Currently the ability to reply in threads was added but not the ability to actually view threads so this doesn't currently make much sense to just have enabled int he main build.

Note: I want to cherrypick this so it's just the flag. I'll add a feature flag page to dev tools for master soon.
2024-02-20 20:09:49 +00:00
Tobias Fella
d99fae333a Introduce MediaManager
Currently, this is only to pause playback of other media when something new starts playing.
In the future, it will also be used for other things, like call ringing, etc.
2024-02-20 21:08:47 +01:00
Tobias Fella
b27bec3e16 Leave predecessor rooms when leaving room
Implements #621
2024-02-20 20:59:04 +01:00
Tobias Fella
5fb4838734 Improve push notification string 2024-02-20 20:50:17 +01:00
Tobias Fella
1296255a86 Remove room from RoomTreeModel before leaving it
This makes sure that the room disappears from the tree view
2024-02-20 20:42:02 +01:00
Tobias Fella
e3ed2fcaa9 Fix crash in ImagePacksModel 2024-02-20 20:36:33 +01:00
Tobias Fella
69d6b90a12 Fix email 2024-02-20 18:43:23 +01:00
Tobias Fella
6937a4b2fe Quotient -> libQuotient 2024-02-20 18:42:13 +01:00
Tobias Fella
621c36f821 Fix disconnect warning 2024-02-20 18:40:00 +01:00
Tobias Fella
940929d044 Fix qml warning 2024-02-20 18:22:42 +01:00
Tobias Fella
bac5fa8c14 Don't try setting up push notifications when there's no endpoint 2024-02-20 18:19:49 +01:00
Tobias Fella
a10da64378 Run qmlformat 2024-02-20 18:11:23 +01:00
Tobias Fella
f2c12c582e Remove duplicated actions 2024-02-20 18:06:09 +01:00
l10n daemon script
a686c44555 GIT_SILENT Sync po/docbooks with svn 2024-02-20 01:21:08 +00:00
Joshua Goins
8e96217ae6 Separate MessageDelegateContextMenu to its own base component
This is the first step in separation, so we can focus more on the
actions in this menu, and it's not tangled up in how the context menu is
shown and displayed.
2024-02-19 22:07:00 +01:00
Tobias Fella
ec906813fc Remove redundant checks 2024-02-19 21:28:31 +01:00
Tobias Fella
36543d0872 Fix some properties
Properties with READ and WRITE need to NOTIFY
2024-02-19 21:21:08 +01:00
Tobias Fella
fc6ea0b779 Port RoomList to TreeView
Use a tree model for the room list

closes network/neochat#156

BUG: 456643
2024-02-19 20:09:43 +00:00
Tobias Fella
dae23ccd4b Fix crash when there is no recommended space 2024-02-19 18:13:37 +01:00
Tobias Fella
666cd3c81f Fix audio playback 2024-02-19 18:05:25 +01:00
Carl Schwan
dc5366e924 Add neochat 24.02 release note 2024-02-19 11:12:58 +01:00
l10n daemon script
f21b3bb0e4 GIT_SILENT Sync po/docbooks with svn 2024-02-19 01:21:38 +00:00
Tobias Fella
4ebcc36fb3 Add a way for distros to recommend joining a space
Implements #137
2024-02-18 17:13:34 +01:00
James Graham
292cfb0d3d Change ExploreComponent to signal text changes and set filterText from there 2024-02-18 11:13:36 +00:00
James Graham
1b59917f16 Space notification count
Show the number of notifications for a space if it isn't selected. This respects choices like low priority only adding highlights.
2024-02-18 11:04:56 +00:00
James Graham
fcf64a7e1b Fix Space Saving
This handles the following non-functioning cases from the space saving mr:
- Selecting home or friends
- Switching space that has the same room selected
2024-02-18 10:24:30 +00:00
James Graham
b598584aea Message Content Rework
For now everything should look identical. However this moves to using a model for the content of the message and is intended to lay the foundation for improved message content representation, e.g. splitting up a text message in multiple sections and using different delegates for things like code and quotes.
2024-02-18 09:53:08 +00:00
l10n daemon script
0ebcacce69 GIT_SILENT Sync po/docbooks with svn 2024-02-18 01:21:04 +00:00
l10n daemon script
33c38288a3 GIT_SILENT Sync po/docbooks with svn 2024-02-17 01:20:38 +00:00
l10n daemon script
f00e3ded45 GIT_SILENT Sync po/docbooks with svn 2024-02-16 01:21:00 +00:00
Heiko Becker
250483fbe7 GIT_SILENT Update Appstream for new release
(cherry picked from commit 1c910165c1)
2024-02-16 00:48:38 +01:00
Carl Schwan
755a060e12 Fix reaction delegate sizing for text reaction 2024-02-15 17:51:39 +00:00
Carl Schwan
6d3839dd42 Fix reaction update event when the event is not there anymore
Happens when interacting witht Mjonir quite often
2024-02-15 16:55:20 +01:00
l10n daemon script
15084459bb GIT_SILENT Sync po/docbooks with svn 2024-02-15 01:17:29 +00:00
Tobias Fella
7150445f8e Skip Welcome screen when there's only one connection and it's loaded
If the connection is stuck, we can still log in to a different one that way.
2024-02-14 18:14:38 +01:00
Tobias Fella
b02bdd22dd Allow dropping connections from the welcome page
This is the last piece required to make sure that we can recover from broken connections, e.g., when the access token is invalid.
2024-02-14 17:38:46 +01:00
l10n daemon script
8755cd9d61 GIT_SILENT Sync po/docbooks with svn 2024-02-14 01:20:54 +00:00
l10n daemon script
2c4c07dc81 GIT_SILENT made messages (after extraction) 2024-02-14 00:38:03 +00:00
l10n daemon script
645771c03d GIT_SILENT Sync po/docbooks with svn 2024-02-13 01:21:53 +00:00
Joshua Goins
b2af69fd92 Make the settings window a little bit taller to accommodate most pages
According to the HIG, scrolling should be kept to a minimum on settings
dialogs. The default window size for the dialog is too small on desktop,
and usually needs to be resized to prevent scrolling.
2024-02-12 18:19:44 +01:00
Tobias Fella
ca57732871 Show custom emoji reactions as per MSC4027 2024-02-12 14:11:54 +01:00
l10n daemon script
cd9e98f24b GIT_SILENT Sync po/docbooks with svn 2024-02-12 01:18:29 +00:00
l10n daemon script
136da65381 GIT_SILENT Sync po/docbooks with svn 2024-02-11 01:21:13 +00:00
Tobias Fella
b909cb2db8 Fix AudioDelegate playback 2024-02-10 17:22:09 +01:00
James Graham
3a4b531edf Remember Space
Save the last space entered so it can be recalled on startup
2024-02-10 14:51:57 +00:00
James Graham
413453dd85 Improve getBody
Create basic event types so that we can switch on type for live location beacons, widget and server acl events
2024-02-10 14:24:30 +00:00
Tobias Fella
fe52d26f05 Run qmlformat over everything 2024-02-10 12:06:08 +01:00
l10n daemon script
6029c0d0b3 GIT_SILENT Sync po/docbooks with svn 2024-02-10 01:28:07 +00:00
Heiko Becker
12bfe9d6ca GIT_SILENT Update Appstream for new release
(cherry picked from commit 0cd0a6a672)
2024-02-10 00:24:47 +01:00
l10n daemon script
dd910f2856 GIT_SILENT Sync po/docbooks with svn 2024-02-09 01:22:35 +00:00
l10n daemon script
b4e0d9e996 GIT_SILENT Sync po/docbooks with svn 2024-02-07 01:16:46 +00:00
l10n daemon script
d3f691548c GIT_SILENT Sync po/docbooks with svn 2024-02-06 01:30:50 +00:00
James Graham
367131d64c Fix layoutTimer
Only change the room when a space is change rather than on all layout refreshes
2024-02-05 17:48:04 +00:00
l10n daemon script
2895b7bc21 GIT_SILENT Sync po/docbooks with svn 2024-02-05 01:26:55 +00:00
James Graham
f9cdd55a4d Support the order parameter in m.space.child events
Support the order parameter in m.space.child events, with the exception of always putting spaces higher than non-spaces

see https://spec.matrix.org/v1.8/client-server-api/#ordering-of-children-within-a-space for the spec algorithm
2024-02-04 19:10:37 +00:00
James Graham
1854373dd6 - Low priority rooms only show highlights and mentions in the roomlist
- Muted rooms hide their bubble in the `roomlist`
- Mentions and keywords only show highlights
2024-02-04 18:05:34 +00:00
l10n daemon script
00a621a5f7 GIT_SILENT Sync po/docbooks with svn 2024-02-04 01:18:54 +00:00
l10n daemon script
f047bd797e GIT_SILENT Sync po/docbooks with svn 2024-02-03 01:21:25 +00:00
Akseli Lahtinen
777f8b4276 Use resolveResource for SpaceDrawer and RoomListPage
Fixes a bug where opening a space would not do anything due to enterRoom and enterSpaceHome missing.
2024-02-02 11:02:11 +00:00
l10n daemon script
0992b7fc93 GIT_SILENT Sync po/docbooks with svn 2024-02-02 01:17:11 +00:00
Nate Graham
b7d6208869 Revert "Compact Mode Improvements"
This reverts commit fb3b1490a9.

BUG: 480504
2024-02-01 08:45:01 -07:00
l10n daemon script
da4ce27168 GIT_SILENT Sync po/docbooks with svn 2024-02-01 01:17:48 +00:00
James Graham
4746401bec Change the behaviour when clicking on a space
- When click on a space the space home page is shown, unless the current room is also a member of the new space
- When changing to friends or global the first is entered
- The global now only contains rooms that are not part of a space
- Global is now home
2024-01-31 20:33:36 +00:00
l10n daemon script
79cf399bf5 GIT_SILENT Sync po/docbooks with svn 2024-01-31 01:22:04 +00:00
l10n daemon script
563323f241 GIT_SILENT Sync po/docbooks with svn 2024-01-30 01:19:27 +00:00
Tobias Fella
e2048dfa1c Revert "Add a way for distros to recommend joining a space"
This reverts commit c986c63b84.
2024-01-29 23:14:07 +01:00
Tobias Fella
c986c63b84 Add a way for distros to recommend joining a space
Implements #137
2024-01-29 23:12:51 +01:00
l10n daemon script
0b3426a9b2 GIT_SILENT Sync po/docbooks with svn 2024-01-29 01:17:13 +00:00
Tobias Fella
173e507ebf Don't color usernames in state delegates
This starts to look quite messy when there are many state delegates visible
2024-01-28 18:24:23 +01:00
James Graham
fb3b1490a9 Compact Mode Improvements
Get rid of the anchors and move to layouts for th bubble and avatars.

This allows the timestamp to be fixed in compact mode so it always sits on the far right. It's also just now more compact than before.

![image](/uploads/7747a9b3f2f4cfb56a8d9b0f943a127f/image.png)
2024-01-28 17:13:23 +00:00
James Graham
48502480df Fix copying selected text from a message 2024-01-28 01:40:10 +00:00
l10n daemon script
efb3b8f38c GIT_SILENT Sync po/docbooks with svn 2024-01-28 01:19:49 +00:00
l10n daemon script
f185b1773c GIT_SILENT Sync po/docbooks with svn 2024-01-27 01:18:13 +00:00
James Graham
95fff4c9f7 Refactor EventHandler
Refactor EventHandler to be a Q_GADGET and create from a constructor
2024-01-26 17:17:53 +00:00
James Graham
27662f9a4a MessageSource Line Numbers
Create a model for getting line numbers from a QQuickTextDocument and then add them to the MessageSource page
2024-01-26 15:58:12 +00:00
l10n daemon script
f9f678a801 GIT_SILENT Sync po/docbooks with svn 2024-01-26 01:19:44 +00:00
l10n daemon script
8e07e7553a GIT_SILENT Sync po/docbooks with svn 2024-01-25 01:16:35 +00:00
James Graham
bb566e3c7b Always use resolveResource instead of enterRoom or EnterSpaceHome 2024-01-24 20:26:21 +00:00
James Graham
35c68a6de1 Manual friend ID
Add manual ID dialog to the friend search page
2024-01-24 19:56:52 +00:00
l10n daemon script
7fd8394253 GIT_SILENT Sync po/docbooks with svn 2024-01-24 01:17:22 +00:00
Tobias Fella
c54a447caf Add appstream developer tag and remove developer_name tag 2024-01-23 22:42:36 +01:00
l10n daemon script
61b009422d GIT_SILENT Sync po/docbooks with svn 2024-01-23 01:18:48 +00:00
l10n daemon script
5a8b0184ea GIT_SILENT Sync po/docbooks with svn 2024-01-22 01:29:04 +00:00
James Graham
f48c2a21d9 Autosearch
Make the user search automatically. This includes a timer to ensure that we aren't constantly pinging the server as the user types, the search is started 0.5s after the user stops typing. The `PublicRoomListModel` is upgraded to work in the same manner as it was architected slightly differently.
2024-01-21 11:24:40 +00:00
l10n daemon script
538cfbee8d GIT_SILENT Sync po/docbooks with svn 2024-01-21 01:17:19 +00:00
James Graham
7666f1c362 Fix the vertical alignment of the notification bubble text 2024-01-20 19:07:27 +00:00
James Graham
4b5d828bf8 The search for friendship
Add the ability to search in the user directory for friends.

This adds an option in roomlist when on the friends tab and opens a search dialog when clicked. The new search model searches the user directory for the given filter term.
2024-01-20 16:13:49 +00:00
Tobias Fella
4bd160cceb Remove workaround for QTBUG 93281
Seems to no longer be required
2024-01-20 16:13:13 +00:00
Joshua Goins
5f56fc1156 Add icon for notification state menu
In Qt6 we can (finally) add icons to QQC Menus!
2024-01-20 13:47:17 +00:00
l10n daemon script
72a2a74395 GIT_SILENT Sync po/docbooks with svn 2024-01-20 01:17:30 +00:00
James Graham
f6a5cc7c25 Generic Search Page
Pull the generic aspects from Room search and join room pages into it's own component. This is done in anticipation of using the new generic search page for a user search functionality.

- `SearchPage` is now used for the generic version with the old one being renamed `RoomSearchPage`
- `JoinRoomPage` is renamed to `ExploreRoomsPage` inline with everywhere else in NeoChat

There is also some cleanup of the code for both search pages in here.
2024-01-19 17:59:45 +00:00
l10n daemon script
80f3bd64b6 GIT_SILENT Sync po/docbooks with svn 2024-01-18 01:18:17 +00:00
Joshua Goins
1f69a96766 Hide the subtitle text for room delegates if there is none
This centers the room name label for room list items, which looks a bit
cleaner than nothing being there at all.
2024-01-17 17:29:57 +00:00
James Graham
f963e06983 Remove the option to merge the room list 2024-01-17 16:58:51 +00:00
l10n daemon script
e6980e2370 GIT_SILENT Sync po/docbooks with svn 2024-01-17 01:19:30 +00:00
James Graham
8e8105d04d Clip QuickSwitcher
Clip QuickSwitcher to stop the delegates overlapping the dialog
2024-01-16 20:08:53 +00:00
Ingo Klöcker
21d9e69712 Require master of ECM
We need the fix for APK packaging with Android NDK r25
2024-01-16 13:57:33 +01:00
l10n daemon script
e0783a3c6e GIT_SILENT Sync po/docbooks with svn 2024-01-16 01:19:20 +00:00
l10n daemon script
3b9337d2a8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-01-16 01:12:42 +00:00
James Graham
85cda8ffa7 Current Room Messages
Make sure that message delegates are getting the room object directly rather than requiring the assumption that currentRoom is declared somewhere higher up.
2024-01-15 19:47:50 +00:00
l10n daemon script
f1efc1f17d GIT_SILENT Sync po/docbooks with svn 2024-01-15 01:19:09 +00:00
James Graham
0486fa61cd NeoChatConnection signals
Move the signal connects to a function and call from both constructors
2024-01-14 12:25:53 +00:00
Joshua Goins
2247a2a7af Make the search message dialog header way prettier, like it is in KCMs
I think I've heard of this before...
2024-01-14 01:36:59 +00:00
Joshua Goins
08a0fbfd6b Add missing thread roles in SearchModel
This fixes the message search so it works again!
2024-01-14 01:34:43 +00:00
l10n daemon script
898b993b94 GIT_SILENT Sync po/docbooks with svn 2024-01-14 01:30:05 +00:00
James Graham
77e366b179 Why can't we be friends
Update the UX to refer to structure direct chats as friends. The direct chats are pulled into their own tab in the space drawer.

The `UserDetailDialog` is also updated to check whether a direct chat already exists and if not ask to invite as friend.

![image](/uploads/67f13fa8558e704e0acaf7c60e135bbc/image.png)
2024-01-13 21:38:43 +00:00
Tobias Fella
981edc9cf7 Refactor proxy configuration and move to separate file 2024-01-13 17:39:56 +01:00
Tobias Fella
d45aa14348 Refactor some code around connection handling 2024-01-13 13:00:29 +00:00
Tobias Fella
4926488d49 Move notifications button to space drawer.
Since this means that the space drawer can no longer be hidden when there are no spaces,
also make it less empty by adding a button for creating new spaces.
More things will come in the future.

BUG: 479051
2024-01-13 11:28:25 +01:00
l10n daemon script
dcc1935150 GIT_SILENT Sync po/docbooks with svn 2024-01-13 01:24:17 +00:00
Tobias Fella
55364a8eb8 Add basic Itinerary integration
After downloading a file, the model calls the extractor and uses the
JSON to show some basic information about the content and allows to import
the data to Itinerary. This is entirely runtime-optional; no build-time dependencies
are required and nothing changes if the extractor isn't available.
2024-01-12 21:00:14 +00:00
Tobias Fella
70bb06715f Don't crash when calling directChatRemoteUser in something that isn't a direct chat
Can happen e.g. in gammaray
2024-01-12 16:32:49 +01:00
James Graham
ec4aa73e37 Readonly Room
Add readonly property to a room and use it to decide whether to show chatbar, replies and edits

BUG: 479590
2024-01-12 01:59:09 +00:00
Albert Astals Cid
c1d122a717 GIT_SILENT Upgrade release service version to 24.04.70. 2024-01-11 21:36:24 +01:00
Yifan Zhu
f75c194e7c Call signals instead of signal handlers
Directly calling signals is the supported way to send signals.
Calling signal handlers worked in the past, but will be phased out in
the future (https://bugreports.qt.io/browse/QTBUG-120573).
2024-01-11 17:23:08 +00:00
Tobias Fella
ecf93de006 Update copyright year 2024-01-11 18:21:44 +01:00
l10n daemon script
7feb02c7d8 GIT_SILENT Sync po/docbooks with svn 2024-01-11 01:17:30 +00:00
Hannah von Reth
0764fe0dd9 Use craft default targets 2024-01-10 11:47:48 +00:00
Hannah von Reth
50a7138633 Add craft ci targets 2024-01-10 11:47:48 +00:00
l10n daemon script
96a477f91c GIT_SILENT Sync po/docbooks with svn 2024-01-10 02:13:57 +00:00
Tobias Fella
5a6b0f756d Remove broken network error checks
Fixes #529
2024-01-09 19:59:23 +01:00
l10n daemon script
dbbf975f7a GIT_SILENT Sync po/docbooks with svn 2024-01-09 02:10:55 +00:00
l10n daemon script
e06c2d2f93 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2024-01-09 02:06:01 +00:00
Albert Astals Cid
5dea17b616 GIT_SILENT Upgrade release service version to 24.01.90. 2024-01-09 00:47:19 +01:00
Tobias Fella
63b6d7ebe0 Remove unused includes 2024-01-08 20:41:59 +01:00
l10n daemon script
652106e6a1 GIT_SILENT Sync po/docbooks with svn 2024-01-08 02:16:01 +00:00
Joshua Goins
3e158b3e60 Stop log spam because subtitleText was called without a valid event
It's up to the call site to check if the event is valid before calling
this function, and it prevents tons of log spam because we didn't check
yet.
2024-01-07 21:43:26 +00:00
Tobias Fella
b9ec33dd94 Remove activeConnection from Config
It's not used anymore
2024-01-07 21:25:55 +01:00
Tobias Fella
69bd1202ba Remove another comment 2024-01-07 21:20:04 +01:00
Tobias Fella
f75c09e130 Remove comment 2024-01-07 21:19:25 +01:00
Tobias Fella
683d216f44 Mark ReactionModel as uncreatable 2024-01-07 19:47:19 +01:00
Tobias Fella
c10bcf1764 Move userConsentRequired to NeoChatConnection 2024-01-07 19:44:37 +01:00
Tobias Fella
9e2bf0da26 Port away from Controller::saveWindowGeometry 2024-01-07 19:39:18 +01:00
James Graham
51f7de117d Refactor LinkPreviewer
Refactor `LinkPreviewer` to take an event and put the functions for getting the link in the class itself. This means the functions in `EventHandler` are no longer required.

This mr also sets up `LinkPreviewer` so that it is automatically updated when an event is edited. This includes changing the link if edited, and it can handle a message having a previous link removed or a one added when one didn't exist before.

Also adds test suite.
2024-01-07 18:07:13 +00:00
Tobias Fella
f361f4e2d8 Don't always html-escape user-specified input when serializing a state event body
We don't want this for the room list subtitle
2024-01-07 16:12:45 +00:00
l10n daemon script
acfb5ab834 GIT_SILENT Sync po/docbooks with svn 2024-01-07 02:42:26 +00:00
James Graham
8bc4500ce1 Fix by allowing RoomPage to access the interactive property of the timeline 2024-01-06 19:49:20 +00:00
Joshua Goins
b96d3dde46 Remove useless interactive set when maximizing images
This doesn't seem to do anything, and it's not easy to turn it back when
the popup is closed
2024-01-06 19:49:20 +00:00
James Graham
fad381c36f Refactor reactions
Currently we effectively create the reactions list in EventHandler then pass that data into a model. This reworks the model so that we just pass in a room and an event and it grabs it's own data. This means that:
- the functions in event handler are no longer required
- the model can update itself to add/remove reactions so no need to handle that in MessageEventModel
- MessageEventModel only needs to create new ReactionModels or remove old ones when no reactions exist anymore

A basic test suite has also been created for the ReactionModel
2024-01-06 17:50:32 +00:00
Tobias Fella
ad083f64b1 Ensure that only one RoomManager exists 2024-01-06 17:46:28 +01:00
Tobias Fella
5c78b23cc2 Slightly fix QML formatting 2024-01-06 17:34:56 +01:00
Tobias Fella
2202063641 Remove stray console log 2024-01-06 17:34:10 +01:00
Tobias Fella
5be15ffa6a Show user display names as plaintext in InviteUserPage 2024-01-06 17:33:39 +01:00
Tobias Fella
a0bafe53a0 Use Plaintext for user displaynames in startchatpage 2024-01-06 17:31:57 +01:00
l10n daemon script
1a39ce9585 GIT_SILENT Sync po/docbooks with svn 2024-01-06 02:11:50 +00:00
Tobias Fella
4a809d57f7 Fix crash when accepting/declining already accepted/declined invite
BUG: 475502
2024-01-05 14:16:21 +01:00
l10n daemon script
c01e42c972 GIT_SILENT Sync po/docbooks with svn 2024-01-05 02:13:27 +00:00
l10n daemon script
6c56f7f4ef GIT_SILENT Sync po/docbooks with svn 2024-01-04 02:16:55 +00:00
l10n daemon script
6d8d5a82c2 GIT_SILENT Sync po/docbooks with svn 2024-01-03 02:14:00 +00:00
Nicolas Fella
daa27b0333 Fix Android build 2024-01-03 01:40:14 +01:00
Nicolas Fella
f6edf0e4cc Add missing include 2024-01-03 01:29:07 +01:00
James Graham
356e8eefe0 Refactor PollHandler
Refactor PollHandler to make it more reliable. This ended up with much more code than I expected as the original intent was just to stop a crash when switching rooms.
- Using a event string was flaky, changing to using an event reference is more reliable.
- Since we're only creating them from NeoChatRoom there is no need to to be able to set properties from QML so only read properties.
- Pass from the MessageEventModel rather than an invokable method.
- Create a basic test suite
- Create properties in PollHandler to remove the need to use content in PollDelegate, this means content is no longer a required role.
2024-01-02 21:22:08 +00:00
Laurent Montel
7ad362225f Use --socket=fallback-x11 in .flatpak-manifest.json 2024-01-02 17:59:31 +01:00
Tobias Fella
d623a8c826 Don't HTML-escape invite notification title 2024-01-02 07:48:52 +00:00
l10n daemon script
b3f0d110d9 GIT_SILENT Sync po/docbooks with svn 2024-01-02 02:09:10 +00:00
James Graham
612b5d7f47 Move all the enums for push rules into their own header file 2024-01-01 16:15:40 +00:00
James Graham
7e9f206348 Clear the emoji picker search when the dialog is closed
Clear the emoji picker search when the dialog is closed

BUG: 472873
2024-01-01 16:15:29 +00:00
l10n daemon script
d5f4a3dd64 GIT_SILENT Sync po/docbooks with svn 2024-01-01 02:13:41 +00:00
James Graham
e807ad9908 Improve the unread marker behaviour
The fixes include:
- improving the timer to make it more reliable
- making sure a read marker is added when changin rooms, this is needed when the messages have already been loaded.
- increase the default timer to 10s to avoid the read marker disappearing and being re-added when a message arrive in quick succession. 

BUG: 465300
2023-12-31 17:47:27 +00:00
Tobias Fella
2d8ad834a7 Fix showing stickers 2023-12-31 18:15:43 +01:00
l10n daemon script
d82dfc7a5b GIT_SILENT Sync po/docbooks with svn 2023-12-31 02:43:10 +00:00
l10n daemon script
1e1e54d4bd SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-12-31 02:27:14 +00:00
l10n daemon script
9043b1c7a1 GIT_SILENT made messages (after extraction) 2023-12-31 01:54:25 +00:00
Tobias Fella
0739f4c661 Re-Enable Flatpak CI 2023-12-27 22:00:29 +00:00
James Graham
29321aeaf3 WindowController test
Create a WindowController test suite.

Also make sure that the class handles m_window being nullptr.
2023-12-24 15:37:56 +00:00
l10n daemon script
9fe44515a7 GIT_SILENT Sync po/docbooks with svn 2023-12-24 02:48:11 +00:00
Tobias Fella
4c3d7ab011 Move Controller::toggleWindow to WindowController 2023-12-23 14:50:36 +00:00
Tobias Fella
d02eee6daa Port away from and remove Controller::initiated 2023-12-23 13:39:41 +00:00
Tobias Fella
a613baa148 Don't crash when invited room doesn't have member state for the current room
This smells illegal, but nothing stops a server from sending that to us so we shouldn't crash.

BUG: 478903
2023-12-23 11:55:22 +00:00
James Graham
4e141e05f0 Cleanup leftover issues from moving ReplyComponent away from GridLayout
Cleanup leftover issues from moving ReplyComponent away from GridLayout.
- Remove leftover GridLayout properties or references to them or convert as required
- Remove unneeded Item wrapper
2023-12-23 11:37:01 +00:00
l10n daemon script
134f1d2ae5 GIT_SILENT Sync po/docbooks with svn 2023-12-23 02:30:01 +00:00
Tobias Fella
9ec3e5b2cc Remove more unused signals 2023-12-23 00:45:00 +01:00
Tobias Fella
15d066b3ed Remove unused variable 2023-12-23 00:39:08 +01:00
Tobias Fella
7694f6c464 Remove unused signal 2023-12-23 00:36:53 +01:00
Marius P
46da4f9777 org.kde.neochat.appdata.xml use https://bugs.kde.org/enter_bug.cgi?product=NeoChat
https://github.com/ximion/appstream/docs/xml/metainfo-component.xml says
"bugtracker - Should point to the software's bug tracking system,
for users to report new bugs.".
2023-12-22 13:10:55 +00:00
l10n daemon script
44e0ef43ac GIT_SILENT Sync po/docbooks with svn 2023-12-22 02:23:21 +00:00
l10n daemon script
5b79371c0a GIT_SILENT made messages (after extraction) 2023-12-22 01:39:20 +00:00
Joshua Goins
3caa5ad2ed Prevent KUnifiedPush-activated daemon from sticking around forever
Erroneous activations of the D-Bus service could cause the daemon to be
launched without any messageReceived signals being called (which then
hooks up the notifications to quit the app.) Now there's a five-second
timeout to prevent it from living too long.
2023-12-21 19:41:41 +00:00
l10n daemon script
a74d78439c GIT_SILENT Sync po/docbooks with svn 2023-12-21 02:47:51 +00:00
l10n daemon script
0b82aeb5cc GIT_SILENT Sync po/docbooks with svn 2023-12-19 02:13:10 +00:00
Albert Astals Cid
bc7aa4e272 GIT_SILENT Upgrade release service version to 24.01.85. 2023-12-18 23:19:45 +01:00
Akseli Lahtinen
d1f421994d Add config import to ReactionDelegate
Forgot to add this in https://invent.kde.org/network/neochat/-/merge_requests/1484
2023-12-18 21:16:47 +00:00
Carl Schwan
b043cbedc9 Make BanSheet frameless
Similar to https://invent.kde.org/network/neochat/-/merge_requests/1487
2023-12-18 19:24:31 +00:00
Carl Schwan
5a469ed126 Make ReportSheet frameless
Similar to https://invent.kde.org/network/neochat/-/merge_requests/1487
2023-12-18 16:45:34 +00:00
Akseli Lahtinen
8d209a5424 Make it easier to spot reaction buttons
In dark themes it can be very hard to spot the reaction
buttons when using compact mode. 

Before:

![image](/uploads/f499f5fd16be353c5fef9b1a08e99522/image.png)

After:

![image](https://invent.kde.org/network/neochat/uploads/86e6cecc546d73481dff79debdcadc3f/image.png)

Also this uses the given colorscheme so it will work everywhere 😄
2023-12-18 16:23:00 +00:00
l10n daemon script
a0937bdcac GIT_SILENT Sync po/docbooks with svn 2023-12-18 02:46:11 +00:00
Carl Schwan
df4eba0191 Make the RemoveSheet frameless 2023-12-17 22:26:05 +00:00
l10n daemon script
9f83cf1c52 GIT_SILENT Sync po/docbooks with svn 2023-12-17 02:11:31 +00:00
James Graham
ddc0bfe786 Make sure that a nullptr connection is not accessed in AccountEmoticonModel
I don't think it possible to open settings without an account connected anymore, however just to make sure I've made sure that a nullptr connection is handled in `AccountEmoticonsModel`.

BUG: 478024
2023-12-13 18:34:59 +00:00
l10n daemon script
09796b6e0b GIT_SILENT Sync po/docbooks with svn 2023-12-13 02:12:01 +00:00
l10n daemon script
73c34c68b7 GIT_SILENT Sync po/docbooks with svn 2023-12-12 02:14:39 +00:00
l10n daemon script
76ab96ef3e GIT_SILENT made messages (after extraction) 2023-12-12 01:37:09 +00:00
l10n daemon script
5a580dd16c GIT_SILENT Sync po/docbooks with svn 2023-12-11 02:11:45 +00:00
l10n daemon script
918887525b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-12-11 02:06:11 +00:00
l10n daemon script
500ebbecbf GIT_SILENT made messages (after extraction) 2023-12-11 01:35:18 +00:00
James Graham
8062dface6 ActionsHandler test
Add basic test suite to make sure that ActionsHandler rejects attempts to handleMessage if either m_room or chatBarCacher are nullptr.
2023-12-10 18:14:51 +00:00
James Graham
8d717b78ac Move the function to get a subtitle string to eventhandler 2023-12-10 13:19:13 +00:00
l10n daemon script
4751ac6acc GIT_SILENT Sync po/docbooks with svn 2023-12-10 02:46:07 +00:00
James Graham
1d8ffb22ee TestUtils
Create TestUtils with TestRoom and use this for all tests which require it
2023-12-09 19:32:48 +00:00
James Graham
a035d6542d Fix spoilers in roomlist subtitles
Make sure spoilers aren't revealed in SubtitleRole like in LastEventRole then remove LastEventRole because it is no longer used
2023-12-09 15:30:19 +00:00
Laurent Montel
d7230022f6 Port [=] operator 2023-12-09 15:47:26 +01:00
James Graham
d25340bc31 Fix inline custom emojis in codeblocks
Make sure that custom emojis in inline code blocks are not turned into images.

By calling preprocess text in `texthandler` the whole function can be simplified as it will now never be called on any text inside any code block (which was the reason for all the split stuff previously).

BUG: 477512
2023-12-09 14:28:00 +00:00
l10n daemon script
c396024a26 GIT_SILENT Sync po/docbooks with svn 2023-12-08 02:12:32 +00:00
James Graham
65b94890ab Add test for pending events into the MessageEventModelTest 2023-12-06 20:07:18 +00:00
l10n daemon script
682004d9a2 GIT_SILENT Sync po/docbooks with svn 2023-12-06 02:18:06 +00:00
Tobias Fella
decf797180 Don't HTML-escape display names in room list subtitles 2023-12-05 16:58:24 +00:00
l10n daemon script
552b6dd913 GIT_SILENT Sync po/docbooks with svn 2023-12-05 02:10:40 +00:00
l10n daemon script
e6358eca16 GIT_SILENT Sync po/docbooks with svn 2023-12-04 02:12:32 +00:00
James Graham
f3bacad460 Add more tests to MessageEventModelTest 2023-12-03 17:58:17 +00:00
Tobias Fella
862f4363a9 Use HTML-escaped display name in avatar tooltip 2023-12-03 16:40:09 +00:00
Tobias Fella
9b3a3dc562 Always clip roomlist
The current behavior is a leftover from some previous component
2023-12-03 14:59:08 +01:00
Tobias Fella
c2641a5fc2 Cleanup error reporting 2023-12-03 14:39:31 +01:00
Tobias Fella
1213ba5916 Don't show notifications view button when room list is collapsed
Looks broken
2023-12-03 14:23:33 +01:00
Tobias Fella
0521ff2c4d Move PasswordStatus out of Controller 2023-12-03 14:09:41 +01:00
Tobias Fella
65c892787e Don't suggest kicking or banning users with a power level too high for us to kick 2023-12-03 13:56:41 +01:00
l10n daemon script
7541c192bf GIT_SILENT Sync po/docbooks with svn 2023-12-03 02:11:34 +00:00
l10n daemon script
c692d7e679 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-12-03 02:06:11 +00:00
Joshua Goins
44a9a491af Add more missing icons on Android 2023-12-02 17:27:56 +00:00
Emir SARI
f8cae7c143 Fix i18n regression 2023-12-02 17:09:19 +00:00
Tobias Fella
4f2b559126 Show author name when previous message was deleted
This will cause the name to show up more often than necessary, but that's better than not showing it at all, which leads to messages being attributed to the wrong person.
The root cause here is a mismatch in event visibility between EventStatus::Hidden and filterAcceptsRow in MessageFilterModel, which will be fixed in a future patch.
2023-12-02 17:12:02 +01:00
James Graham
46fd288a95 Add some clarification around around offical and canonical parents 2023-12-02 13:21:26 +00:00
Joshua Goins
3a1cac6c99 Remove ffmpeg from Android build
This doesn't work on Android right now, and should allow the apk to at least launch.
2023-12-02 03:53:55 +00:00
l10n daemon script
225092a193 GIT_SILENT Sync po/docbooks with svn 2023-12-01 02:13:35 +00:00
Heiko Becker
2fcb17621c GIT_SILENT Update Appstream for new release
(cherry picked from commit 17b14aa556)
2023-11-30 18:35:03 +01:00
l10n daemon script
69e3ee862f GIT_SILENT Sync po/docbooks with svn 2023-11-30 02:08:31 +00:00
James Graham
47c12cb582 MessageEventModel test
Add basic test suite for MessageEventModel
2023-11-29 19:06:43 +00:00
l10n daemon script
94cf75af68 GIT_SILENT Sync po/docbooks with svn 2023-11-29 02:12:57 +00:00
ivan tkachenko
259b9884c7 Set WrapMode on all TextArea components, and fix up some of the Labels
Upstream styles do not provide any wrapping by default, and thus we
should not rely on deceptively convenient override in qqc2-desktop-style.

See https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/331
2023-11-28 22:26:57 +00:00
l10n daemon script
2980dc49e4 GIT_SILENT Sync po/docbooks with svn 2023-11-28 02:11:26 +00:00
Tobias Fella
5e12f50899 Wrap text in poll delegates
BUG: 477629
2023-11-27 20:44:19 +00:00
James Graham
79940f707f By default only show leave/join state events
As discussed in network/neochat#609
2023-11-27 18:15:48 +00:00
l10n daemon script
e7024a270c GIT_SILENT Sync po/docbooks with svn 2023-11-27 02:12:56 +00:00
Tobias Fella
1a561f6649 Fix linking on windows 2023-11-26 17:40:50 +01:00
Tobias Fella
2cbb6ed65c Enable windows qt6 CI 2023-11-26 15:22:26 +00:00
James Graham
ab4639926a Fix isEdit Check MessageEditComponent
Stop the console being pinged with qrc:/org/kde/neochat/qml/MessageEditComponent.qml:158: TypeError: Cannot read property 'isEditing' of undefined.

Fixes network/neochat#629
2023-11-26 15:21:18 +00:00
Tobias Fella
89b6c54f25 Fix state delegate spacing 2023-11-26 15:06:35 +01:00
James Graham
27c9c62564 ResolveResource
Use ResolveResource rather than calling individual functions like visit user and room
2023-11-26 12:23:28 +00:00
l10n daemon script
bb8ffb02d1 GIT_SILENT Sync po/docbooks with svn 2023-11-26 02:48:22 +00:00
James Graham
201aa82c04 Remove controller::joinRoom
Remove controller::joinRoom in favour of using RoomManager::OpenResource
2023-11-25 15:07:15 +00:00
l10n daemon script
704430db7a GIT_SILENT Sync po/docbooks with svn 2023-11-25 02:08:53 +00:00
Albert Astals Cid
dcbbbd9296 GIT_SILENT Upgrade release service version to 24.01.80. 2023-11-25 00:51:46 +01:00
Tobias Fella
410258c478 Join rooms when visiting them
BUG: 477261
2023-11-24 19:11:15 +01:00
Tobias Fella
6baf2e4888 Fix crash for invalid media uris
BUG: 476698
2023-11-24 18:50:30 +01:00
Tobias Fella
dd6eaac556 Don't crash when sticker pack room doesn't exist
BUG: 476923
2023-11-24 16:43:16 +01:00
l10n daemon script
840903128c GIT_SILENT Sync po/docbooks with svn 2023-11-24 02:10:11 +00:00
l10n daemon script
68f0ca96da GIT_SILENT Sync po/docbooks with svn 2023-11-23 02:13:47 +00:00
l10n daemon script
faf7af06fe GIT_SILENT Sync po/docbooks with svn 2023-11-22 02:09:37 +00:00
l10n daemon script
4ef67c3e0d GIT_SILENT Sync po/docbooks with svn 2023-11-21 02:09:50 +00:00
James Graham
5efd17d370 Loading and End of Timeline Delegates
Add delegate for showing the user a loading indicator and for the beginning of the timeline.

BUG: 455045
BUG: 465285
2023-11-20 17:10:56 +00:00
l10n daemon script
0dbef58ff2 GIT_SILENT Sync po/docbooks with svn 2023-11-20 02:44:00 +00:00
Tobias Fella
6a3df8baf4 Fix initial visual focus in welcomepage 2023-11-19 14:09:08 +01:00
l10n daemon script
2fc973f218 GIT_SILENT Sync po/docbooks with svn 2023-11-19 02:26:37 +00:00
l10n daemon script
7d16999c44 GIT_SILENT Sync po/docbooks with svn 2023-11-18 02:09:37 +00:00
Laurent Montel
f9ba31f2dc Remove unused variables 2023-11-17 10:23:58 +00:00
Laurent Montel
d4ad773ff1 Remove unused "this" argument 2023-11-17 09:36:35 +00:00
Laurent Montel
822a4dc500 Use nullptr 2023-11-17 07:34:46 +00:00
l10n daemon script
bfd1d431c1 GIT_SILENT Sync po/docbooks with svn 2023-11-17 02:12:16 +00:00
Carl Schwan
94bf2481f0 Fix spacing in login screen 2023-11-16 22:43:45 +01:00
Tobias Fella
5c32520c35 Add appium test for opening the user details sheet and fix some accessibility problems 2023-11-16 19:47:13 +01:00
l10n daemon script
de47597f6e GIT_SILENT Sync po/docbooks with svn 2023-11-16 02:21:25 +00:00
l10n daemon script
7780a72888 GIT_SILENT Sync po/docbooks with svn 2023-11-15 02:13:48 +00:00
Carl Schwan
1f8c07fedf Make room timeline non interactible
Currently trying to scroll with this scrollbar is probablematic and it's
unlikely we will find an easy solution to fix it, so make it non interactible.
2023-11-14 19:16:02 +00:00
Tobias Fella
877575b4d3 Fix kirigami name 2023-11-14 19:18:02 +01:00
l10n daemon script
1181df4db2 GIT_SILENT Sync po/docbooks with svn 2023-11-14 02:12:52 +00:00
Joshua Goins
5be2113b32 Add matrix: URL to push notifications 2023-11-13 20:02:07 +00:00
l10n daemon script
7ad7af56e8 GIT_SILENT Sync po/docbooks with svn 2023-11-13 02:12:13 +00:00
Joshua Goins
d3148f8c8b Don't start the entire NeoChat backend when receiving push notifications
This adds a dedicated "set up for push notifications only" function in
Controller, which only sets up the KUnifiedPush connector for receiving
the message and then quitting right afterward. If the user tries to
open a notification, then it will quit and open the main client.
2023-11-12 17:08:15 -05:00
Joshua Goins
100f595026 Add handler for KUnifiedPush messageReceived events 2023-11-12 21:46:33 +00:00
Joshua Goins
15ba6d58e2 Only attempt to setup push notifications on the first syncDone 2023-11-12 15:53:15 -05:00
James Graham
61ad892732 Handle multiple line names
Add function to get the display name for an author on a single line as nothing stops there being linebreaks.

BUG:476731
2023-11-12 18:46:04 +00:00
James Graham
2a3e1dfcd7 Read Marker Hidden
Only show the read marker if there is a non-hidden event earlier in the timeline

fixes network/neochat#615
2023-11-12 16:32:08 +00:00
Joshua Goins
d1dc6fc4ed Fix typo preventing APK from building 2023-11-12 15:36:38 +00:00
James Graham
6dc30a9ca7 Fix hover action position when wide
Fix the positioning of the hover actions when the window is wide by using the content x pos
2023-11-12 14:20:46 +00:00
James Graham
ae0c5ffaef Improve State Text Translatability
Make the state state strings less ambiguous for the purpose of translation.

BUG: 476358
2023-11-12 14:08:36 +00:00
Tobias Fella
fc546d4a43 Add notifications view 2023-11-12 13:16:09 +00:00
Tobias Fella
96e62e3ebe Disable system tray integration by default 2023-11-12 12:46:16 +00:00
Joshua Goins
d979cd2fbc Add Snap Store link in README 2023-11-12 04:01:26 +00:00
l10n daemon script
22298181cb GIT_SILENT Sync po/docbooks with svn 2023-11-12 02:22:14 +00:00
Tobias Fella
1312fde470 Cleanup code 2023-11-12 01:46:23 +01:00
Tobias Fella
7fe2feb1e4 Make NeoChat not shut down when disabling close-to-tray 2023-11-12 01:46:06 +01:00
Ingo Klöcker
67fb5d0824 Add option used on Binary Factory 2023-11-11 22:06:59 +00:00
Ingo Klöcker
359114bd3d Tell Craft that we need Qt 6 and master of the dependencies 2023-11-11 22:06:59 +00:00
Ingo Klöcker
3db9f1198b Add CI template for building APKs 2023-11-11 22:06:59 +00:00
Tobias Fella
2435a6b953 Fix opening account editor 2023-11-11 23:06:26 +01:00
Tobias Fella
e6c8b3fa4b Simplify some android code 2023-11-11 22:59:27 +01:00
Tobias Fella
2d55dca508 Don't allow changing the power level for users with a power level higher or equal to ours
The server won't allow it anyway
2023-11-11 18:20:54 +00:00
Tobias Fella
bbb0bc3092 Improve and fix powerlevels dialog 2023-11-11 17:37:27 +00:00
James Graham
4065aa6a2e Fix linkpreview tooltip
Fix linkpreview tooltip so that the correct text is always shown.

BUG: 467106
2023-11-11 17:29:15 +00:00
Tobias Fella
5942eac5ed Force plaintext in permissions settings 2023-11-11 18:09:03 +01:00
Tobias Fella
85c2b7dada Fix crash on shutdown 2023-11-11 16:03:35 +01:00
Carl Schwan
86ef921cdb Fix alignment user info
Otherwise we end up with two times largeSpacing as right margin for the
user info.
2023-11-11 15:40:15 +01:00
James Graham
aab69c5bae Suggested rooms spaces
Add the ability to set and show suggested rooms for spaces. 

This is just adding the basic functionality, we can do more things with it later like sort/filter the space home for example.
2023-11-11 13:32:19 +00:00
Carl Schwan
624578ec77 Improve welcome page
- Don't use card for welcome message and instead use same layout as
  kwordquiz
- Add separator between login and register button
- Add type annotation in functions
2023-11-11 13:12:56 +00:00
l10n daemon script
197ff984fd GIT_SILENT Sync po/docbooks with svn 2023-11-11 02:19:28 +00:00
James Graham
a26337d5f4 Fix ServerListModel
The server list needs to be populated on connection change as this is instantiated from QML
2023-11-10 20:32:51 +00:00
Joshua Goins
31b4eefadd Move closeDialog signal from Loading to LoginStep
This prevents errors because we try to connect to a non-existent signal
if the step is anything but Loading.
2023-11-10 18:40:37 +00:00
Joshua Goins
b8e592f8ba Fix wrong argument being passed into maximize component creation
It's supposed to refer to the attached property on QQC2.Overlay, not
QQC2.ApplicationWindow
2023-11-10 18:36:49 +00:00
Joshua Goins
555d23863e Port to QEvent::ApplicationPaletteChange
The paletteChanged on QGuiApplication is deprecated in Qt6
2023-11-10 18:30:27 +00:00
Joshua Goins
ffa2d5dc0e Fix push notification registration
Now it should regularly happen after login
2023-11-10 18:08:52 +00:00
Joshua Goins
9987edbaf2 Note that profileTag is intentionally left empty 2023-11-10 18:08:52 +00:00
Joshua Goins
d90298392d Only run setupPushNotification once for new accounts 2023-11-10 18:08:52 +00:00
Joshua Goins
600dbd0603 Remove unnecessary activeConnection() call in setupPushNotifications 2023-11-10 18:08:52 +00:00
Joshua Goins
2179e2cc35 Fix QCoro headers 2023-11-10 18:08:52 +00:00
Joshua Goins
8119ea3ccb Use auto in NeoChatConnection::setupPushNotifications 2023-11-10 18:08:52 +00:00
Joshua Goins
3fc125a798 Move push notification setup to NeoChatConnection 2023-11-10 18:08:52 +00:00
Joshua Goins
99f6778df4 Register for push notifications
This sets it up so the homeserver will give us push notifications, but
we aren't handling them yet.
2023-11-10 18:08:52 +00:00
Joshua Goins
f7bd24db34 Depend on QCoro::Network
For awaiting on QNetworkReply
2023-11-10 18:08:52 +00:00
Joshua Goins
41c2f9c4d5 Re-arrange main.cpp and add no gui option when DBus activated
We don't want the QML engine initialized at all when launching on
notifications, it'll be useless there.
2023-11-10 18:08:52 +00:00
Joshua Goins
56d5f3036b Change name of notify argument to dbus-activated 2023-11-10 18:08:52 +00:00
Tobias Fella
21bb7dce21 Fix background color of UserInfo
Previously, this would change when the window lost focus, which looks strange
2023-11-10 16:16:29 +01:00
l10n daemon script
11081719a7 GIT_SILENT Sync po/docbooks with svn 2023-11-10 02:22:55 +00:00
Joshua Goins
980de7d85d Use go.kde.org for the Matrix link, mention Matrix wiki page
I moved NeoChat up next to Element on go.kde.org, so it's good marketing
;-)
2023-11-09 16:53:36 -05:00
Joshua Goins
7735313b0c Add DBus service for NeoChat and link to KUnifiedPush if found 2023-11-09 21:40:09 +00:00
Joshua Goins
1a3055df86 Add optional KUnifiedPush dependency 2023-11-09 21:40:09 +00:00
Tobias Fella
84cad630cd Refactor and fix ChatBox layouting
BUG: 474616
2023-11-09 20:19:09 +00:00
James Graham
0beb5df08d Hide the search field for room members in a direct chat.
Hide the search field for room members in a direct chat as there are no members to search.
2023-11-09 20:11:38 +00:00
Tobias Fella
4ef44b8e93 Track online status per connection 2023-11-09 19:38:43 +01:00
l10n daemon script
59153be006 GIT_SILENT Sync po/docbooks with svn 2023-11-09 02:12:54 +00:00
l10n daemon script
50be96f762 GIT_SILENT Sync po/docbooks with svn 2023-11-08 09:27:31 +00:00
Tobias Fella
819d88e18c Assorted Qt6 android fixes 2023-11-07 23:17:38 +01:00
James Graham
dbbad2cf13 Restricted Room Security
Create the required ux to allow the restricted room security setting to be re-enabled

BUG: 471307
2023-11-07 20:43:49 +00:00
Albert Astals Cid
08b84c6592 GIT_SILENT Upgrade release service version to 24.01.75. 2023-11-07 21:11:26 +01:00
l10n daemon script
b8abf0540d GIT_SILENT Sync po/docbooks with svn 2023-11-07 03:22:56 +00:00
Tobias Fella
7f9e709559 Improve initial active connection handling
If the last active connection is not reachable (server down, keychain problems,
token revoked, etc.), NeoChat currently fails to load at all, with the only fix
being to delete a line from the config file. This is surprisingly hard to fix with
a nice UX as long as we stick to the principle of loading the user's last active
connection automatically.

This patch thus drops that principle; instead, the user is always asked to choose
the connection to continue with.
2023-11-06 12:26:25 +00:00
l10n daemon script
c4f6abee9d GIT_SILENT Sync po/docbooks with svn 2023-11-06 02:17:00 +00:00
Joshua Goins
1a4947b98a Set accessible press actions for RoomDelegate 2023-11-05 18:09:20 -05:00
Tobias Fella
6ba2b715c3 Port away from Controller::activeConnectionIndex 2023-11-05 21:03:04 +00:00
Joshua Goins
e9e1e223f7 Allow right-clicking on a room without selecting it
Same idea as the fix I did for spaces, we introduce a new signal called
selected instead of using ItemDelegate's button signals.
2023-11-05 20:43:08 +00:00
Joshua Goins
006da1fb16 Show color scheme option on Android
This works on Android now, and the rest of the code changed to enable it
anyway.
2023-11-05 20:38:33 +00:00
James Graham
3aff1795c8 Accounts Popup Close on Hide
Make sure that the accounts popup is closed when the UserInfo component is hidden
2023-11-05 19:57:15 +00:00
Joshua Goins
576b1f928f Set RoomManager connection when opening a room
This was only set for the Controller, but it needed to be set for the
RoomManager too before opening a room. This could cause NeoChat to crash
when activating a notification, for example.
2023-11-05 14:48:55 -05:00
l10n daemon script
fc3ab50701 GIT_SILENT Sync po/docbooks with svn 2023-11-05 14:37:01 +00:00
James Graham
e7fa3ad524 Explicit room parameter DirectChatDrawerHeader
Create explicit room parameter and reference it in DirectChatDrawerHeader
2023-11-05 13:49:13 +00:00
James Graham
5adffddbd8 Fix InviteUserPage
Port the InviteUserPage to Qt6 and fix close action

fixes network/neochat#614
2023-11-05 13:45:10 +00:00
Tobias Fella
1d95d5aa15 Fix Runner and MatrixImageProvider singletons 2023-11-05 14:35:28 +01:00
Carl Schwan
dabd6291a5 roomlist: Fix ListSectionDelegate usage
The default property of ListSectionDelegate is already an alias to the
RowLayout.data and trying to use RoomLayout.children didn't work as
expected.
2023-11-05 13:08:29 +00:00
Tobias Fella
0e55c3b38f Port some things away from Controller::activeConnection 2023-11-05 13:02:18 +00:00
Carl Schwan
ff4cf86ea5 Add profile picture in about data 2023-11-05 12:17:26 +01:00
l10n daemon script
f4d5ccbf12 GIT_SILENT Sync po/docbooks with svn 2023-11-05 11:14:20 +00:00
l10n daemon script
192601d358 GIT_SILENT Sync po/docbooks with svn 2023-11-05 01:41:24 +00:00
l10n daemon script
d7c432119e GIT_SILENT Sync po/docbooks with svn 2023-11-04 17:24:07 +00:00
Tobias Fella
eddb2b73c2 Use new notification action api 2023-11-04 16:18:00 +00:00
Tobias Fella
0c60bfdb83 Don't crash on quit
BUG: 474386
2023-11-04 16:03:54 +00:00
James Graham
2bfb2fa1f9 Improve ChatDocumentHandler handling of null properties
Improve ChatDocumentHandler handling of null properties
2023-11-04 14:43:31 +00:00
l10n daemon script
d1aac971bf GIT_SILENT Sync po/docbooks with svn 2023-11-04 12:51:19 +00:00
Heiko Becker
284cadf305 GIT_SILENT Update Appstream for new release
(cherry picked from commit 753e879556)
2023-11-04 12:33:19 +01:00
l10n daemon script
4697b7fcf1 GIT_SILENT Sync po/docbooks with svn 2023-11-04 02:10:15 +00:00
Tobias Fella
9f356912c9 Add placeholder message to devices page 2023-11-03 22:06:33 +00:00
Tobias Fella
1cf891f845 Fix device logout dialog 2023-11-03 22:06:14 +00:00
Joshua Goins
52e2d636b9 Adjust tests to blockquote formatting changes 2023-11-03 21:52:47 +00:00
Joshua Goins
dc6b539ddf Add somewhat better blockquote styling
Quotes are now "quoted" and also have a different background.
2023-11-03 21:52:47 +00:00
Joshua Goins
e3cf85aa8c Yank "Qt5" out of the description for libQuotient
We aren't using thr Qt5 version anymore, and it's not really a point in
describing which exact Qt version we use with libQuotient in a user
facing string like this anyway.
2023-11-03 17:39:02 -04:00
James Graham
2065eb6684 Mobile explore component
Create a mobile version of explore component and place it at the bottom for single handed use. This also refactors the UserInfo component so it can be at the top on mobile as well as the bottom on dektop.

This should have no effect on desktop and should be identical.

![image](/uploads/9b3133fbde74ca27069d6b039efb1079/image.png)
2023-11-03 17:22:57 +00:00
Tobias Fella
9cac2a8abd Delete KeywordNotificationRuleModel
It's unused
2023-11-03 17:39:10 +01:00
Tobias Fella
feb87e6f70 Show QR codes in UserDetailDialog 2023-11-03 16:23:54 +00:00
l10n daemon script
a0057b8a49 GIT_SILENT Sync po/docbooks with svn 2023-11-03 02:12:15 +00:00
Tobias Fella
dbb0269354 Fix sending locations 2023-11-02 19:46:06 +01:00
Tobias Fella
7fdb617b33 Port RoundButtons in TimelineView to FloatingButton
BUG: 476124
2023-11-02 18:15:57 +01:00
Tobias Fella
d798b0dec9 HTML-escape mentions 2023-11-02 17:04:26 +00:00
James Graham
95cf23eb5b Remove GridLayout ReplyComponent
Stop using GridLayout in ReplyComponent as they are notoriously terribleRemove
2023-11-02 17:04:18 +00:00
James Graham
7e3db20229 Remove isEdit from ChatDocumentHandler
Remove isEdit from ChatDocumentHandler as it was made redundant by the ChatCache rework.
2023-11-02 17:00:41 +00:00
Laurent Montel
12689babfb Add missing moc 2023-11-02 08:50:43 +01:00
l10n daemon script
211407da44 GIT_SILENT Sync po/docbooks with svn 2023-11-02 02:13:36 +00:00
l10n daemon script
400a84e48d GIT_SILENT Sync po/docbooks with svn 2023-11-01 02:15:14 +00:00
Tobias Fella
7a45640e5e Fix string 2023-10-31 17:13:05 +01:00
Tobias Fella
8af20885ab Add account / device security settings page 2023-10-31 14:59:08 +01:00
Tobias Fella
4033f07272 Port away from custom format* QML functions 2023-10-31 14:56:52 +01:00
Tobias Fella
5df4fa297d Move Controller::setBlur and Controller::hasWindowSystem to WindowController 2023-10-31 09:17:44 +00:00
Tobias Fella
33c5b418d2 Move Controller::openOrCreateDirectChat to NeoChatConnection 2023-10-31 09:16:59 +00:00
l10n daemon script
69d378a17b GIT_SILENT Sync po/docbooks with svn 2023-10-31 02:11:02 +00:00
Tobias Fella
f1b1b8ce53 Remove unused include 2023-10-30 21:29:44 +01:00
Tobias Fella
526d4748e0 Remove unused includes 2023-10-30 21:27:36 +01:00
Tobias Fella
c5f93adbf4 Don't percent encode job parameter 2023-10-30 20:51:44 +01:00
Tobias Fella
61630cbe90 Rename "Security.qml" to "RoomSecurity.qml" 2023-10-30 11:07:42 +01:00
l10n daemon script
8c435e9d6d GIT_SILENT Sync po/docbooks with svn 2023-10-30 02:13:41 +00:00
James Graham
57978b1a6e EventHandler Nullptr checks
So I got lazy halfway through doing this the first time.

Add missing checks for null m_room and m_event to EventHandler and add tests for them.
2023-10-29 14:51:25 +00:00
James Graham
f3c4d9449a Move remaining tests to external Json files
Title
2023-10-29 13:12:05 +00:00
James Graham
9b37777f20 Remove getUsers
Remove getUsers as it's unused
2023-10-29 13:07:45 +00:00
l10n daemon script
d6d6c161db GIT_SILENT Sync po/docbooks with svn 2023-10-29 02:23:11 +00:00
Tobias Fella
772bca5ba6 Fix sending messages that were typed before switching rooms 2023-10-28 17:21:12 +02:00
Tobias Fella
036a60a095 Don't linkify urls in code blocks
BUG: 475301
2023-10-28 16:19:32 +02:00
Tobias Fella
b3315e1ed4 Add test for bug 475301
BUG: 475301
2023-10-28 16:19:31 +02:00
Tobias Fella
d300e9cf52 Slightly reformat cmake 2023-10-28 16:18:21 +02:00
Tobias Fella
1f4bcd150f Make SectionDelegate separator thickness consistent with other Separators 2023-10-28 16:16:37 +02:00
Tobias Fella
9ad8894983 Fix connection switching 2023-10-28 15:13:22 +02:00
Tobias Fella
9e63ca5eb7 Remove ShimmerGradient
It's unused
2023-10-28 14:08:51 +02:00
Tobias Fella
ade66242bb Remove unused import 2023-10-28 13:59:23 +02:00
Tobias Fella
2c6932b4cb Fix crash when there is an empty logging category
BUG: 475248
2023-10-28 09:12:59 +00:00
l10n daemon script
5cce9e7205 GIT_SILENT Sync po/docbooks with svn 2023-10-28 02:20:45 +00:00
Tobias Fella
7dd3ad9548 Hide info banner when changing room
BUG: 476128
2023-10-28 00:21:57 +02:00
Tobias Fella
f690b76efa Fix crash for events that are not RoomMessageEvents
BUG: 476153
2023-10-27 22:11:12 +02:00
James Graham
87b8d6710e Update Kirigami PlatformTheme
Update Kirigami PlatformTheme to new path.
2023-10-27 16:13:22 +00:00
l10n daemon script
965b890346 GIT_SILENT Sync po/docbooks with svn 2023-10-27 02:16:58 +00:00
Tobias Fella
02b4e5cc70 Port away from CheckableListItem 2023-10-26 10:07:35 +00:00
Tobias Fella
410add04fb Fix subtle erroneous event casts
Sometimes, the previous code would static_cast an EncryptedEvent to a RoomMessageEvent.
This was mostly unnoticed, since the types are similar enough.
2023-10-26 10:03:09 +00:00
l10n daemon script
b575b1e700 GIT_SILENT Sync po/docbooks with svn 2023-10-26 02:27:46 +00:00
l10n daemon script
5828ee1ada SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-10-26 02:17:19 +00:00
l10n daemon script
a64c80109e GIT_SILENT made messages (after extraction) 2023-10-26 01:45:07 +00:00
Tobias Fella
de47f7f2fa Remove duplicate signal 2023-10-25 20:28:14 +02:00
Laurent Montel
19adc7b9e5 GIT_SILENT: use KLocalizedString::setApplicationDomain(QByteArrayLiteral => saving one deep data copy 2023-10-25 08:25:27 +02:00
l10n daemon script
23f60a59fe GIT_SILENT Sync po/docbooks with svn 2023-10-25 02:25:42 +00:00
l10n daemon script
946ba2e56d GIT_SILENT made messages (after extraction) 2023-10-25 01:50:11 +00:00
Tobias Fella
9dcb7b49fa Use KColorScheme 2023-10-24 07:55:01 +00:00
Tobias Fella
52f5901642 Update replacement room filtering in real-time 2023-10-24 07:51:15 +00:00
Tobias Fella
d4b4a7e1ff Only hide replaced rooms if we're joined to the replacement room 2023-10-24 07:51:15 +00:00
Tobias Fella
4449678b74 Don't abort in the message logger
Let the app do whatever it would do naturally
2023-10-24 07:32:09 +00:00
Tobias Fella
19e197e0ec Fix maps
In Qt6, Map just shows a static map, while MapView allows for zooming, moving, etc.
2023-10-24 07:08:05 +00:00
l10n daemon script
cfc5202645 GIT_SILENT Sync po/docbooks with svn 2023-10-24 02:14:54 +00:00
Tobias Fella
9b80d9e7aa Minor QML cleanup 2023-10-23 22:28:34 +02:00
Tobias Fella
dc409387bd Remove check for libQuotient 0.8 2023-10-23 22:00:34 +02:00
l10n daemon script
1e73a7bda4 GIT_SILENT Sync po/docbooks with svn 2023-10-23 02:12:23 +00:00
James Graham
ef1d62d45c ActionsHandler poperties
Make sure that all low level components get ActionsHandler through actual properties rather than magically
2023-10-22 13:39:34 +00:00
James Graham
c2d82750b1 Fix opening a room in a new window.
Fix opening a room in a new window. This is done by makeing the model top level parameters in RoomPage set from RoomManager but overwritten by RoomWindow
2023-10-22 11:57:27 +00:00
l10n daemon script
c97d276b36 GIT_SILENT Sync po/docbooks with svn 2023-10-22 02:48:07 +00:00
l10n daemon script
681a0b1e93 GIT_SILENT Sync po/docbooks with svn 2023-10-21 02:16:44 +00:00
James Graham
39556f45ab Send Threaded Messages
This MR deals with only sending threaded messages. Showing threads will turn up in a follow up. This allows you to start a new thread by clicking reply in thread to a normal message. 

You can also do a threaded reply to a threaded message in the main timeline at the moment because those messages aren't shown in a separate thread timeline yet but will be in future.
2023-10-20 17:07:09 +00:00
Joshua Goins
3c7774800a Remove now unused QDataStream operators for Emoji 2023-10-20 15:27:33 +00:00
Joshua Goins
bc7530eaa1 Store last used emojis in the state config file
Instead of crumming up the main settings file with the last used emojis,
they now live in the state (where they belong.)
2023-10-20 15:27:33 +00:00
l10n daemon script
82d11f79d6 GIT_SILENT Sync po/docbooks with svn 2023-10-20 02:11:46 +00:00
Joshua Goins
25d0368d41 Compact the event cache JSON
By default, Qt will spit out indented JSON when writing to the config
file, which is useless as it wastes space and no one will read this.
2023-10-19 20:46:17 +00:00
Joshua Goins
83b7e7d121 Use KSharedConfig::openStateConfig() instead of using a "data" file
This function will automatically create a "neochatstarerc" for us, and
KConfig will decide the best place for us to place our state. It won't
always be in AppDataLocation.
2023-10-19 20:39:07 +00:00
Tobias Fella
26fd26f9fd Enable android qt6 ci 2023-10-19 20:18:15 +00:00
James Graham
0029567c3a Reorganise HoverActions Code
Move most of the external code for hover actions into the component.
2023-10-19 19:38:57 +00:00
Laurent Montel
c7614caf41 There's no QVector anymore, QList is the QVector in Qt6 2023-10-19 13:41:46 +02:00
l10n daemon script
6571dbe554 GIT_SILENT Sync po/docbooks with svn 2023-10-19 02:14:15 +00:00
l10n daemon script
b3a29068cc GIT_SILENT Sync po/docbooks with svn 2023-10-18 02:15:55 +00:00
Tobias Fella
5adda55a85 Show rooms instead of spaces in JoinRoomPage 2023-10-17 19:14:07 +00:00
l10n daemon script
d56f0d6086 GIT_SILENT Sync po/docbooks with svn 2023-10-17 02:10:40 +00:00
Tobias Fella
60772be391 Enforce symbolic icon in ExploreComponent 2023-10-16 22:12:13 +02:00
Yuri Chornoivan
27f1679741 Fix minor typo 2023-10-16 09:27:27 +03:00
l10n daemon script
838596c3ae GIT_SILENT Sync po/docbooks with svn 2023-10-16 02:10:50 +00:00
James Graham
a57744891a ChatCache
Move the functionality to cache the contents of a chat bar from the room directly and to a new ChatCache object. This works pretty much the same with a few extra check and balances, this also made it easy to put a test suite around the functionality so I did. The current functionality should be identical to what exists.

This is in prep for threads which will require managing even more caches if we create one per thread.
2023-10-15 12:55:56 +00:00
James Graham
f5417a6227 New parent dialog
Move the add new offical parent to a dialog and make sure that the join room dialog only shows spaces.
2023-10-15 11:28:17 +00:00
l10n daemon script
ac6f9ea219 GIT_SILENT Sync po/docbooks with svn 2023-10-15 02:11:25 +00:00
Tobias Fella
4b49559d39 Fix LocationHelper registration 2023-10-14 23:38:31 +02:00
Laurent Montel
baa33f1843 Remove unused import module 2023-10-14 20:27:18 +00:00
Tobias Fella
dae5718c6c Fix broken shortcut 2023-10-14 22:18:37 +02:00
Tobias Fella
60260cff3b Fix bugs in state delegates
- Don't show a dot over profile pictures.
  The dot was intended to be part of the Avatar when there is no image and the Avatar is too small to show an icon.
  Currently, it is visible over the profile picture. If we still want the dot, it should be upstreamed

- Fix avatar images in StateComponent
2023-10-14 19:33:44 +00:00
Laurent Montel
2df9a26cdc QTLOCATION_MODULE_QML_VERSION was used during qt5/qt6 support. Now version is not necessary in qt6 2023-10-14 20:42:19 +02:00
l10n daemon script
b16cd12b33 GIT_SILENT Sync po/docbooks with svn 2023-10-14 02:21:14 +00:00
Ingo Klöcker
6a3b22ef2d Remove the obsolete x-kde-os attribute for Windows screenshots 2023-10-13 14:06:47 +00:00
Tobias Fella
b28a85ff05 Fix AboutPage 2023-10-13 15:35:39 +02:00
James Graham
e480299563 Canonical Parent
So the original space parent and child stuff was technically a bit naughty in that it allowed multiple rooms to be set as the canonical parent. Because while a room can have multiple parents only one should be canonical. This adds the following:
- When adding a child or parent there is an extra check to select if the new parent should be canonical
- Any parent can be selected as the canonical one from the room settings
- All functions ensure that there is only ever one canonical parent by ensuring all others are false when a new one is set.
2023-10-13 12:00:47 +00:00
Tobias Fella
fe70e2773f Fix logging category filtering 2023-10-13 13:42:15 +02:00
l10n daemon script
e78ea4721a GIT_SILENT Sync po/docbooks with svn 2023-10-13 02:14:45 +00:00
l10n daemon script
1699dcf0c4 GIT_SILENT Sync po/docbooks with svn 2023-10-12 02:15:09 +00:00
Rohan Kumar
9d6aef6c2b Flatpak: allow talking to org.freedesktop.secrets
Previously, kwalletd5 was hard-coded. This should allow secret service
access for users with other secret service providers.
2023-10-11 09:31:30 -07:00
James Graham
a9c2428498 Manual Explore Rooms
This is an update to searching the public room list. Currently if you can't find the room you're looking for you can type a full alias of room ID into the search bar and a view/join button appears. This is hard to discover and technically broken since it was turned into a generic component for finding rooms (it kinda works but doesn't fit now as it's focussed on the joining rooms not adding new ones to spaces). It is also not very discoverable if you don't know it's there.

This patch patch updates the workflow to be truly generic and hopefully more discoverable. Instead of using the search bar if no results are found a button asking if someone wants to manually enter a room ID or alias appears. This launches a dialog where the user can type in an alias or ID and it has some basic checking to make sure the string looks as expected.

The new functionality also generically works for joining rooms and adding children to spaces.
2023-10-11 15:53:21 +00:00
l10n daemon script
0730f15e2b GIT_SILENT Sync po/docbooks with svn 2023-10-11 02:48:51 +00:00
l10n daemon script
136856f3c3 GIT_SILENT Sync po/docbooks with svn 2023-10-10 02:20:01 +00:00
l10n daemon script
763b6af076 GIT_SILENT Sync po/docbooks with svn 2023-10-09 02:21:59 +00:00
Tobias Fella
ac231320a3 Fix closing the login dialog 2023-10-08 10:01:01 +00:00
Tobias Fella
87aee162f1 Fix logout from accounts page 2023-10-08 09:52:47 +00:00
Tobias Fella
0899db31af Fix showing logout confirmation dialog 2023-10-08 09:48:27 +00:00
l10n daemon script
b4198bc13b GIT_SILENT Sync po/docbooks with svn 2023-10-08 02:10:30 +00:00
Tobias Fella
c6bfe73d26 Don't show "No Topic" 2023-10-07 16:43:07 +00:00
Tobias Fella
d490dffa36 Fix opening encryption confirmation dialog 2023-10-07 16:26:43 +00:00
Heiko Becker
43b2b71b73 GIT_SILENT Update Appstream for new release
(cherry picked from commit ffbd92317e)
2023-10-07 18:01:42 +02:00
l10n daemon script
39a51d1f35 GIT_SILENT Sync po/docbooks with svn 2023-10-06 02:14:03 +00:00
Carl Schwan
2eb26ffbb3 Fix typo 2023-10-05 11:13:09 +02:00
Carl Schwan
87ef55215f Allow reporting others
Instead of only being able to report yourself

BUG: 475227
2023-10-05 11:02:39 +02:00
Carl Schwan
f6186aad2e Fix right clicking on chat list delegate
BUG: 475226
2023-10-05 10:59:37 +02:00
Carl Schwan
2251edbf86 Fix invalid attempt to destroy() an indestructible object 2023-10-05 10:58:00 +02:00
l10n daemon script
1c55649740 GIT_SILENT Sync po/docbooks with svn 2023-10-05 02:11:56 +00:00
l10n daemon script
aa0b6613de GIT_SILENT Sync po/docbooks with svn 2023-10-04 02:11:42 +00:00
Yuri Chornoivan
f948e813b6 Fix minor typo 2023-10-03 08:36:04 +03:00
l10n daemon script
b5c6411aad GIT_SILENT Sync po/docbooks with svn 2023-10-03 02:13:22 +00:00
James Graham
b1daa76d9f Fix image reply sizing
Use height rather than implicitHeight for the loader so that replies with images always size properly
2023-10-02 18:55:54 +00:00
James Graham
7180fa022b Room Settings Parents
Add the ability to manage parent rooms from a child, this includes:
- viewing parents
- adding a new parent
- removing an existing one

Follows the rules from the matrix spec https://spec.matrix.org/v1.7/client-server-api/#mspaceparent-relationships
2023-10-02 18:41:17 +00:00
Ingo Klöcker
17bc08270d Tag Windows screenshots with new environment attribute
appstream now officially supports an environment attribute for screenshots.
2023-10-02 19:43:56 +02:00
Tobias Fella
d4cb27eca4 Make singletons owned by the C++ side 2023-10-02 16:29:04 +00:00
Fushan Wen
541350e678 appiumtests: port away from deprecated desired_capabilities
AppiumOptions replaces it
2023-10-02 15:48:58 +00:00
l10n daemon script
843deefaf8 GIT_SILENT Sync po/docbooks with svn 2023-10-02 02:16:12 +00:00
James Graham
070d579bc2 Restore the show author functionality to bubble 2023-10-01 14:05:42 +00:00
l10n daemon script
add283c9fb GIT_SILENT Sync po/docbooks with svn 2023-10-01 02:30:40 +00:00
James Graham
fe4230b5fd Use variable placeholder instead of string concatenation 2023-09-30 10:54:07 +01:00
l10n daemon script
e8f40d98de GIT_SILENT Sync po/docbooks with svn 2023-09-30 02:13:47 +00:00
James Graham
eba62103a4 Remove Space Child
Add button to remove a child in a space if the user has the correct power levels
2023-09-29 20:15:17 +00:00
Tobias Fella
925393deab Add type registration for KeyVerificationSession 2023-09-29 19:26:41 +00:00
Laurent Montel
abe881caf7 Add missing include moc 2023-09-29 13:45:46 +02:00
Yuri Chornoivan
237a3c9dfb Fix minor typo 2023-09-29 09:08:37 +03:00
l10n daemon script
9715440854 GIT_SILENT Sync po/docbooks with svn 2023-09-29 02:10:20 +00:00
James Graham
ecdad9f965 Space Home Page
Add a space homepage with the ability to both create new room and add existing rooms to the space. This uses a tree model for the space hierarchy and will go to any number of levels. The user should only see the add options if they have appropriate permissions.

This MR also combines the create space and room pages and adds a lot of optional functionality for managing space children.

![image](/uploads/1764b0319241ff870dc39b18b39f5d51/image.png)
2023-09-28 17:36:23 +00:00
Carl Schwan
08711fc927 Fix missing renaming in roomlastmessageprovider 2023-09-28 10:38:31 +02:00
Carl Schwan
e44cd405b7 Fix import name 2023-09-28 10:31:14 +02:00
Carl Schwan
8945e004e2 Optimize room config 2023-09-28 07:37:22 +00:00
Janet Blackquill
c04d8d6f59 Redraw tray icon
It seems at some point in time the 16x16 tray icon got lost/hastily upscaled to a 22x22 tray icon,
which resulted in proportions as well as icon guidelines being slightly off.

This replaces the tray icon with a new one redrawn to adhere to icon guidelines and proportions closer
to the colour icon.
2023-09-27 23:43:55 -04:00
l10n daemon script
58a73c0208 GIT_SILENT Sync po/docbooks with svn 2023-09-28 02:11:52 +00:00
Joshua Goins
852110debd Make it clear that the session is broken when the keys are lost
If you use your private keys (like when deleting the quotient database)
your session is broken as you have differing keys on the server. While
it is possible to work your way out of it, it's better to warn users to
bite the bullet and log in again.
2023-09-27 15:13:06 -04:00
Joshua Goins
6b71d3c78d Make the key verification message horizontally centered 2023-09-27 15:13:00 -04:00
Christophe Marin
f3a0adee39 Fix manpage installation 2023-09-27 16:23:29 +02:00
l10n daemon script
6e7b6c9ce0 GIT_SILENT Sync po/docbooks with svn 2023-09-27 02:12:21 +00:00
James Graham
f67cd7deb5 Remove the now unused author ID role from MessageEventModel
Remove the now unused author ID role from `MessageEventModel`. This can be obtained from the author roles object.
2023-09-26 20:21:08 +00:00
l10n daemon script
931b4b1f9a GIT_SILENT Sync po/docbooks with svn 2023-09-26 02:22:24 +00:00
l10n daemon script
167ed4eca3 GIT_SILENT made messages (after extraction) 2023-09-26 01:46:11 +00:00
l10n daemon script
7d5b2c1b6a GIT_SILENT Sync po/docbooks with svn 2023-09-25 02:15:50 +00:00
l10n daemon script
be7b1e49b4 GIT_SILENT Sync po/docbooks with svn 2023-09-24 02:09:06 +00:00
Tobias Fella
957419070a Remove unused includes 2023-09-23 22:43:48 +02:00
Carl Schwan
f22107c8ab Colorful emoji in reaction
Use ICU to determine if the string contains only emojis
2023-09-23 22:16:11 +02:00
Tobias Fella
3a4f71de7f Port to declarative type registration 2023-09-23 14:05:50 +00:00
Tobias Fella
4ed4f3f628 Silence invalid user id warnings 2023-09-23 11:42:21 +02:00
Tobias Fella
ba24f1272f Fix crash in completion 2023-09-23 09:23:25 +00:00
Carl Schwan
443661d113 Port away from BasicListItem 2023-09-23 09:07:05 +00:00
Tobias Fella
091c8806db Fix opening account editor 2023-09-23 10:19:44 +02:00
l10n daemon script
041c719a2e GIT_SILENT Sync po/docbooks with svn 2023-09-23 02:10:02 +00:00
James Graham
83a9bfa974 Remove timeline container as it has been replaced. 2023-09-22 23:50:29 +00:00
James Graham
e35a6f7257 Remove the import version from Bubble.qml, TimelineDelegate.qml and TextDelegate.qml 2023-09-22 18:46:17 +01:00
James Graham
6d56251f6f Fix the timeline Part 2: Bubble Rework
This reworks the bubble as a separate component and makes some fixes to prevent the console being spammed with polish loop warnings.
2023-09-22 17:12:56 +00:00
l10n daemon script
486fae9c10 GIT_SILENT Sync po/docbooks with svn 2023-09-22 02:10:59 +00:00
Tobias Fella
1c26d9b811 Remove QML import versions 2023-09-21 19:38:10 +02:00
Tobias Fella
6d7ae99c94 Don't crash when editing pending message 2023-09-21 16:48:09 +00:00
Carl Schwan
442a343097 Rework context menu RoomList
- Finish port to qt6 and replace icon by icon.name
- Use RoundedItemDelegate
2023-09-21 16:43:27 +00:00
Tobias Fella
f0a7216b4b Don't crash when trying to leave empty room
BUG: 474490
2023-09-21 16:38:49 +00:00
James Graham
e926b22524 Fix the Timeline Part 1
This introduces a new base delegate that handles sizing the content of delegate in the timeline, i.e. it handles all the size helper stuff. This is then used for all the other main delegates:
- messages
- state
- read marker

This means they now all have identical base code to do the sizing (read marker still had legacy code).

Because the new base delegate is called `TimelineDelegate` both `TimelineContainer` and `MessageDelegate` have been renamed:
- MessageDelegate -> TextDelegate - this never made sense before images, videos, etc are all technically messages in Matrix parlance
- TimelineContainer -> MessageDelegate - this has always really been the base for messages

Note - this is mostly groundwork for dealing with the layout polish loop spam which will hopefully be fixed in part 2 with a bubble rework.
2023-09-21 16:26:34 +00:00
Carl Schwan
69087c2117 Add top spacing for Room ListView 2023-09-21 15:07:55 +00:00
Carl Schwan
4d2104b54b Decrease top margin in SpaceDrawer
Make it the same as the left margin of the delegate for an increased
consistency.
2023-09-21 15:07:55 +00:00
l10n daemon script
3f85a359e1 GIT_SILENT Sync po/docbooks with svn 2023-09-21 02:18:35 +00:00
ivan tkachenko
3084913940 Opt-out of Kirigami.SpellCheck when a custom QTextDocument handler is used
Uses Kirigami.SpellCheck's new shorter name.

See https://invent.kde.org/frameworks/kirigami/-/merge_requests/1261
2023-09-21 02:53:32 +03:00
Joshua Goins
e2670cd6ba Use Qt::ArrowType in FormCard.FormArrow usage on AccountsPage 2023-09-20 14:59:11 -04:00
l10n daemon script
1b6fc3dde5 GIT_SILENT Sync po/docbooks with svn 2023-09-20 02:15:06 +00:00
l10n daemon script
69a19effa2 GIT_SILENT Sync po/docbooks with svn 2023-09-19 02:17:37 +00:00
l10n daemon script
4abdf1f920 GIT_SILENT Sync po/docbooks with svn 2023-09-18 02:21:13 +00:00
l10n daemon script
0b1a6a3f6b GIT_SILENT made messages (after extraction) 2023-09-18 01:59:17 +00:00
l10n daemon script
45544c79bb GIT_SILENT Sync po/docbooks with svn 2023-09-17 02:54:29 +00:00
l10n daemon script
c4dddf6e02 GIT_SILENT Sync po/docbooks with svn 2023-09-16 02:18:05 +00:00
Tobias Fella
7f3f628b7d Fix missing connection 2023-09-15 17:41:08 +00:00
James Graham
6bf552398e Fix getting connection in message edit component 2023-09-15 18:35:23 +01:00
James Graham
78f676d71a Fix the room list menu
As title
2023-09-15 16:22:59 +00:00
James Graham
33c0cae64c Message menu rework
Rework the file menu so that it no longer relies on having a reference to the media delegate to manage a download for either opening externally or copying to clipboard. This allows the menus to be moved out of the delegates and maximize components and have them accessed through RoomManager. This reduces duplication and reduces the number of components in an already heavy delegate.
2023-09-15 13:57:40 +00:00
James Graham
14cdd096cf Fix Delegate Menu in NeochatMaximizeComponent
Make sure NeochatMaximizeComponent provides all the required properties to the delegate menu
2023-09-15 11:00:40 +00:00
James Graham
c04ddfde26 EventSource Refactor
Move showing th event source to a call to RoomManager. This means the SourceRole is no longer required in the message and search models
2023-09-15 10:54:04 +00:00
l10n daemon script
ec4c156a8c GIT_SILENT Sync po/docbooks with svn 2023-09-15 02:14:09 +00:00
Tobias Fella
17ff5b4c56 Add button to reject invitation and ignore user
BUG: 474274
2023-09-14 15:34:19 +00:00
Tobias Fella
0e2275e415 Always require passing tests 2023-09-14 10:23:52 +00:00
l10n daemon script
12fd1875b5 GIT_SILENT Sync po/docbooks with svn 2023-09-14 02:13:41 +00:00
l10n daemon script
10e50804c7 GIT_SILENT made messages (after extraction) 2023-09-14 01:54:51 +00:00
James Graham
c01c638a49 Fix file menu
Pass file menu eventSource rather than source and htmlText
2023-09-13 18:46:41 +00:00
Tobias Fella
399151eb1d Fix opening context menus 2023-09-13 15:48:39 +02:00
Tobias Fella
5e80715898 Cleanup connection handling in QML
Consistently pass connection objects to files that need them instead of randomly using Controller.activeConnection in some of them
2023-09-13 13:12:01 +00:00
Tobias Fella
6439fa48f9 Adapt to QML api changes 2023-09-13 12:57:27 +00:00
Tobias Fella
823f3cdd4e Remove QML Qt5/Qt6 compatibility hacks 2023-09-13 12:57:27 +00:00
Tobias Fella
f542d0b9fd Change rowStride in runner to qsizetype 2023-09-13 14:53:07 +02:00
Tobias Fella
a43990559b Rename source property of MessageDelegateContextMenu
Starting with Qt6.6, this collides with a FINAL property of Loader and thus doesn't run
2023-09-13 14:16:48 +02:00
Tobias Fella
feb2dbc9fb Don't try finding KStatusNotifierItem on android 2023-09-13 12:05:40 +00:00
Tobias Fella
f299d5a245 Fix KF6 crash in emoji completion 2023-09-13 13:41:08 +02:00
Tobias Fella
d69b8fbf8c Fix compilation on FreeBSD 2023-09-13 13:27:33 +02:00
Tobias Fella
234e5c49c4 Re-enable FreeBSD CI
Was accidentally disabled during a merge
2023-09-13 13:23:45 +02:00
Tobias Fella
cee72b6d48 Remove Qt5 compatibility ifdefs 2023-09-13 11:16:02 +00:00
Tobias Fella
539fdcaf2e Remove compatibility with Qt5 in CMake 2023-09-13 11:09:41 +00:00
Joshua Goins
32b3861c3e Only show the "View Source" message action when dev tools are enabled
This is a very developer-oriented action, and other uses of this dialog
(such as interacting with room state events under a room debug page) is
also locked behind this option.
2023-09-13 07:12:18 +00:00
l10n daemon script
f1076a5ced GIT_SILENT Sync po/docbooks with svn 2023-09-13 02:24:16 +00:00
Joshua Goins
bf8f5705d0 Fix message event source dialog not showing any data 2023-09-12 17:10:23 -04:00
Tobias Fella
2656a93ee7 Disable Qt5 CI 2023-09-12 15:39:25 +00:00
l10n daemon script
cbab810a2e GIT_SILENT Sync po/docbooks with svn 2023-09-12 01:47:54 +00:00
Tobias Fella
e78dfaec34 Use view background color for SpaceDrawer 2023-09-11 20:20:49 +00:00
ivan tkachenko
3cfa773820 Settings: Port to AvatarButton and fix OpenFileDialog lifespan
The dialog won't show again after being closed first time, so we need
to dynamically destroy it on both accept and reject. It helps clear out
any state on its way.
2023-09-11 22:47:33 +03:00
Tobias Fella
94c0e8b6cd Port ChatBar actions to Button
Cleans up the code and improves accessibility
2023-09-11 19:23:13 +00:00
Tobias Fella
35b1f24cb7 Fix roomlist when switching accounts
Fixes #605
2023-09-11 19:03:30 +00:00
Tobias Fella
de3072125e Change all remaining QML file ids to "root" 2023-09-11 20:47:32 +02:00
Tobias Fella
f7d2ffac66 Move Controller::createRoom and Controller::createSpace to NeoChatConnection 2023-09-11 17:55:52 +00:00
James Graham
ff0990bb7c Emit Room Selected from JoinRoomPage
Change the `JoinRoomPage` so that it emits a `roomSelected` signal with the selected delegate's info instead of calling the functions to join or enter the room itself. This is so that the `JoinRoomPage` can be used for other purposes like selecting an existing child to add to a space.
2023-09-11 17:16:12 +00:00
James Graham
8285961c42 Restore compact mode background
Restore compact mode using the darker/lighter depending on color scheme background (i.e. the same as the bubble background) it broke somewhere in the refactor of roompage
2023-09-11 07:19:32 +00:00
James Graham
cd39d5b129 Shutup LinkPreviewDelegate
Make sure that the console isn't spammed having `linkpreviewer` undefined in `LinkPreviewDelegate`, even though it shouldn't ever be and I couldn't find any case where it was but my console was still intermittently getting spammed.
2023-09-11 06:27:13 +00:00
l10n daemon script
83b3fefbf5 GIT_SILENT Sync po/docbooks with svn 2023-09-11 01:48:45 +00:00
l10n daemon script
3718bd716a GIT_SILENT made messages (after extraction) 2023-09-11 00:46:51 +00:00
Akseli Lahtinen
a18257ee17 Taskbar badge highlight counter
Instead of the taskbar badge showing count for all notifications, only show the count for total highlights.
2023-09-10 20:57:39 +00:00
Laurent Montel
def46d90a8 Fix qml signal argument warning 2023-09-10 20:19:32 +02:00
ivan tkachenko
8afd7b2892 Give "+" tool button a proper a11y role and an RTL-friendly modal menu 2023-09-10 20:40:23 +03:00
ivan tkachenko
deb11367cb ChatBox: Fix jittery ChatBar
ChatBar animated its implicit height, and there is no way for us to
force it animating on integer values only. It is contained in a Layout
type, and QtQuick.Layouts are known to round up size of their items and
position them on an integer scale. All in all, is caused bottom of chat
bar (action icons row and the whole bottom edge) to flicker during
height animation.
2023-09-10 20:40:23 +03:00
ivan tkachenko
ffd1b06a82 RoomSettings: Port disabled text fields to readOnly
Improves visuals, and allows to select & copy text. Also hides Save
button when there's no chance it would get enabled.

Depends on very recently merged MR in kirigami-addons:
https://invent.kde.org/libraries/kirigami-addons/-/merge_requests/153
2023-09-10 20:40:22 +03:00
ivan tkachenko
2597f0aec9 RoomSettings: Make room avatar bigger
This is literally the page about the room, we are not short on space
here. Make it shine.
2023-09-10 20:40:22 +03:00
James Graham
33ca72efd9 Fix ImageDelegate
Restore the animated mediaInfo to eventHandler and make sure ImageDelegate uses the media helper size for the sourceSize.
2023-09-10 16:22:14 +00:00
ivan tkachenko
2fbf659eb4 RoomInformation: Fix sizing of ListView header
Header is parented to ListView's contentItem (flickable) which is
subject to padding due to vertical scrollbar.
2023-09-10 17:07:20 +03:00
Antonio Rojas
763198b2c3 Add cmake check for qtlocation QML module
So that packagers are notified that it is a dependency
2023-09-10 10:12:52 +00:00
q234 rty
50551541ed Use shortcode as a fallback for body when sending stickers 2023-09-10 09:41:46 +00:00
James Graham
323cd4962e Explore rooms page RoundedItemDelegate
Move the explore rooms page to using the new RoundedItemDelegate
2023-09-10 09:00:57 +00:00
l10n daemon script
b2f592afeb GIT_SILENT Sync po/docbooks with svn 2023-09-10 01:45:20 +00:00
Tobias Fella
f7f98c43e2 Fix fix for crash in push rules 2023-09-09 12:13:33 +00:00
l10n daemon script
06134f96eb GIT_SILENT Sync po/docbooks with svn 2023-09-09 01:46:10 +00:00
Laurent Montel
bb62849a19 Use explicit qml signal argument in ShareAction 2023-09-08 07:44:31 +00:00
Laurent Montel
d05385caed Remove unused qml module 2023-09-08 08:28:03 +02:00
l10n daemon script
209ca747b5 GIT_SILENT Sync po/docbooks with svn 2023-09-08 01:46:47 +00:00
James Graham
2c6ab498ac Event Handler
Similar to text handler, pull out the disparate array of functions which format information from an event ready for display in the UI and put in a handler class with a test suite.

requires https://github.com/quotient-im/libQuotient/pull/686
2023-09-07 19:02:50 +00:00
Laurent Montel
597633f824 Add explicit signal argument 2023-09-07 13:42:45 +00:00
Laurent Montel
65da416b8e Disable add button when text is empty 2023-09-07 08:16:02 +00:00
l10n daemon script
c528929b30 GIT_SILENT Sync po/docbooks with svn 2023-09-07 01:46:10 +00:00
l10n daemon script
8650ce1755 GIT_SILENT Sync po/docbooks with svn 2023-09-06 01:44:38 +00:00
Tobias Fella
8936b23da9 Remove "Apply" Button in security settings
It doesn't do anything. All settings are instant-apply.
2023-09-05 12:58:57 +00:00
l10n daemon script
cf72fbea2e GIT_SILENT Sync po/docbooks with svn 2023-09-05 01:45:00 +00:00
Laurent Montel
0d5929b4bc Fix enable/disable save button when image.source is empty. Otherwise it will crash 2023-09-04 19:03:06 +00:00
Ingo Klöcker
d43cc9a044 Terminate the mock server after the test 2023-09-04 17:47:34 +02:00
Ingo Klöcker
682e3967ba Increase timeout per test to 90 seconds
The Appium test (including the setup) takes more than the default 60 s.
2023-09-04 17:14:02 +02:00
Ingo Klöcker
ceebee3a56 Look for "login-server.py" next to "logintest.py" 2023-09-04 16:46:20 +02:00
Ingo Klöcker
52ab052aef Choose the Login option before trying to enter the login credentials 2023-09-04 16:11:20 +02:00
Ingo Klöcker
e6a2b2d125 Disable outdated test for now 2023-09-04 16:01:58 +02:00
Ingo Klöcker
92dadc2cc9 Use sys.executable instead of a hardcoded executable name/path of Python 2023-09-04 16:01:34 +02:00
Tobias Fella
6ca9380a51 Enable linux Qt5 CI 2023-09-04 13:12:37 +00:00
Laurent Montel
51d41ab5bf Enable "add" button only if text is not empty
=> otherwise it will report error
2023-09-04 07:24:25 +02:00
l10n daemon script
f1047fa474 GIT_SILENT Sync po/docbooks with svn 2023-09-04 01:47:23 +00:00
Tobias Fella
011b11681f Remove button to toggle search in room member list 2023-09-03 16:15:36 +02:00
Tobias Fella
8baeb236bc Remove unused signals in Controller 2023-09-03 11:32:59 +00:00
Tobias Fella
b9d173d0b5 Remove Controller::accountCount in favor of AccountRegistry::accountCount 2023-09-03 11:23:39 +00:00
Tobias Fella
3790955c56 Port CreateRoomDialog to FormCard 2023-09-03 11:15:33 +00:00
James Graham
199772a013 Room Drawer Media Tab
Add a tab bar to the room drawer which includes a new media tab in addition to the room information tab. This mr completes the architecture for adding others easily later e.g. message highlights or threads.

To put this together I had to make sure things like the menus and the maximize delegate were available to both the room drawer and page so there is some rework there to put it all together.

Wide\
![image](/uploads/b7d3a3ee00016f9ede5cf6fb93e7b40c/image.png)

Mobile\
![image](/uploads/aa02e23f79b37f6cad903d3f356e0ef4/image.png)
2023-09-03 10:25:04 +00:00
l10n daemon script
54cc3ac761 GIT_SILENT Sync po/docbooks with svn 2023-09-03 02:08:34 +00:00
Tobias Fella
1675c14c92 Port GlobalNotificationsPage to FormCard 2023-09-02 17:12:46 +00:00
James Graham
56f5ef2611 MediaSizeHelper
Create a media size helper and use it to force video and images to be the correct size even in replies.
2023-09-02 16:43:05 +00:00
Tobias Fella
7ba63eb680 Port proxy page to formcard 2023-09-02 15:59:22 +00:00
Tobias Fella
ddd690f6d5 Port DevicesPage to FormCard 2023-09-02 15:59:07 +00:00
Tobias Fella
d9dc5f48bc Port appearance settings to formcard 2023-09-02 15:58:55 +00:00
Tobias Fella
a3b40a5e6d Port devtools to FormCard 2023-09-02 15:58:37 +00:00
Tobias Fella
be71a4349b Port accounts page to formcard 2023-09-02 15:50:05 +00:00
James Graham
ede2707767 New default pushrules
Add handling for new default push rules added in 1.7 also add a generic unknown handling for if any others are added in the future so they don't appear in keywords
2023-09-02 15:48:50 +00:00
Tobias Fella
5871903529 Port CreateSpaceDialog to FormCard 2023-09-02 15:46:25 +02:00
Tobias Fella
87745c360d Port EmoticonEditorPage to FormCard 2023-09-02 11:45:14 +00:00
Tobias Fella
40d2eb5aba Port general settings page to FormCard 2023-09-02 11:45:01 +00:00
Tobias Fella
cfd9f36a97 Port NotificationRuleItem to FormCard 2023-09-02 11:42:44 +00:00
Tobias Fella
48f7e06c01 Port remaining room settings to FormCard 2023-09-02 11:42:38 +00:00
Tobias Fella
43ecd188f1 Port SonnetConfigPage to FormCard 2023-09-02 11:33:03 +00:00
Tobias Fella
063056bebd Port EmoticonsPage to FormCard 2023-09-02 11:25:32 +00:00
Laurent Montel
dfba655527 Fix missing argument signal in qml 2023-09-02 11:13:51 +00:00
Laurent Montel
23178b6224 Remove unused import qml module (scripted) 2023-09-02 11:54:28 +02:00
Tobias Fella
a9a6e31b8c Use FormCard AboutKDE 2023-09-02 07:41:41 +00:00
l10n daemon script
0afd74d96a GIT_SILENT Sync po/docbooks with svn 2023-09-02 01:50:44 +00:00
Tobias Fella
c5501f2b5d Port ColorScheme to FormCard 2023-09-01 19:19:08 +00:00
Tobias Fella
68602fc177 Port ExploreComponent actions to pageStack.pushDialogLayer 2023-09-01 19:04:56 +00:00
Tobias Fella
8ce5a57499 Remove type registration for RoomMessageEvent 2023-09-01 18:54:58 +00:00
James Graham
bf3c5708c7 Remove support streaming
Remove support streaming from video delegate as it's breaking downloads and unused
2023-09-01 17:54:37 +00:00
Tobias Fella
8359c1fe90 Only set graphics API when using Qt6 2023-09-01 16:06:00 +00:00
Laurent Montel
774121ea8c Fix qml explicit signal argument 2023-09-01 17:11:35 +02:00
Tobias Fella
370bbf8a4b Set attributes for QtWebEngine 2023-09-01 11:34:33 +00:00
Tobias Fella
4fd36fb221 Fix crash for push rules without action
@nvrwhere how much sense does this fix make? i only know that it doesn't crash anymore
2023-09-01 11:33:29 +00:00
Laurent Montel
167349b9d2 Remove unused forward declaration 2023-09-01 11:51:36 +02:00
l10n daemon script
296aa9ddad GIT_SILENT Sync po/docbooks with svn 2023-09-01 01:45:50 +00:00
Tobias Fella
94c1b67ec9 Port account editor to formcard 2023-08-31 22:02:30 +00:00
Tobias Fella
a9965acdd3 Fix compilation warning in searchmodel 2023-08-31 21:52:23 +00:00
Tobias Fella
35313271a3 Cleanup registration.h 2023-08-31 21:36:56 +00:00
Tobias Fella
e40179f641 Don't load data from invalid indices in MessageFilterModel 2023-08-31 21:28:20 +00:00
Tobias Fella
dacf3ff8a0 Fix compilation warnings in registration.cpp 2023-08-31 21:21:22 +00:00
Tobias Fella
0274d70f71 Fix connection property initialization 2023-08-31 21:16:57 +00:00
Tobias Fella
0c19052f32 Port PushNotification settings page to FormCard 2023-08-31 20:40:59 +00:00
Laurent Montel
a3423e5724 Fix warning about missing argument qml signal 2023-08-31 10:02:32 +00:00
l10n daemon script
e09f31f891 GIT_SILENT Sync po/docbooks with svn 2023-08-31 01:46:27 +00:00
Tobias Fella
e05e0f5489 Improve QML types 2023-08-30 23:04:18 +00:00
Tobias Fella
002961f638 Move jobs to individual files 2023-08-30 21:10:56 +00:00
Laurent Montel
e28419ef88 Use isEmpty() here 2023-08-30 19:29:02 +02:00
Laurent Montel
0e4df58fc9 Add missing include moc file 2023-08-30 19:20:04 +02:00
Tobias Fella
21a55885b3 Only read role names from source model when there is a source model 2023-08-30 15:21:24 +00:00
l10n daemon script
6a8ac8f6e5 GIT_SILENT Sync po/docbooks with svn 2023-08-30 01:46:13 +00:00
Tobias Fella
9fcfad7058 Fix supportStreaming in VideoDelegate 2023-08-29 20:48:02 +00:00
Tobias Fella
cfcc1756dd Implement deactivating accounts 2023-08-29 22:38:32 +02:00
Tobias Fella
e15bec2295 Introduce NeoChatConnection
Previously, some functions that conceptually belong to the connection needed to be in the Controller, since we didn't have a place to put them.
This fixes that by extending the Connection class in a similar way as we extend the Room class.
2023-08-29 20:14:44 +00:00
James Graham
9071cf827f Make sure that the event after a state event is also a state event before filtering it out. 2023-08-29 17:41:20 +01:00
Yuri Chornoivan
c7deaaba84 Fix minor typo 2023-08-29 09:52:45 +03:00
l10n daemon script
414035de8b GIT_SILENT Sync po/docbooks with svn 2023-08-29 01:44:33 +00:00
James Graham
442612d31d Merge the functionality of CollapseStateProxyModel into MessageFilterModel
Merge the functionality of CollapseStateProxyModel into MessageFilterModel there is no need for a whole separate model the filters can be combined trivialy.
2023-08-28 10:31:18 +00:00
Tobias Fella
59164d3bb2 Implement account registration
Implements #7
2023-08-28 10:05:09 +00:00
Tobias Fella
cc60dde62d Deselect space when leaving it
BUG: 473271
2023-08-28 11:47:39 +02:00
l10n daemon script
cbed8148a3 GIT_SILENT Sync po/docbooks with svn 2023-08-28 02:09:20 +00:00
James Graham
50e8b9ebf6 Visit User
Move to using visit user in all cases.
2023-08-27 19:05:55 +00:00
Nicolas Fella
f5ad2ad162 Fix enter key naviation in login flow 2023-08-27 19:32:41 +02:00
Tobias Fella
d11d6c74b3 Fix opening settings
BUG: 473789
2023-08-27 17:17:12 +00:00
James Graham
63ed69a5d4 Use updated AlbumMaximizeDelegate
Autoload is being removed so don't use it.

Requires libraries/kirigami-addons!146
2023-08-27 16:02:07 +00:00
Tobias Fella
a8aa775575 Implement message forwarding
Implements #338
2023-08-27 09:55:31 +00:00
Tobias Fella
6305359b3c Use round instead of ceil in delegatesizehelper
Fixes #592
2023-08-27 09:54:57 +00:00
Tobias Fella
7e859364af Don't show "no canonical alias" message in GroupChatDrawerHeader
The word "canonical" is confusing to average people and there isn't really a point in showing the message.
2023-08-27 09:54:41 +00:00
Tobias Fella
8abd0db012 Remove redundant NeoChatRoom::htmlSafeDisplayName 2023-08-27 09:54:28 +00:00
Tobias Fella
dbc10685f0 Port login to FormCard 2023-08-27 09:54:12 +00:00
l10n daemon script
96582a12bc GIT_SILENT Sync po/docbooks with svn 2023-08-27 01:50:22 +00:00
l10n daemon script
0ac61854bd GIT_SILENT made messages (after extraction) 2023-08-27 00:46:25 +00:00
Tobias Fella
68298f038d Fix opening report sheet 2023-08-26 19:54:45 +00:00
Tobias Fella
405fd5841a Fix opening ban sheet 2023-08-26 19:54:17 +00:00
Tobias Fella
5da9bba844 Force plain text user display name in user detail sheet 2023-08-26 19:54:06 +00:00
Tobias Fella
84373712ef Fix opening about page 2023-08-26 21:51:40 +02:00
James Graham
50f4f96341 Fix maximize component menu
Should be plainText not plainMessage
2023-08-26 19:29:11 +00:00
Tobias Fella
1b27b1a4e2 Make sure we don't load link previews when they're not enabled
Fixes #591
2023-08-26 19:28:29 +00:00
Tobias Fella
33811a4c49 Remove unused kitemmodels import 2023-08-26 21:25:09 +02:00
James Graham
43715486e5 Room Drawer Mobile
Push the room drawer as a page rather than a drawer when on mobile or the window is thin.

This also lays some foundations for having multiple different pages in the drawer by separating the room information into it's own component which could be switched out to show other things like highlights or media.
2023-08-26 08:42:39 +00:00
l10n daemon script
5c72bd4ab7 GIT_SILENT Sync po/docbooks with svn 2023-08-26 01:47:31 +00:00
James Graham
092f1be99b Further mark messages read fixes
Add a timer to lockout the scroll trigger for marking messages as read in the first second after changing room. This is because the scrollview can't differentiate between mouse scrolling and the multiple changes in scrollview that happen as the room is changed over.
2023-08-25 22:27:20 +00:00
Carl Schwan
550d55cb1a Add release note for last two version 2023-08-25 14:25:34 +02:00
l10n daemon script
e9edb61245 GIT_SILENT Sync po/docbooks with svn 2023-08-25 01:47:19 +00:00
Tobias Fella
89aae665b1 Fix reaction string 2023-08-24 17:38:17 +00:00
Carl Schwan
1e3c3dd1f4 Remove debuging value
Otherwise like of connectivity never disapear
2023-08-24 16:10:01 +02:00
Ingo Klöcker
6f4d2c0216 Add Windows-specific screenshots as screenshots with custom attribute
Instead of using translated custom values (which are not accepted by
AppStream validation) this adds the Windows-specific screenshots as
normal screenshots with custom attribute x-kde-os="windows". AppStream
validation accepts custom attributes (in fact, it ignores any attributes
other than "type").

Upstream appstream tooling will treat those screenshots as any other
extra screenshots (screenshots without type="default").
2023-08-23 15:31:47 +02:00
l10n daemon script
803cd2b4e4 GIT_SILENT Sync po/docbooks with svn 2023-08-23 01:47:24 +00:00
Carl Schwan
9f3012061d ReactionDelegate: Don't bind twice the reaction repeater model
We already are using an alias for this
2023-08-22 21:49:30 +00:00
Tobias Leupold
c1604a9c4f Trayicon tweaks
This fixes two minor inconveniences:

- When closing the chat window and re-showing it from the systray icon, the geometry was not properly restored. The window was always shown in the middle of the screen. Now, one gets the window back with it's actual last position and size.
- It is now possible to not only show the window from the systray icon, but also to close it. This is the way other chat programs do it (Kopete back in the day, Konversation, Quassel IRC etc.)
2023-08-22 20:58:04 +00:00
l10n daemon script
3c7fcee244 GIT_SILENT Sync po/docbooks with svn 2023-08-22 01:47:22 +00:00
Tobias Fella
d33a50a00d Fix json for replies 2023-08-21 19:10:15 +02:00
Tobias Fella
ed033a1c5e Raise compiler settings level to 5.105 2023-08-21 13:02:14 +02:00
l10n daemon script
2b961703ae GIT_SILENT Sync po/docbooks with svn 2023-08-21 01:46:37 +00:00
l10n daemon script
0539665779 GIT_SILENT made messages (after extraction) 2023-08-21 00:46:26 +00:00
James Graham
df127b88e6 Fix Image Replies
Make sure that the image container has it's implicit width/height set so that the correct size can always be calculated. This was breaking images that were a reply to another message (not sure if that's legal because we don't allow but other clients do because I found one).
2023-08-20 18:16:51 +00:00
Joshua Goins
27c4b57f0f Fix link to 'made for matrix' bade 2023-08-20 11:30:05 -04:00
Joshua Goins
f875a23e83 Only close the settings window if there's no accounts left 2023-08-20 15:08:57 +00:00
Joshua Goins
7f5cfbf21c Move the sign out button outside the editor, and close the dialog 2023-08-20 15:08:57 +00:00
Joshua Goins
f7c7643c1c Emit the accepted signal in the logout confirmation dialog 2023-08-20 15:08:57 +00:00
Joshua Goins
692edf52f1 Allow customizing the connection for the logout confirm dialog 2023-08-20 15:08:57 +00:00
Joshua Goins
e48cfaa41f Check if the room is valid before trying to refresh users 2023-08-20 15:08:57 +00:00
Joshua Goins
ba116460d5 Check if there's an active connection before updating notification rules 2023-08-20 15:08:57 +00:00
Joshua Goins
c71672dab3 Remove used logout dialog in main.qml 2023-08-20 15:08:57 +00:00
l10n daemon script
932ef72311 GIT_SILENT Sync po/docbooks with svn 2023-08-20 01:46:49 +00:00
l10n daemon script
7e53a2234f GIT_SILENT made messages (after extraction) 2023-08-20 00:46:36 +00:00
Joshua Goins
a0499e5140 Set sourceSize in for images, improving memory usage and smoothing
In some cases (where we don't get a thumbnail) we load the entire image,
which might be large. Even when we get a thumbnail, the smoothing we
apply doesn't get the best results and the only other option is
mipmapping which is more memory intensive - it stores progressively
smaller images but keeps all of them in memory.

Now the ImageDelegate sets the sourceSize, which helps reduce the memory
footprint (since Qt will throw away whatever parts of the image we don't
need) and makes the images look smoother when scaled. However,
AnimatedImages do not support this so this change introduces a new
property to tell if the image could possibly be animated. It will
erroneously pick up formats that could support animation (e.g. WebP) but
other image formats will still benefit so it's a net positive. The
ImageDelegate will load the correct image component depending on this
property.
2023-08-19 18:20:49 +00:00
Joshua Goins
093ef0a18c Use mxc urls for completion room avatars 2023-08-19 11:49:03 -04:00
Joshua Goins
36bf862ab9 Change the completion proxy model to filter out invalid entries
When auto-completing rooms, there may be some that do not have
canonical addresses (e.g. 1-to-1 chats). These can't be linked anyway,
so skip them and any other unlinkable entries.
2023-08-19 15:45:51 +00:00
Joshua Goins
6d8c1d0780 Fix avatar URLs for rooms
Room avatar URLs don't specify the new mxc:// format the user avatars
use, so we need to carve out a workaround for them.
2023-08-19 15:45:51 +00:00
Joshua Goins
7fe85066a4 Move attachment dialog to ChatBar, where it can actually be used
ChatBar calls to an attachDialog that never comes, so let's have them
move in together.
2023-08-19 15:23:04 +00:00
Tobias Fella
1fefa228e6 Don't check isJobPending in explore page 2023-08-19 14:08:45 +00:00
Joshua Goins
4104e10d95 Add another message when no rooms are found 2023-08-19 14:08:45 +00:00
Joshua Goins
05f3c3ee0a Make the explore page header way prettier, like it is in KCMs 2023-08-19 14:08:45 +00:00
Joshua Goins
0a1c489401 Make the explore page search loading process more obvious
Adds progress bars, lots of them! Now it's easier to tell if NeoChat is
trying it's best to load the public room list.
2023-08-19 14:08:45 +00:00
l10n daemon script
e53d63ad8b GIT_SILENT Sync po/docbooks with svn 2023-08-18 01:44:42 +00:00
l10n daemon script
78541b32f0 GIT_SILENT Sync po/docbooks with svn 2023-08-17 01:46:48 +00:00
Carl Schwan
3bd93996c0 Don't inherit color in TimelineContainer 2023-08-16 23:44:22 +02:00
Heiko Becker
61968aa475 GIT_SILENT Update Appstream for new release
(cherry picked from commit 91b5573016)
2023-08-16 23:33:49 +02:00
Joshua Goins
24d0082048 Use view-list-details instead of expand icon in room drawer 2023-08-16 20:07:46 +00:00
Joshua Goins
2980af11b0 Destroy the correct component in space list context menu 2023-08-16 20:07:46 +00:00
Joshua Goins
91d9406c38 Prevent the TapHandler in AvatarTabButton from triggering clicked()
This caused right-clicks on this component (for example, in the space
drawer) to cause clicked() to be called on the delegate.
2023-08-16 20:07:46 +00:00
Joshua Goins
280d1e38e2 Add icons to the space list context menu items 2023-08-16 20:07:46 +00:00
Joshua Goins
7b520da4b4 Prevent the chat bar from pasting a local file URL if we save the bitmap
There's no point in also putting the file:// URL, so catch the event if
saving the bitmap from the clipboard is successful.
2023-08-16 19:57:22 +00:00
Joshua Goins
419b4cea98 Ensure that the notification avatar is drawn with no pen 2023-08-16 19:46:59 +00:00
Joshua Goins
38824f30ac Further notification avatar improvements
The correct render hint is actually SmoothPixmapTransform, as
Antialiasing only matters for primitives. Also, render a white
background for potentially transparent avatars.
2023-08-16 19:46:59 +00:00
Joshua Goins
9c4d8ef823 Fix the account switcher width so it doesn't spill off the side 2023-08-16 19:39:14 +00:00
Joshua Goins
fe3bf3a638 Pick a better shadow and clean up emoji popup backgrounds
These shadows are now closer to how other popups look.
2023-08-16 19:31:07 +00:00
Joshua Goins
d678a446e2 Don't clip the emoji popups as they destroy shadows 2023-08-16 19:31:07 +00:00
Nicolas Fella
6df60a39b0 Port to KStatusNotifierItem framework 2023-08-16 11:43:56 +00:00
l10n daemon script
6f9fa76ab7 GIT_SILENT Sync po/docbooks with svn 2023-08-16 01:47:00 +00:00
Carl Schwan
6e8b0f001f Add network cache 2023-08-15 15:33:46 +00:00
l10n daemon script
0bfad95d8b GIT_SILENT Sync po/docbooks with svn 2023-08-15 01:48:13 +00:00
Tobias Fella
1b43846196 Remove obsolete quotientMinorVersion property 2023-08-14 18:05:14 +00:00
Tobias Fella
4ea183b139 Improve tooltips in chatbar 2023-08-14 07:54:47 +00:00
Tobias Fella
22fd24549b Wrap room display name in Room Drawer 2023-08-13 20:02:58 +02:00
l10n daemon script
af793fb865 GIT_SILENT Sync po/docbooks with svn 2023-08-13 01:45:51 +00:00
l10n daemon script
13414b5834 GIT_SILENT made messages (after extraction) 2023-08-13 00:46:24 +00:00
l10n daemon script
65a1df4a75 GIT_SILENT Sync po/docbooks with svn 2023-08-12 01:49:08 +00:00
l10n daemon script
d15157703a GIT_SILENT made messages (after extraction) 2023-08-12 00:46:19 +00:00
l10n daemon script
2d21330a36 GIT_SILENT Sync po/docbooks with svn 2023-08-11 01:45:25 +00:00
l10n daemon script
fbc4611d02 GIT_SILENT Sync po/docbooks with svn 2023-08-10 01:47:01 +00:00
l10n daemon script
e257865b19 GIT_SILENT made messages (after extraction) 2023-08-10 00:46:30 +00:00
James Graham
018154f555 No emoji chatbar button on mobile
Hide the emoji button in the `chatbar` and don't instantiate the dialog component on mobile. This isn't needed on mobile as the virtual keyboard can add emojis. Should also save a small amount of memory on mobile from the dialog which is normally always instantiated.
2023-08-09 18:10:53 +00:00
l10n daemon script
80a5daa1f7 GIT_SILENT Sync po/docbooks with svn 2023-08-09 01:48:44 +00:00
Carl Schwan
bf5ce049d9 Port to new settings component 2023-08-08 21:40:05 +00:00
Carl Schwan
58213ee3e6 Display big emoji correctly
We already check with a regex if the message only contains emoji so it is safe
to hardcode the font family as emoji for these messages.
2023-08-08 12:07:16 +02:00
l10n daemon script
2d1862a637 GIT_SILENT Sync po/docbooks with svn 2023-08-08 01:49:39 +00:00
Tobias Fella
67453d9fb8 Remove ifdefs for E2EE 2023-08-07 21:15:11 +00:00
Tobias Fella
3ab04583ae Force plain text in room delegate 2023-08-07 22:58:11 +02:00
l10n daemon script
794683b5d2 GIT_SILENT Sync po/docbooks with svn 2023-08-07 02:08:13 +00:00
l10n daemon script
9f7f5409bd SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-08-07 01:51:19 +00:00
l10n daemon script
7d7b9d7ae0 GIT_SILENT made messages (after extraction) 2023-08-07 00:48:50 +00:00
James Graham
c7c892c51c Fix message long press
Add a tap handler so that long press events in the text of a message can be captured. This should make mobile menus work on text messages again.
2023-08-06 17:08:46 +00:00
l10n daemon script
97903a7cb0 GIT_SILENT Sync po/docbooks with svn 2023-08-06 01:50:23 +00:00
l10n daemon script
0c8f488ac4 GIT_SILENT made messages (after extraction) 2023-08-06 00:46:42 +00:00
Tobias Fella
88368cefaa Remove leftover debug statement 2023-08-06 00:51:28 +02:00
Tobias Fella
ab4bb41979 Fix last active time in devices page 2023-08-05 20:32:47 +02:00
James Graham
c2398b19dc Fix mark all read on room change
Fix it so that the view is correctly positioned at the bottom when the room is changed and make sure this is not seen as a scroll event (i.e. messages are not automatically marked as read but the timer has to time out first and all visible on screen).
2023-08-05 17:38:21 +00:00
James Graham
4b3dac025f Declare currentRoom property
Make sure `currentRoom` is a property for every qml component where it's used in `chatbar`.
2023-08-05 16:50:06 +00:00
l10n daemon script
9eeff06328 GIT_SILENT Sync po/docbooks with svn 2023-08-05 01:46:52 +00:00
l10n daemon script
657a8291d0 GIT_SILENT made messages (after extraction) 2023-08-05 00:46:28 +00:00
James Graham
bc4431462a Chatbox id for all property refs
Change the chatbox id to root and use for all references to it properties. Using root.currentRoom is needed for the chatbar to be visible in KF6
2023-08-04 13:56:26 +00:00
l10n daemon script
fdd8a62873 GIT_SILENT Sync po/docbooks with svn 2023-08-04 01:47:18 +00:00
l10n daemon script
c164228894 GIT_SILENT made messages (after extraction) 2023-08-04 00:46:08 +00:00
Carl Schwan
7d418f0883 Shorten appstream description 2023-08-03 16:17:58 +00:00
Tobias Fella
e90aecbead Port UserDetailDialog to Kirigami.Dialog 2023-08-03 17:26:46 +02:00
l10n daemon script
221c27fbbe GIT_SILENT Sync po/docbooks with svn 2023-08-03 02:09:50 +00:00
l10n daemon script
1907404124 GIT_SILENT Sync po/docbooks with svn 2023-08-02 01:54:58 +00:00
James Graham
81e953dd8c use QTEST_MAIN 2023-08-01 15:57:58 +00:00
James Graham
9311052e39 Move polishcolor to a utils namespace and rename getusercolor 2023-08-01 15:57:58 +00:00
James Graham
648fff20f2 Updates based on comments 2023-08-01 15:57:58 +00:00
James Graham
980211f36a Remove unneeded include 2023-08-01 15:57:58 +00:00
James Graham
25e0e3fa8e Remove NeoChatUser and just use Quotient::User this simplifies things and avoids casting from one to the other which address santizer didn't like 2023-08-01 15:57:58 +00:00
l10n daemon script
403c1ed391 GIT_SILENT Sync po/docbooks with svn 2023-08-01 01:58:12 +00:00
l10n daemon script
c2f76612cf GIT_SILENT made messages (after extraction) 2023-08-01 00:46:09 +00:00
Tobias Fella
2a651b8946 Use pageStack.pushDialogLayer for devtools and inviteuser 2023-07-31 20:44:50 +02:00
Volker Krause
00c0d1c276 Add heading indicator for live locations
Heading isn't covered by any MSC so far, so that is using Itinerary's
vendor prefix for now.
2023-07-31 18:06:52 +02:00
Carl Schwan
0162d91b60 Ensure e2ee is enabled 2023-07-31 07:09:23 +00:00
Carl Schwan
5f41b7b4c1 Fix opening account menu on right click 2023-07-31 07:02:00 +00:00
l10n daemon script
d9691bac7c GIT_SILENT Sync po/docbooks with svn 2023-07-31 02:10:40 +00:00
Tobias Fella
719b916837 Add accessible name to RoomDelegate 2023-07-30 22:57:46 +02:00
Tobias Fella
f9514fe925 Add accessible name to chatbar 2023-07-30 22:57:43 +02:00
Tobias Fella
399b9e6944 Add text and tooltip to section collapse/expand button 2023-07-30 22:29:21 +02:00
l10n daemon script
00cf5c8a5b GIT_SILENT Sync po/docbooks with svn 2023-07-30 01:49:49 +00:00
l10n daemon script
02f26424e2 GIT_SILENT made messages (after extraction) 2023-07-30 00:45:54 +00:00
Tobias Fella
3bd639775a Fix room list icon size in compact room list
BUG: 472682
2023-07-29 19:00:58 +00:00
Tobias Fella
163c1ef407 Html-escape display names in state delegates 2023-07-29 15:42:53 +02:00
Tobias Fella
9997b1074a Make "Close to system tray" string more correct
BUG: 472051
2023-07-29 09:01:14 +00:00
l10n daemon script
f52a25717b GIT_SILENT Sync po/docbooks with svn 2023-07-29 01:46:50 +00:00
l10n daemon script
5746c24b73 GIT_SILENT Sync po/docbooks with svn 2023-07-28 01:55:04 +00:00
l10n daemon script
dca1b22521 GIT_SILENT made messages (after extraction) 2023-07-28 00:47:00 +00:00
l10n daemon script
b15f1461d8 GIT_SILENT Sync po/docbooks with svn 2023-07-27 01:47:22 +00:00
Joshua Goins
24fd7a0f5b Use prettier notification images
Avatars are shown rounded in the main interface, so they should look the
same in the notification tray too. On top of that, if the room is a
group then show that group's icon when applicable in the bottom right.
2023-07-26 08:31:58 +00:00
Joshua Goins
0ac3932303 Add an obvious "upload" button in the account editor
It's not obvious at first glance that you can click on the avatar in the
account editor to upload an image. This adds a new button when there is
no image uploaded.
2023-07-26 08:27:55 +00:00
Joshua Goins
807a9ee779 Fix errors preventing the avatar from being shown when uploaded 2023-07-26 08:27:55 +00:00
Joshua Goins
4f32a168cd Fix settings button tooltip 2023-07-26 02:04:24 -04:00
l10n daemon script
45d2da56c7 GIT_SILENT Sync po/docbooks with svn 2023-07-26 01:49:31 +00:00
l10n daemon script
d794e26d62 GIT_SILENT made messages (after extraction) 2023-07-26 00:46:56 +00:00
l10n daemon script
42cc42642d GIT_SILENT Sync po/docbooks with svn 2023-07-25 01:47:33 +00:00
l10n daemon script
ffd6205bd1 GIT_SILENT Sync po/docbooks with svn 2023-07-24 09:05:17 +00:00
Tobias Fella
9ba6b2f0a5 Fix clearing user search field text when switching rooms 2023-07-24 08:45:51 +00:00
Carl Schwan
f8d3e25f8e Move no connection info message to the top 2023-07-24 08:45:10 +00:00
Carl Schwan
75cd77facb Refactor completion menu
- Use new Avatar
- Use required property in delegate
2023-07-24 08:44:49 +00:00
l10n daemon script
8546d76a54 GIT_SILENT made messages (after extraction) 2023-07-24 07:34:02 +00:00
Tobias Fella
00b7f68a03 Fix nullptr check 2023-07-23 23:10:52 +02:00
Carl Schwan
b486cb905c Add back some spacing around the avatar in the timeline 2023-07-22 18:41:09 +00:00
Carl Schwan
cdd5c9f484 Fix accessibility of StartChatPage and port to new components 2023-07-22 18:41:09 +00:00
Carl Schwan
3e6c426397 Port Avatar usage in Settings KirigamiAddons 2023-07-22 18:41:09 +00:00
Carl Schwan
847f41e1ad Port most Avatar usage to new KirigamiAddons Avatar 2023-07-22 18:41:09 +00:00
Carl Schwan
ed5bb270ff Discard wrong avatar urls 2023-07-22 17:51:03 +00:00
Carl Schwan
c8b4da2b96 Scroll to top of RoomDrawer on loading of header 2023-07-22 17:50:32 +00:00
Tobias Fella
ba5445e135 Stop finding QtKeychain
Has been upstreamed to libQuotient
2023-07-22 16:14:56 +02:00
l10n daemon script
1cca39e105 GIT_SILENT Sync po/docbooks with svn 2023-07-22 01:57:06 +00:00
Carl Schwan
dbf67b984e Fix reply error message when the reply is not loaded yet 2023-07-21 11:24:10 +02:00
l10n daemon script
c9126cf38e GIT_SILENT Sync po/docbooks with svn 2023-07-21 02:04:06 +00:00
Tobias Fella
13988da4fc Add login appium test 2023-07-20 07:14:23 +00:00
Carl Schwan
0847839abc Remove hover effect on timeline events 2023-07-20 08:40:15 +02:00
Carl Schwan
6b55e502a0 Remove duplicated code in QuickSwitcher for RoomDelegate 2023-07-20 08:39:59 +02:00
Carl Schwan
8f81629ac1 Redesign room list
Use KirigamiAddons.Delegated.RoundedItemDelegate
2023-07-20 08:39:57 +02:00
Carl Schwan
7f459cb90f Redesign timeline
Remove border von bubbles and only hilight the bubble on hover
2023-07-20 08:38:51 +02:00
l10n daemon script
420e195313 GIT_SILENT Sync po/docbooks with svn 2023-07-20 01:59:01 +00:00
Carl Schwan
3263a69880 Port to KirigamAddons.Banner 2023-07-19 22:46:36 +02:00
l10n daemon script
b060881f06 GIT_SILENT Sync po/docbooks with svn 2023-07-19 02:41:03 +00:00
Tobias Fella
701e786c1f Require passing tests on windows 2023-07-18 23:23:33 +02:00
Tobias Fella
646c8ba8fe Fix opening user mentions 2023-07-18 05:54:15 +00:00
Tobias Fella
9b31fdea10 Cleanup CMake after depending on libQuotient 0.7 2023-07-18 05:26:49 +00:00
l10n daemon script
ce5dfdee16 GIT_SILENT Sync po/docbooks with svn 2023-07-18 01:55:04 +00:00
Tobias Fella
918e805718 Fix image loading in room avatars 2023-07-17 11:25:52 +00:00
Albert Astals Cid
7debf47833 GIT_SILENT Upgrade release service version to 23.11.70. 2023-07-17 12:53:16 +02:00
Tobias Fella
2c142c36e6 Remove cmake policy 2023-07-17 11:57:19 +02:00
l10n daemon script
3279142498 GIT_SILENT Sync po/docbooks with svn 2023-07-17 01:57:57 +00:00
l10n daemon script
0e08a1aa7e GIT_SILENT made messages (after extraction) 2023-07-17 00:49:09 +00:00
Laurent Montel
3855922ad2 Add explicit moc includes to sources for moc-covered headers 2023-07-16 11:08:19 +02:00
l10n daemon script
89a094ce8f GIT_SILENT Sync po/docbooks with svn 2023-07-16 01:58:12 +00:00
l10n daemon script
d4421aaecf GIT_SILENT made messages (after extraction) 2023-07-16 00:48:59 +00:00
Tobias Fella
80b451c27b Only create consent sheet if required 2023-07-15 20:52:03 +00:00
Tobias Fella
32ff22ba89 Fix most compilation warnings 2023-07-15 20:39:38 +00:00
Tobias Fella
b990e3fbcb Stop using the AccountRegistry Singleton 2023-07-15 20:31:24 +00:00
Laurent Montel
8d1baab89f Add missing explicit keyword 2023-07-15 16:01:19 +00:00
Laurent Montel
62ecbc8d6b Includes is already defined in header 2023-07-15 16:58:34 +02:00
Laurent Montel
0e1c7f8c47 Fix qml Audio/Video support in qt6 too.
in Audio qt6 we don't have autoload feature but we disable it in qt5 => it seems ok

In Video qml qt6 we don't have flushMode.
2023-07-15 12:51:13 +00:00
Tobias Fella
c963966f1d Enforce namespaced includes for libQuotient 2023-07-15 14:05:11 +02:00
Tobias Fella
8db2526153 Improve DevicesPage and DevicesModel
- Split the list into sections for "this devices", "verified devices", "unverified devices", and "devices without encryption support"
- Sort the lists by last activity
2023-07-15 13:31:28 +02:00
Tobias Fella
7587a1a418 Drop ifdefs for libQuotient 0.7 2023-07-15 09:18:05 +02:00
Tobias Fella
294812956a Require libQuotient 0.7 2023-07-15 00:53:43 +02:00
Tobias Fella
d01aac6fa3 Remove libQuotient 0.6 based CI 2023-07-15 00:53:19 +02:00
l10n daemon script
5cda1ca3ce GIT_SILENT Sync po/docbooks with svn 2023-07-14 02:01:40 +00:00
Laurent Montel
bf26a463e0 Ignore build* 2023-07-13 07:13:47 +02:00
l10n daemon script
30180c1ac8 GIT_SILENT Sync po/docbooks with svn 2023-07-13 01:56:46 +00:00
l10n daemon script
41c296061c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-07-13 01:45:17 +00:00
l10n daemon script
461420af0a GIT_SILENT made messages (after extraction) 2023-07-13 00:49:09 +00:00
Laurent Montel
052a7ed571 Ignore src/res.generated.qrc file 2023-07-12 22:28:08 +00:00
Laurent Montel
98e86f887b Adapt qml for qt5 and qt6 2023-07-12 22:28:08 +00:00
Laurent Montel
63a17b5985 Remove duplicate headers between header/cpp 2023-07-12 22:27:39 +00:00
Tobias Fella
025b367a7e Always enable E2EE in libQuotient
It's off-by-default in libQuotient 0.8
2023-07-12 22:10:37 +00:00
Laurent Montel
a8536b0634 Remove extra ; 2023-07-12 18:16:55 +00:00
Laurent Montel
0c43d3eeee Fix equal operator deprecated in c++20 2023-07-12 18:16:19 +00:00
Laurent Montel
bf1614256b Qt::AA_EnableHighDpiScaling is by default in qt6 2023-07-12 18:14:28 +00:00
Laurent Montel
99614d1b27 Use QString::isEmpty here 2023-07-12 14:27:24 +00:00
Laurent Montel
e1e57ef27a Use qt new header 2023-07-12 13:15:58 +00:00
Laurent Montel
6d45d126f8 Add explicit moc includes to sources for moc-covered headers
Add missing #pragma once + missing include

* speeds up incremental builds as changes to a header will not always
  need the full mocs_compilation.cpp for all the target's headers rebuild,
  while having a moc file sourced into a source file only adds minor
  extra costs, due to small own code and the used headers usually
  already covered by the source file, being for the same class/struct
* seems to not slow down clean builds, due to empty mocs_compilation.cpp
  resulting in those quickly processed, while the minor extra cost of the
  sourced moc files does not outweigh that in summary.
  Measured times actually improved by some percent points.
  (ideally CMake would just skip empty mocs_compilation.cpp & its object
  file one day)
* enables compiler to see all methods of a class in same compilation unit
  to do some sanity checks
* potentially more inlining in general, due to more in the compilation unit
* allows to keep using more forward declarations in the header, as with the
  moc code being sourced into the cpp file there definitions can be ensured
  and often are already for the needs of the normal class methods
2023-07-12 13:15:19 +00:00
Laurent Montel
732b43cbd6 Use const'ref 2023-07-12 11:55:50 +00:00
Laurent Montel
a5da17b000 Use explicit keyword 2023-07-12 11:49:12 +00:00
Laurent Montel
10a294f99e Fix show headers in qtc6 2023-07-12 13:17:30 +02:00
Laurent Montel
882a0d4901 Autogenerate + Install debug category file 2023-07-12 09:50:58 +00:00
Laurent Montel
506d31f53f "This" is not used 2023-07-12 09:50:41 +00:00
l10n daemon script
110f007b41 GIT_SILENT made messages (after extraction) 2023-07-12 00:47:42 +00:00
l10n daemon script
a90943d9ac GIT_SILENT Sync po/docbooks with svn 2023-07-11 01:50:22 +00:00
l10n daemon script
cbe7d8c2c2 GIT_SILENT made messages (after extraction) 2023-07-11 00:47:06 +00:00
James Graham
ae4943dd71 Use new mobileform heading
Does what is says on the tin. Use the recently merged new `MobileForm.FormHeader` component in all settings pages.
2023-07-10 16:46:35 +00:00
James Graham
7bd84bf51e Push Rule Model Rework
This is a significant rework of the handling of push rules. Rather than using a lot of boilerplate code for the default models `KeywordNotificationModel` has been converted to `PushRuleModel` and now handles all push rules.

The new model has the following features:
- Handles all push rules
- Has special handling for the names of default keywords (i.e. it still gives the same text as previously for showing in the settings menus)
- Push rules for blocking individuals or room overrides are still there but hidden so will be available for developer tools (to follow)
- Room specific keywords are now supported.

The notification settings pages have also been refactored to take advantage of the new models. Each section is now just a repeater with a filter for the rules that it should contain. The push rule delegate has now been cleaned up and uses required properties.

Implements network/neochat#574
2023-07-10 16:17:17 +00:00
l10n daemon script
a6ce44eb24 GIT_SILENT Sync po/docbooks with svn 2023-07-10 01:56:36 +00:00
Carl Schwan
b1c42c3d3d Make the whole right sidebar scrollable
The sidebar grew a lot and now contains some tools. This makes the space
left for the room members very small. Particuliary on mobile.

So make the whole sidebar contained inside the ScrollView

This also refactor a few things (e.g. use a plain ToolBar for the header)
2023-07-09 22:41:28 +00:00
Carl Schwan
213aaf3ac4 Ensure chat box and userInfo have the same height 2023-07-09 22:32:46 +00:00
James Graham
c55b40c9c6 Media Model
Create a media model for all the media message in the timeline and then setup `NeoChatMaximizeComponent` so that it can use the media model to scroll through all loaded images and video in the current room.

Depends upon libraries/kirigami-addons!105

FEATURE: 467411
2023-07-08 11:07:04 +00:00
Volker Krause
81928d8b93 Fix binary stripping of APKs with Qt 5.15.10
This fixes APKs on binary factory having exploded in size 3x-5x after
the Qt 5.15.10 update. This also affects release packages and will need
to be backported to those (in Craft).
2023-07-08 07:51:24 +02:00
Ingo Klöcker
b7bddba053 Add Windows-specific screenshots as custom values for Microsoft Store
This is an interim solution until AppStream (hopefully) gets support
for platform-specific screenshots. The captions will be extracted for
translation.
2023-07-07 15:55:11 +02:00
l10n daemon script
307a9370db GIT_SILENT Sync po/docbooks with svn 2023-07-07 01:54:27 +00:00
Volker Krause
2f65cbeb36 Show location descriptions in the timeline when available 2023-07-06 15:08:42 +00:00
l10n daemon script
e0c0b1f0e8 GIT_SILENT Sync po/docbooks with svn 2023-07-06 02:28:47 +00:00
l10n daemon script
74f767aa82 GIT_SILENT Sync po/docbooks with svn 2023-07-04 02:36:05 +00:00
l10n daemon script
7176dd4476 GIT_SILENT Sync po/docbooks with svn 2023-07-03 02:15:16 +00:00
l10n daemon script
f75fe31571 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-07-03 01:58:53 +00:00
l10n daemon script
61bdb1ed5f GIT_SILENT made messages (after extraction) 2023-07-03 00:55:03 +00:00
l10n daemon script
527e9d93a5 GIT_SILENT Sync po/docbooks with svn 2023-07-02 02:21:48 +00:00
l10n daemon script
7d22b30217 GIT_SILENT Sync po/docbooks with svn 2023-06-30 01:54:09 +00:00
Heiko Becker
c0d2333a3d GIT_SILENT Update Appstream for new release
(cherry picked from commit c72cf64369)
2023-06-30 01:16:59 +02:00
l10n daemon script
4a7e1d058c GIT_SILENT Sync po/docbooks with svn 2023-06-29 01:52:16 +00:00
l10n daemon script
66974615f6 GIT_SILENT Sync po/docbooks with svn 2023-06-28 01:55:40 +00:00
Ingo Klöcker
116c888686 Add "16:9 Super hero art" for Microsoft Store 2023-06-27 12:29:01 +02:00
Ingo Klöcker
f6d6a804d2 Add some logos in different sizes for the Microsoft Store 2023-06-27 12:28:06 +02:00
l10n daemon script
6d6d702b97 GIT_SILENT Sync po/docbooks with svn 2023-06-27 01:59:23 +00:00
l10n daemon script
9be04c1272 GIT_SILENT Sync po/docbooks with svn 2023-06-26 01:59:28 +00:00
l10n daemon script
6f5d88cf63 GIT_SILENT Sync po/docbooks with svn 2023-06-25 02:12:18 +00:00
l10n daemon script
1103e80191 GIT_SILENT made messages (after extraction) 2023-06-25 00:52:33 +00:00
l10n daemon script
a5320397c2 GIT_SILENT Sync po/docbooks with svn 2023-06-24 02:10:00 +00:00
Volker Krause
53719b971d Show a placeholder message if there are no shared locations 2023-06-22 15:17:40 +00:00
Volker Krause
64a1316f9b Zoom/center the page map so that all locations are in view 2023-06-22 15:17:40 +00:00
Volker Krause
a3b8168744 Add bounding box property for LocationsModel as well
Needed to property position the room map.
2023-06-22 15:17:40 +00:00
Volker Krause
c06e69931a Add fullscreen map to live location delegates as well 2023-06-22 15:17:40 +00:00
Volker Krause
30f8573dfc Show live location shares on the room map as well 2023-06-22 15:17:40 +00:00
Volker Krause
7f067b698e Unify map markers on the full screen and room maps as well 2023-06-22 15:17:40 +00:00
Volker Krause
b56ebdf149 Don't assert on invalid/empty geo: URIs 2023-06-22 15:17:40 +00:00
Volker Krause
a02dd4ab87 Extend LocationsModel to include asset and auther roles
Needed for compatibility with the standard map marker.
2023-06-22 15:17:40 +00:00
Volker Krause
898f0c962a Factor out map marker into its own QML element for reuse 2023-06-22 15:17:40 +00:00
Tobias Fella
5b4ae764cf Show a map for location events 2023-06-22 15:17:40 +00:00
l10n daemon script
d14db326bb GIT_SILENT Sync po/docbooks with svn 2023-06-22 01:53:18 +00:00
l10n daemon script
5c51e0d0fc GIT_SILENT Sync po/docbooks with svn 2023-06-21 01:49:24 +00:00
l10n daemon script
f78b4af692 GIT_SILENT Sync po/docbooks with svn 2023-06-19 02:05:24 +00:00
Carl Schwan
bd5ed0f46c Fix toolbar of RoomList when using font size 11px
We don't need to use a ToolBar for the titleDelegate since the
titleDelegate is already included inside a toolbar. This work magically
when using the default font size of 10px Noto Sans but breaks with 11px

BUG: 467242
2023-06-18 07:00:47 +00:00
l10n daemon script
529cfa8f7d GIT_SILENT Sync po/docbooks with svn 2023-06-18 02:44:28 +00:00
Carl Schwan
5552cd60f6 Group pageStack properties of the ApplicationWindow together 2023-06-17 21:29:15 +02:00
Tobias Fella
c51a1f4851 Fix another missing import 2023-06-17 14:32:03 +02:00
James Graham
a27f4765e4 Fix permission model
Make sure `Permissions.qml` uses the right role.
2023-06-17 09:34:42 +00:00
James Graham
402f99923c Fix NeoChatRoom type QML
Make sure import `org.kde.neochat 1.0` is included where `NeoChatRoom` is used as a type
2023-06-17 09:26:22 +00:00
l10n daemon script
2afda78912 GIT_SILENT Sync po/docbooks with svn 2023-06-17 01:53:16 +00:00
Volker Krause
25f9c7e125 Compute live location bounding box and center the map accordingly 2023-06-16 14:12:15 +00:00
Volker Krause
05082cb2bb Consider live location beacon timeouts for their 2023-06-16 14:12:15 +00:00
Volker Krause
59495a1452 Show starting live location beacons as location delegates in the timeline
Also, hide ending live location beacon state changes.
2023-06-16 14:12:15 +00:00
Volker Krause
d10460c45b Add live location tracking model
This can either watch a single live location beacon or all of those in
a given room.
2023-06-16 14:12:15 +00:00
l10n daemon script
b968c85de2 GIT_SILENT Sync po/docbooks with svn 2023-06-16 01:49:40 +00:00
l10n daemon script
13efc08b07 GIT_SILENT Sync po/docbooks with svn 2023-06-14 01:51:18 +00:00
Tobias Fella
718060c757 Re-enable accidentally disabled encryption 2023-06-13 12:22:32 +00:00
l10n daemon script
4092cd8b6a GIT_SILENT Sync po/docbooks with svn 2023-06-13 01:56:15 +00:00
Tobias Fella
ea99c26556 Fix logging 2023-06-12 13:33:38 +02:00
Tobias Fella
7527fd47cd Fix compiler warning 2023-06-12 13:29:23 +02:00
l10n daemon script
c72c9c5cba GIT_SILENT Sync po/docbooks with svn 2023-06-12 02:16:05 +00:00
Volker Krause
09ded20409 Fix location map asset check 2023-06-11 10:26:41 +02:00
l10n daemon script
0fd3de6215 GIT_SILENT Sync po/docbooks with svn 2023-06-11 01:56:11 +00:00
Tobias Fella
1de160cb19 Fix the search page
The search model needed to adapted to the changes in messageeventmodel
2023-06-10 13:57:03 +00:00
l10n daemon script
921abac3c1 GIT_SILENT Sync po/docbooks with svn 2023-06-10 01:54:53 +00:00
Volker Krause
7c75a2fd06 Create the OSM QtLocation plugin only once
Just loading that plugin already triggers an HTTP request, so lets only
do that when really needed and even more importantly, not for every single
location delegate again.
2023-06-09 18:39:38 +02:00
James Graham
105be518c7 Further improvements to the ChatBox API
Further improvements to the ChatBox API so that outside components no longer access the ChatBar item directly.
2023-06-09 15:02:42 +00:00
l10n daemon script
9425f24315 GIT_SILENT Sync po/docbooks with svn 2023-06-09 01:58:12 +00:00
Tobias Fella
47c28ce9a2 Improve QML types 2023-06-08 20:26:34 +00:00
Tobias Fella
72c85af407 Implement creating spaces 2023-06-08 20:05:53 +00:00
Volker Krause
22694fe5e4 Handle invalid model indices gracefully
data() being called with an invalid model index seems to happen during
normal operations here, with something in the proxy model chain not
catching that case (due to a row being filtered out presumably?).
2023-06-08 19:54:08 +00:00
Tobias Fella
a02232dc19 Fix custom emojis being visible in the sticker selector 2023-06-08 19:43:52 +00:00
Tobias Fella
252e099e75 Fix renaming log files > 10 2023-06-08 21:32:39 +02:00
Tobias Fella
76a697c3f6 Fix another invalid index 2023-06-08 21:23:38 +02:00
Joshua Goins
5b23593fd2 Let accounts without the emoticon account data to create emojis/stickers
This check worked for accounts that already had custom emojis, but if it
never had any added, m_images was never filled and the model would crash
when adding more.
2023-06-08 19:18:04 +00:00
Joshua Goins
c2580c1d2d Use correct placeholder message when there's no stickers
Instead of saying "No emojis" which doesn't make sense on the sticker
page.
2023-06-08 14:43:11 -04:00
Tobias Fella
3303d2c7db Keep last 50 log files
Keeping just the last two probably leads to important info being lost.
2023-06-08 17:55:45 +00:00
Tobias Fella
22107fc598 Don't try getting data for invalid indices
BUG: 470639
2023-06-08 17:55:13 +00:00
Tobias Fella
bc4c4f8519 Refactor login
BUG: 469486
2023-06-08 17:29:09 +00:00
l10n daemon script
16c63dbe93 GIT_SILENT Sync po/docbooks with svn 2023-06-08 01:56:11 +00:00
Volker Krause
9e78ab3328 Fix location markers not being shown on the map 2023-06-07 17:30:06 +02:00
l10n daemon script
e6dc1f54b3 GIT_SILENT Sync po/docbooks with svn 2023-06-07 02:00:09 +00:00
Tobias Fella
09025fa16d Remove some useless checks 2023-06-06 20:47:39 +02:00
l10n daemon script
357b148944 GIT_SILENT Sync po/docbooks with svn 2023-06-06 01:52:45 +00:00
Tobias Fella
8b71e56a5f Remove unneeded fallback 2023-06-05 21:41:13 +02:00
Tobias Fella
f5aa5ac7f4 Remove unneeded fallback for user's display name
The display name falls back to the user id internally.
2023-06-05 21:38:48 +02:00
James Graham
075d2fda4d Small chatbox api improvement
Small improvement to the chatbox api by making currentRoom explicit and removing redundant properties.
2023-06-05 18:20:12 +00:00
James Graham
b5c781212c Improve the handling of notifications
The aim is to put some additional filtering in place to better stop floods of old notifications. This is achieved with a couple of new filters and better tracking of old notifications.

- Make sure to paginate through all notification on initialization to ensure they are all added to old notifications. While we were not previously putting a limit on the number of returned notifications the server can and will do this when there are a very large amount.
- Find the newest timestamp for each connection on initialization and don't post any notifications with an earlier timestamp.
- Track old notifications on a per-connection basis.

Closes network/neochat#358 and network/neochat#423
2023-06-05 16:42:01 +00:00
l10n daemon script
af136943c3 GIT_SILENT Sync po/docbooks with svn 2023-06-05 01:48:05 +00:00
Tobias Fella
b2a29c8d45 Mark parameter as unused 2023-06-04 22:31:18 +02:00
Tobias Fella
5d16d78914 Minor cleanup in Controller::createRoom 2023-06-04 08:51:29 +00:00
Tobias Fella
94e970e15a Disable Windows Qt6 CI temporarily 2023-06-04 10:29:53 +02:00
Tobias Fella
1f4b984664 Unify emoji and sticker settings pages 2023-06-04 08:11:36 +00:00
l10n daemon script
a2a27e78d1 GIT_SILENT Sync po/docbooks with svn 2023-06-04 01:57:07 +00:00
l10n daemon script
915a5c188f GIT_SILENT made messages (after extraction) 2023-06-04 00:47:06 +00:00
Heiko Becker
e8f0420ad5 GIT_SILENT Update Appstream for new release
(cherry picked from commit 8dcc231bdc)
2023-06-02 22:05:12 +02:00
l10n daemon script
7a01b3ea28 GIT_SILENT Sync po/docbooks with svn 2023-06-01 01:55:18 +00:00
l10n daemon script
7cff2aaa97 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-06-01 01:40:43 +00:00
l10n daemon script
9588c7d8ef GIT_SILENT made messages (after extraction) 2023-06-01 00:47:06 +00:00
James Graham
d5a6c7683e Fix missing end of comment block. 2023-05-31 17:13:18 +01:00
l10n daemon script
1de4e2ecd3 GIT_SILENT Sync po/docbooks with svn 2023-05-31 02:29:02 +00:00
James Graham
fa37f28c94 Improve Delegate Width Sizing
Create a cpp helper class to calculate the correct delegate width given it's parent width.

This is designed to be more robust and hopefully easier to understand than the current mass of javascript calcs.

BUG: 470167
2023-05-30 18:14:25 +00:00
Tobias Fella
f1be509d13 Fix loading 2023-05-30 17:14:33 +02:00
l10n daemon script
fed528c6d8 GIT_SILENT Sync po/docbooks with svn 2023-05-30 02:12:13 +00:00
James Graham
d09cd5d71b Cleanup the list of required properties for MessageDelegateContextMenu 2023-05-29 15:03:34 +00:00
James Graham
4e40f5c7d9 getUser UserDetailDialog
Use `NeoChatRoom::getUser` to provide the user properties in `UserDetailDialog`
2023-05-29 13:43:24 +00:00
l10n daemon script
3b5bb06b4a GIT_SILENT Sync po/docbooks with svn 2023-05-29 01:51:45 +00:00
Tobias Fella
8f4e5a41c5 Drop reset*Count invocations
Still coming from Spectral, where they were taken from Quaternion, where they were dropped because they don't work as expected.
Also, soon to be removed from libQuotient itself.
2023-05-28 10:24:21 +00:00
l10n daemon script
9b1005efc3 GIT_SILENT Sync po/docbooks with svn 2023-05-28 01:59:58 +00:00
James Graham
e1d4b66479 Unify getUser
Always use `NeoChatRoom::getUser` for getting user details in a room context.
- `MessageEventModel` now calls `getUser`
- `getUser` is now overloaded to also be able to take a `NeoChatUser*`
- add params to `getUser` that are needed for the model outputs
2023-05-27 18:27:28 +00:00
Tobias Fella
f2aa375b43 Rename AccountStickerModel to AccountEmoticonModel
In preparation for using it for custom emojis as well
2023-05-27 16:38:25 +00:00
James Graham
ee53793a6d Fix replying and editing from chatbox
Restore the functionality to edit or reply to the last message in the `chatbar`.

This is achieved be moving the functions `getLastLocalUserMessageEventId` and `getLatestMessageFromRow` to `NeoChatRoom` as `editLastMessage` and `replyLastMessage` as `chatbar` no longer has access to `messageEventModel`.

The functions are also simplified as they only need to find the `eventId` and always from row 0 as this was the only use of the functions.

BUG: 469733
2023-05-27 16:36:09 +00:00
James Graham
528d46be9f Fix the room timeline being dragged when selecting text by making it non...
Fix the room timeline being dragged when selecting text by making it non interactive in desktop mode.

BUG: 467163
2023-05-27 16:06:20 +00:00
Joshua Goins
cc80e69644 Add better checks when the pack is omitted from im.ponies.room_emotes
This field is omittable, and I hit it this morning. Let's check if it's
filled before using it.
2023-05-27 15:33:42 +00:00
James Graham
09ced090f2 Use replyId role for reply ID 2023-05-27 16:12:21 +01:00
James Graham
8ad23e7a40 Timeline required properties
Move to using required properties for timeline delegates.
2023-05-27 14:57:34 +00:00
Tobias Fella
a94f46f904 Fix build against libQuotient 0.8 2023-05-27 13:17:02 +00:00
l10n daemon script
41a5d2557e GIT_SILENT Sync po/docbooks with svn 2023-05-27 01:50:19 +00:00
l10n daemon script
0b36db0ecc GIT_SILENT made messages (after extraction) 2023-05-27 00:47:24 +00:00
Shubham Arora
aae5519bed NeochatMaximizeComponent.qml: Add sourceWidth and sourceHeight
Depends on: https://invent.kde.org/libraries/kirigami-addons/-/merge_requests/103
2023-05-23 16:41:14 +00:00
l10n daemon script
df849accfa GIT_SILENT Sync po/docbooks with svn 2023-05-23 02:31:17 +00:00
l10n daemon script
b098937d1b GIT_SILENT Sync po/docbooks with svn 2023-05-22 01:52:21 +00:00
l10n daemon script
fbe4fc49e1 GIT_SILENT made messages (after extraction) 2023-05-22 00:47:42 +00:00
James Graham
8741fd8fed Refactor hover actions
Refactor hover actions into their own component.
2023-05-21 15:36:43 +00:00
l10n daemon script
ccc952b65e GIT_SILENT Sync po/docbooks with svn 2023-05-21 01:50:51 +00:00
Tobias Fella
6a68375b10 Rename NameRole to DisplayNameRole in UserListModel 2023-05-20 20:03:08 +00:00
Tobias Fella
4dcb19edb7 Fix avatar source warning 2023-05-20 19:47:12 +00:00
Tobias Fella
838abc9af3 Fix binding loop in GroupChatDrawerHeader 2023-05-20 19:29:35 +00:00
Tobias Fella
7283b2dd4d Use NavigationTabButtons for Emoji and sticker categories 2023-05-20 17:03:56 +00:00
Tobias Fella
2c1f00da03 Temporarily disable android qt6 CI 2023-05-20 17:03:33 +00:00
Carl Schwan
c7caec894e Assert that index is valid 2023-05-20 17:03:33 +00:00
Tobias Fella
b254b4aa9b Use KFormat for formatting dates 2023-05-20 17:03:33 +00:00
Tobias Fella
67107959e4 Remove unneeded "using namespace Quotient" 2023-05-20 17:03:33 +00:00
Tobias Fella
26d3e16e6d Remove empty destructor 2023-05-20 17:03:33 +00:00
Tobias Fella
bb8ee4ef44 Remove unneeded qml type registrations 2023-05-20 17:03:33 +00:00
Tobias Fella
ee65ad22e6 Rename LongOperationRole to ProgressInfoRole 2023-05-20 17:03:33 +00:00
Tobias Fella
b823f2c6b9 Remove unused role 2023-05-20 17:03:33 +00:00
l10n daemon script
0901c59de9 GIT_SILENT Sync po/docbooks with svn 2023-05-20 01:52:01 +00:00
Nate Graham
69bfa1394c Focus message search window's search field by default
BUG: 469879
2023-05-19 13:16:21 +00:00
l10n daemon script
5b69a3e07c GIT_SILENT Sync po/docbooks with svn 2023-05-19 01:49:45 +00:00
James Graham
37220ab872 Fix notification state in new rooms
Make sure that the `updateNotificationState` function is called when the base state is loaded so that new rooms after startup have a valid notification state.

Fixes network/neochat#583
2023-05-18 19:23:31 +00:00
l10n daemon script
9dd7ceb966 GIT_SILENT Sync po/docbooks with svn 2023-05-18 01:50:45 +00:00
Tobias Fella
ae6056615d Add missing capture 2023-05-18 00:03:07 +02:00
Tobias Fella
d74253d149 Update copyright year 2023-05-17 23:50:57 +02:00
Tobias Fella
805332c599 Don't use implicit lambda captures 2023-05-17 23:49:56 +02:00
Tobias Fella
e42c1c1f69 Use NavigationTabBar for emoji/sticker picker 2023-05-17 14:02:03 +00:00
Tobias Fella
f7881d0661 Fix spacedrawer being visible when there are no spaces
We can't (easily) make this declarative, since there are no spaces on startup, causing the loader to be disabled,
making the repeater not load anything, which means the loader stays disabled.
We should figure out a better solution, since this means that the drawer doesn't open immediately when joining a space,
but for now this fix is better then the current bug.
2023-05-17 15:38:10 +02:00
Carl Schwan
5eb86bbc88 Add neochat mastodon account 2023-05-17 11:30:17 +02:00
l10n daemon script
53dc32fac1 GIT_SILENT Sync po/docbooks with svn 2023-05-17 01:51:56 +00:00
James Graham
a5a2c0b03e Reaction Model
Create a reaction model that provides all the required data for `ReactionDelegate` so that none need to be calculated in QML.

This also cleans up the API for `ReactionDelegate`
2023-05-16 16:44:02 +00:00
Tobias Fella
4d2e64cb80 Cleanup name handling in RoomListModel
Replace NameRole with DisplayNameRole entirely.
2023-05-16 16:38:53 +02:00
Tobias Fella
dee064a758 Fix crash in room switching 2023-05-16 14:37:07 +00:00
Tobias Fella
5bdd67dcc1 Fix background color of TypingPane 2023-05-16 14:36:37 +00:00
Tobias Fella
2ff92bea70 Fix warning for empty avatar source 2023-05-16 14:11:38 +00:00
l10n daemon script
0fbb070bf2 GIT_SILENT Sync po/docbooks with svn 2023-05-16 01:57:02 +00:00
l10n daemon script
1a1c7ef23e GIT_SILENT made messages (after extraction) 2023-05-16 00:47:11 +00:00
Tobias Fella
fabd3da5a7 Fix asan runtime error in texthandler 2023-05-15 23:36:25 +00:00
Tobias Fella
6f90d33f3a Add new messages to bottom of notifications list 2023-05-15 19:49:05 +00:00
Aleix Pol
3bb0ee17cd NotificationsManager: Group notifications per room
Instead of issuing a new notification for every message, bundle them by
room.
It looks like the code was originally designed to do that and somehow we
forgot along the way.
It also fixes the leaking in m_notifications as we were never cleaning
after it.
2023-05-15 19:49:05 +00:00
Tobias Fella
fa8164cdba Fix notifications showing up repeatedly when multiple logged-in accounts are in the same room
What happens is roughly: The notification is received in one account and marked as received locally.
In the other account, the event is marked as "read" in the json, which makes us delete it from the
received messages. Then it is received on the first account...
2023-05-15 21:28:08 +02:00
James Graham
c63f1f0452 Cache last event
Cache the last room event so that the room list can be sorted on startup

Fixes network/neochat#88 \
BUG: 455042
2023-05-15 19:11:44 +00:00
l10n daemon script
e0df447998 GIT_SILENT Sync po/docbooks with svn 2023-05-15 01:50:59 +00:00
l10n daemon script
a64d4d0989 GIT_SILENT made messages (after extraction) 2023-05-15 00:47:14 +00:00
Tobias Fella
4c575f18d1 Fix avatar name 2023-05-14 23:57:32 +02:00
Tobias Fella
b629961a70 Create account sticker editor 2023-05-14 20:33:51 +00:00
l10n daemon script
571d9780b1 GIT_SILENT Sync po/docbooks with svn 2023-05-14 02:06:27 +00:00
l10n daemon script
df2ed04f16 GIT_SILENT made messages (after extraction) 2023-05-14 00:48:05 +00:00
Akseli Lahtinen
3d687a283e Add more bottom margin
Adds more bottom margin so the Now Typing box wont cover the text

BUG: 469616
2023-05-13 17:21:31 +00:00
l10n daemon script
99479b3896 GIT_SILENT Sync po/docbooks with svn 2023-05-13 01:51:06 +00:00
James Graham
7fca14bce1 Fix Chatbar text margin
Make sure that the padding in the chatbar textarea accounts for the x offset
2023-05-12 17:13:40 +00:00
Tobias Fella
afb51497cd Fix autocompletion not working
BUG: 468967
2023-05-12 17:12:28 +00:00
James Graham
88fada89ea Limit the maximum number of avatars shown
Limit the maximum number of avatars shown for other user read markers and collapsed state events

For state events \
![image](/uploads/0d3ec7c3da02a8832dfdb18dc265db92/image.png)

For read markers \
![image](/uploads/5694f14927e5c10b2159e58445c8a0a3/image.png)
2023-05-12 15:54:15 +00:00
James Graham
023c51ac62 Fix QuickSwitcher notification count
Use `notificationcount` instead of unread count in the `quickswitcher` as unread count is removed
2023-05-12 14:09:02 +00:00
Luigi Toscano
c37fa92559 Readd some text removed by the translation system
Restore part of the contents previously introduced by
cc21f8cca9 which was partially
lost, probably due to an extra '&gt;' outside the tags
which confused the translation system.

Credits for the text, see the original commit (Carl Schwan).
2023-05-12 12:44:24 +02:00
l10n daemon script
9dabb890dc GIT_SILENT Sync po/docbooks with svn 2023-05-12 01:55:21 +00:00
l10n daemon script
e40c3b4c03 GIT_SILENT made messages (after extraction) 2023-05-12 00:48:20 +00:00
l10n daemon script
5be7105bb8 GIT_SILENT Sync po/docbooks with svn 2023-05-11 01:50:00 +00:00
l10n daemon script
8dc9541d95 GIT_SILENT made messages (after extraction) 2023-05-11 00:46:56 +00:00
James Graham
6e5b71888d Refresh all reply roles on loadReply
Make sure that all reply roles that depend on a pointer to the reply event being available are refreshed.
2023-05-10 16:41:22 +00:00
James Graham
b362365609 Remove Unread Count
Unread count is deprecated and notification count should be used in all cases. As such remove unreadCount and use notification count in all places it was being used.

Fixes network/neochat#76 \
BUG: 466515
2023-05-10 16:23:14 +00:00
l10n daemon script
1db2e4a333 GIT_SILENT Sync po/docbooks with svn 2023-05-10 01:52:11 +00:00
l10n daemon script
6e8e40c22f GIT_SILENT made messages (after extraction) 2023-05-10 00:47:12 +00:00
Carl Schwan
cc21f8cca9 Update appstream description 2023-05-09 19:32:52 +00:00
Tobias Fella
b545a27bc6 Fix ReplyComponent warnings 2023-05-09 13:22:41 +02:00
Tobias Fella
c9d863335e Disable various tests and examples in the flatpak manifest 2023-05-09 11:14:12 +00:00
Tobias Fella
334e3ac6b4 Delete old space components 2023-05-09 09:57:08 +00:00
James Graham
d424aba0bc Document imagepacksmodel 2023-05-09 09:55:36 +00:00
James Graham
8802753de1 Custom emoji image data
Make sure the imageInfo for custom emojis is set. This ensures that all the data required by imageDelegate is available.
2023-05-09 09:15:07 +00:00
James Graham
40edfef046 Document stickermodel 2023-05-09 08:14:21 +00:00
Tobias Fella
11343e6bdf Improve spaces support 2023-05-09 08:11:47 +00:00
l10n daemon script
30c7d86045 GIT_SILENT Sync po/docbooks with svn 2023-05-09 01:57:26 +00:00
James Graham
58b7b46828 Update README.md
Update README.md ensuring that info is up to date.

The following has been changed:
- Updated about info (intro, features)
- Reference KDE standard docs for building, MRs, etc
2023-05-08 14:16:43 +00:00
James Graham
3d0c0e3ed5 Move stickermodel into the models folder 2023-05-08 09:40:26 +01:00
James Graham
77d8ec04ca Document imagepackevent 2023-05-08 08:34:32 +00:00
James Graham
72de7c6cfb Link preview messageeventmodel parameters
This move the finding of links and the creation of a `linkpreviewer` into c++.

- The links are now extracted from the text in `texthandler`
- The `messageeventmodel` now creates and stores `linkpreviewers` for events that have links in the current room.

Two new model roles have been created to let a text delegate know when the link preview should be shown (`showLinkPreview`) and pass the link previewer (`linkPreviewer`). Empty link previewer are returned where link don't exist so the qml doesn't have to have checks for whether the parameters are undefined.
2023-05-08 08:18:49 +00:00
James Graham
b82d3ab5ad TempInfo Messageeventmodel
Further improvements to the handling of `mediaInfo` in `messageeventmodel`.

`blurhash` and `thumbnailInfo` are now replaced with a single `tempInfo` object that contains a single temp source. The priority is thumbnail > `blurhash` > empty if none exist.

Fixes network/neochat#235
2023-05-08 07:50:20 +00:00
l10n daemon script
20443ba59f GIT_SILENT Sync po/docbooks with svn 2023-05-08 01:54:02 +00:00
Tobias Fella
bfdca9ca9e Fix regressions from RoomPage refactoring
Fixes 581

BUG: 469427
BUG: 469425
2023-05-07 16:17:28 +00:00
Tobias Fella
a12a44b722 Fix crash in media url 2023-05-07 15:36:59 +00:00
James Graham
8d45d4404e Move imagepacksmodel to the models folder 2023-05-07 15:11:08 +00:00
Tobias Fella
42ca128d7f Fix linking against Qt6 libQuotient 2023-05-07 15:10:32 +00:00
l10n daemon script
7cd8e70d55 GIT_SILENT Sync po/docbooks with svn 2023-05-07 01:59:27 +00:00
Tobias Fella
2982d2526a Remove logging statement
Turns out this happens a lot
2023-05-06 22:27:16 +02:00
Tobias Fella
d33a0c6644 Fix another imagepack crash 2023-05-06 20:22:27 +00:00
Tobias Fella
4a29e0d0e1 Add categorized logging to MessageEventModel 2023-05-06 17:53:01 +02:00
Tobias Fella
a89e04b92f Fix merge 2023-05-06 17:28:46 +02:00
James Graham
4b993775c6 Move Neochat specific libQuotient events to their own folder 2023-05-06 15:10:17 +00:00
Tobias Fella
e0983fcc8c Refactor RoomPage into various component 2023-05-06 15:09:00 +00:00
Tobias Fella
c9ddf2f04a Fix crash when there are no account emojis 2023-05-06 15:31:20 +02:00
Heiko Becker
b5764c4d04 GIT_SILENT Update Appstream for new release
(cherry picked from commit 41ce874f77)
2023-05-06 11:19:38 +02:00
James Graham
5f41d275e4 Document runner 2023-05-06 08:22:09 +00:00
l10n daemon script
7f707ae042 GIT_SILENT Sync po/docbooks with svn 2023-05-06 01:55:01 +00:00
James Graham
270a1e3a96 Fix room notifications settings
Make sure that the room property is set for the Push Notification room settings page.
2023-05-05 17:12:33 +00:00
James Graham
65d919876c Document trayicon_sni 2023-05-05 16:53:38 +00:00
Tobias Fella
049ae3602f Fix binding loop in ChatBar 2023-05-05 16:03:50 +00:00
Tobias Fella
d4c8e558e0 Remove empty settings pages 2023-05-05 17:42:45 +02:00
James Graham
0e4d87824e Document windowcontroller 2023-05-05 15:23:18 +00:00
James Graham
cd7f6d52dd document urlhelper 2023-05-05 14:38:48 +00:00
Tobias Fella
96c1b98d02 Implement sending stickers
MSC2545 image packs are used as source.
2023-05-05 14:29:18 +00:00
Tobias Fella
443d709eb8 Save log to file and always save e2ee debug logs
This will hopefully help us debug e2ee problems
2023-05-05 10:15:43 +00:00
James Graham
5107f0e79e document joinruleevent 2023-05-05 07:45:52 +00:00
James Graham
5567f94535 Document filetransferpseudojob 2023-05-05 07:45:05 +00:00
l10n daemon script
8e566e7326 GIT_SILENT Sync po/docbooks with svn 2023-05-05 01:59:44 +00:00
l10n daemon script
43c6172482 GIT_SILENT Sync po/docbooks with svn 2023-05-04 02:00:18 +00:00
James Graham
f453334f63 Document trayicon 2023-05-03 19:58:47 +00:00
James Graham
ac24e06ae2 Document spacehierarchycache 2023-05-03 19:58:27 +00:00
James Graham
eab5abec2f Document roommanager 2023-05-03 18:49:20 +00:00
James Graham
0fc962b147 Document stickerevent 2023-05-03 17:51:36 +00:00
James Graham
10794628ed MessageEventModel media info improvements
Create a `messageeventmodel` role for media info and reply media info that is a QMap with all the required data.

This replaces the MediaUrlRole, FileMimeTypeRole and the ContentTypeRole. The reply role no longer needs the content role.

This also ensures mxc urls are now generated for replies. All the media parameters will now have default values assigned in the model so the QML no longer needs to do this.
2023-05-03 17:50:48 +00:00
l10n daemon script
a6f108d3b8 GIT_SILENT Sync po/docbooks with svn 2023-05-03 02:02:58 +00:00
James Graham
c4e80c1d1c Document pollevent 2023-05-02 18:39:08 +00:00
James Graham
6f231fa916 Document pollhandler 2023-05-02 18:10:49 +00:00
l10n daemon script
5d5f5c4ab7 GIT_SILENT Sync po/docbooks with svn 2023-05-02 02:02:48 +00:00
Gary Wang
034453636d Use MobileForm.FormSpinBoxDelegate for SpinBox in proxy page 2023-05-01 10:00:41 +00:00
Tobias Fella
8e4da42a64 Fix crash in avatar url handling 2023-05-01 11:49:35 +02:00
James Graham
7156bf0711 Link Previewer MXC Links
- Update link preview to get valid mxc links.
- Get the connection from a room.
2023-05-01 09:12:16 +00:00
l10n daemon script
bc317514e6 GIT_SILENT Sync po/docbooks with svn 2023-05-01 02:14:22 +00:00
James Graham
26b2380bb7 Document linkpreviewer 2023-04-30 20:09:35 +00:00
James Graham
685b2a68ba Document notificationsmanager 2023-04-30 19:49:21 +00:00
James Graham
9936c7a8b6 Document login 2023-04-30 19:33:17 +00:00
James Graham
83da52582b Document matriximageprovider 2023-04-30 19:13:13 +00:00
James Graham
fbf918c7d0 Document neochatuser 2023-04-30 18:55:59 +01:00
James Graham
2281fe6f8a Improve User Avatar Model Roles
- Update the message event and user models so that the full source url is output.
- Separate the reply author into its own role
- Create an empty user object that can be passed so that the QML code no longer needs to check if certain parameters exist.
- Make avatarForMember return and empty QUrl if a valid avatar cannot be found and make use in the user and event models

As well as cleaning up the QML this should also stop the QML Image: Media id '' doesn't follow server/mediaId pattern spam in the log.
2023-04-30 13:51:06 +00:00
l10n daemon script
1bb03e115e GIT_SILENT Sync po/docbooks with svn 2023-04-30 02:48:26 +00:00
Tobias Fella
9d6ebf53a9 Fix reply loading 2023-04-29 21:39:16 +02:00
Tobias Fella
9e780b8eb2 Remove warning when event to refresh wasn't found
This can legitimitely happen, e.g. when a reaction is loaded for an event that we haven't loaded
2023-04-29 21:28:32 +02:00
Tobias Fella
01b34c5b8c Get rid of some warnings 2023-04-29 20:56:53 +02:00
Tobias Fella
11233bee3a Fix trayicon disconnect warning 2023-04-29 20:10:11 +02:00
Tobias Fella
e94b3caf51 Run tests guiless 2023-04-29 19:48:57 +02:00
James Graham
e8166f3433 Improve Invitation Flow
- Update the conatainsUser function to use memberState so that invites do not show up as being in the leave state.
- Update the InviteUser page to use Kirigami.BasicListItem and make the invite button remain visible but be untoggleable when the if user has already been invited.

closes network/neochat#202
2023-04-29 17:13:24 +00:00
Tobias Fella
d844945453 Improve RoomDrawer for direct chats
Don't show irrelevant stuff like the member list, description, alias

BUG: 466895
2023-04-29 18:39:40 +02:00
James Graham
85b40ca536 Devtools Improvements
- Now has tabs setup as more features are added
- First extra tab has basic server info
- Use mobileform to make it look nicer
- For the room data tab allow the room to be changed from within devtools
- For the room data tab allow m.room.member events to be filtered out so other event types can be found easily
- For the room data tab allow viewing room account data

network/neochat#557
2023-04-29 15:20:51 +00:00
James Graham
ca805917de Document and Cleanup userlistmodel
Document and cleanup userlist model.

- Remove unneeded enum UserTypes
- Cleanup includes and remove need to include QPointer
- make clear that it is a user or users that are being refreshed

Note: breaks libquotient 0.6 compatibility because of the changes to how m_currentRoom is handled
2023-04-29 14:53:01 +00:00
Tobias Fella
014185c4c9 Prevent crash in SyntaxHighlighter when leaving room
BUG: 467722
2023-04-28 14:14:02 +00:00
Tobias Fella
2b06679be6 Fix handling line separators
BUG: 468977
2023-04-28 13:47:25 +00:00
Tobias Fella
7d2edc7c52 Fix Ctrl+Shift+, opening settings
BUG: 469057
2023-04-28 12:47:53 +00:00
Nicolas Fella
224bc9441b Add 23.04.0 Windows artifact 2023-04-28 12:45:27 +02:00
l10n daemon script
5a7b17a31e GIT_SILENT Sync po/docbooks with svn 2023-04-28 01:54:31 +00:00
Tobias Fella
eea8950afb Fix room search field shortcut
The shortcut was stolen by the search field in the quick switcher

BUG: 469059
2023-04-28 01:03:24 +02:00
James Graham
9f15c7fc53 Fix messageeventmodel message role
Change remaining messageeventmodel message role to plainText
2023-04-27 17:38:42 +00:00
James Graham
4b879be4ea MessageEventModel plain text role
Update the message role to be named plainText and use it the message delegate for openMessageContext.
This removes the need for plainText in controller so it is removed.
2023-04-27 16:58:52 +00:00
James Graham
af078f03d0 Document filetypesingleton 2023-04-27 15:20:36 +00:00
Tobias Fella
cdf2c390ca Don't abandon job when image request is cancelled
Aborting the request causes a lot of logged messages. In theory, not stopping the job causes some overhead,
but that's negligible and the provider is on its way out anyway.
2023-04-27 11:32:46 +00:00
l10n daemon script
77b2186cb6 GIT_SILENT Sync po/docbooks with svn 2023-04-27 01:58:08 +00:00
James Graham
0664ef8ccb Document controller
Document controller and cleanup some unused functions
2023-04-26 19:56:56 +00:00
James Graham
4af7537764 Cleanup Controller
Remove unused functions and use setQuitOnLastWindowClosed as a slot for reacting to the tray icon setting change only.
2023-04-26 19:29:16 +00:00
l10n daemon script
f47e7531fc GIT_SILENT Sync po/docbooks with svn 2023-04-26 02:00:56 +00:00
Tobias Fella
e484a08e8d Fix Keys in QuickSwitcher 2023-04-25 14:54:09 +02:00
l10n daemon script
56f3d0e0d6 GIT_SILENT Sync po/docbooks with svn 2023-04-25 02:08:27 +00:00
l10n daemon script
3797854b0c GIT_SILENT Sync po/docbooks with svn 2023-04-24 02:14:01 +00:00
James Graham
931e91ddba Document emojitones 2023-04-23 18:36:50 +00:00
James Graham
25754bbe22 Document colorschemer 2023-04-23 12:44:52 +00:00
James Graham
53884949d1 Document chatdocumenthandler
Document chatdocumenthandler and cleanup includes
2023-04-23 11:12:29 +00:00
James Graham
abb2a340e2 Document blurhash
Add documentation from the blurhash reference implementation to the code.
2023-04-23 09:56:36 +00:00
James Graham
ed874ed00a Document clipboard 2023-04-23 08:24:09 +00:00
l10n daemon script
a8aec35884 GIT_SILENT Sync po/docbooks with svn 2023-04-23 02:42:19 +00:00
James Graham
0496f6552a Document blurhashimageprovider 2023-04-22 18:50:34 +00:00
James Graham
970cd5cf7a Document actionshandler
Also cleanup some unused includes
2023-04-22 18:50:17 +00:00
Carl Schwan
2fb4fdd18f Port SpellChecking setting page to mobileform 2023-04-22 11:20:37 +00:00
Carl Schwan
fc1dc5c1d6 Bump dependency to kirigami
We need the new settings action api
2023-04-22 09:49:59 +00:00
James Graham
800194c6f5 Document userdirectorylistmodel 2023-04-22 08:34:22 +00:00
James Graham
0cab7b1c85 Document webshortcutmodel 2023-04-22 08:33:12 +00:00
James Graham
983d4c9db2 Document sortfilterspacelistmodel 2023-04-22 08:32:19 +00:00
James Graham
88dfacbbb3 Document sortfilterroomlistmodel 2023-04-22 08:31:54 +00:00
James Graham
3f572c79fa Document statemodel 2023-04-22 08:31:28 +00:00
l10n daemon script
a7ee1fac3c GIT_SILENT Sync po/docbooks with svn 2023-04-22 02:08:02 +00:00
l10n daemon script
068bfc948b GIT_SILENT Sync po/docbooks with svn 2023-04-21 01:58:19 +00:00
l10n daemon script
47470f5a6d GIT_SILENT Sync po/docbooks with svn 2023-04-20 02:05:22 +00:00
James Graham
144dc1f8f4 Use kirigami-addons maximise components
Use new kirigami-addons MaximizeImage.qml to replace local FullScreenImage.qml

depends upon libraries/kirigami-addons!88

TODO
- [x] Remove the old `fullscreenimage.qml` before merging as no longer needed

Implements #571
2023-04-19 21:10:30 +00:00
Tobias Fella
4002bb804c Don't require passing tests on windows Qt6 2023-04-19 21:53:28 +02:00
Carl Schwan
760ed24b37 Add loading title to LoadingPage
Otherwise the page is a bit empty
2023-04-19 07:39:49 +00:00
Carl Schwan
489979af43 Fix Ctrl-PageUp/Down navigation 2023-04-19 07:39:23 +00:00
l10n daemon script
e482e12826 GIT_SILENT Sync po/docbooks with svn 2023-04-19 02:03:35 +00:00
Tobias Fella
fa7b9d54e2 Fix logout from account menu 2023-04-18 13:04:25 +00:00
Tobias Fella
f60114c7f6 Refactor account labels
Move them out of NeoChatUser, where they don't make any sense
2023-04-18 08:29:24 +00:00
l10n daemon script
de55253e54 GIT_SILENT Sync po/docbooks with svn 2023-04-18 01:58:53 +00:00
Shooting Star
8479e51051 Check if room is null before enter room
There will be some case, like the notify is still exist, but user have
logout their account, user leave the room, these cause the room become a
nullptr, and when click the notify message, it make neochat coredump
2023-04-17 19:25:53 +00:00
Tobias Fella
bb2fd7c9c4 Fix dialog button role 2023-04-17 19:34:43 +02:00
Nicolas Fella
a0b0a5d47f Set associated window for tray icon 2023-04-17 09:46:04 +00:00
l10n daemon script
10bdc1d3d1 GIT_SILENT Sync po/docbooks with svn 2023-04-17 02:41:30 +00:00
James Graham
6ec7d8d6b4 Use DelegateTypeRole searchmodel
Change EventTypeRole to DelegateTypeRole to match updated message event model.
2023-04-16 08:32:51 +00:00
l10n daemon script
0dca9588ff GIT_SILENT Sync po/docbooks with svn 2023-04-16 01:56:40 +00:00
Tobias Fella
ca03c530b2 Fix various warnings 2023-04-15 18:07:26 +00:00
James Graham
973ec24674 Document searchmodel 2023-04-15 17:57:21 +00:00
James Graham
1da767ff0a Document roomlistmodel 2023-04-15 17:18:33 +00:00
James Graham
89127876f9 Document serverlistmodel 2023-04-15 16:51:32 +00:00
Tobias Fella
47a738a703 Revert "Revert "Implement sending location messages""
This reverts commit 52dafbb6c8.
2023-04-15 16:01:04 +00:00
James Graham
516b1cff88 Document publicroomlistmodel 2023-04-15 09:00:49 +00:00
James Graham
6438977964 Document messagefiltermodel 2023-04-15 08:46:45 +00:00
James Graham
d750263d39 Document keywordnotificationrulemodel 2023-04-15 08:32:35 +00:00
James Graham
3ed952db9e Document emojimodel 2023-04-15 08:15:23 +00:00
James Graham
f8040a1bf6 Guard getTagType and isCloseTag
Add guard clauses for getTagType and isCloseTag to avoid crashing if the string is empty.

CCBUG: 468448
2023-04-15 07:59:05 +00:00
l10n daemon script
d83b31fd86 GIT_SILENT Sync po/docbooks with svn 2023-04-15 01:59:35 +00:00
James Graham
e0dbb657f6 Document devicesmodel 2023-04-14 13:14:39 +00:00
James Graham
a807cc6143 Document customemojimodel 2023-04-14 12:57:05 +00:00
l10n daemon script
fe064c0ef8 GIT_SILENT Sync po/docbooks with svn 2023-04-14 01:50:25 +00:00
James Graham
6cc773426f Document completionmodel
Document completionmodel and remove unnecessary includes
2023-04-13 17:35:44 +00:00
James Graham
db94408ba6 Document completionproxymodel 2023-04-13 17:15:38 +00:00
James Graham
333bd3cdb9 Document collapsestateproxymodel
Document collapsestateproxymodel and make som public functions private.
2023-04-13 16:41:41 +00:00
l10n daemon script
9a0d82eb31 GIT_SILENT Sync po/docbooks with svn 2023-04-13 01:58:59 +00:00
James Graham
0990c0507c Document actionsmodel and cleanup includes 2023-04-12 21:12:14 +00:00
Heiko Becker
9f76ce22c1 GIT_SILENT Update Appstream for new release
(cherry picked from commit 2c3ce1e88b)
2023-04-12 19:09:48 +02:00
l10n daemon script
6acd6075ff GIT_SILENT Sync po/docbooks with svn 2023-04-12 01:55:28 +00:00
Tobias Fella
57b6f00d8e Use better include for QCoroTask 2023-04-11 15:34:12 +02:00
Tobias Fella
280c9327cb Remove unused signal 2023-04-11 15:31:40 +02:00
l10n daemon script
05bcbb695f GIT_SILENT Sync po/docbooks with svn 2023-04-11 02:21:00 +00:00
James Graham
552f4e8f13 Fix Rich Emote Test Windows Qt5
Make sure that the receiveRichEmote test grabs an actual colour for the user as it can vary by platform.
2023-04-10 12:55:31 +00:00
Carl Schwan
1223c5348d Rename ConfirmLogoutDialog to Dialog.ConfirmLogout
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-04-10 13:54:57 +02:00
Carl Schwan
3ccff4f337 Refactor room list in multiple sub components
Also modernize the codebase where possible (e.g use required properties,
reorder properties, fix warnings, don't use Action when not needed)

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-04-10 13:53:42 +02:00
l10n daemon script
a67f3334ea GIT_SILENT Sync po/docbooks with svn 2023-04-10 01:50:51 +00:00
Tobias Fella
52dafbb6c8 Revert "Implement sending location messages"
This reverts commit f3a04635cf
2023-04-09 20:22:06 +00:00
James Graham
4341cc437d Handle escaped html for plain text output
Always unescape html for plain text output no matter what the input is.
2023-04-09 14:20:22 +00:00
James Graham
7bb7dd7bbb Document messageeventmodel
Document the API and cleanup some unused roles.
2023-04-09 14:02:30 +00:00
James Graham
b4090d9671 Fix Chat bubble background changing color when created
Only enable the animating of the bubble background when the temporary highlight is applied to avoid it flashing white on entry.

BUG: 468124
2023-04-09 12:13:46 +00:00
l10n daemon script
3d2bcce99a GIT_SILENT Sync po/docbooks with svn 2023-04-09 01:54:23 +00:00
Tobias Fella
f3a04635cf Implement sending location messages 2023-04-09 00:44:02 +00:00
Tobias Fella
419cb07557 Revert "Temporarily disable android Qt6 CI"
This reverts commit d6ebb1308c
2023-04-09 02:22:53 +02:00
Tobias Fella
57fccaa076 Rework QuickSwitcher
Now looks similar to the implementations in Kalendar and KXMLGui

![image](/uploads/56497b81348d553ff9b8ea30ab41fba7/image.png)

Replaces !505
2023-04-09 00:15:00 +00:00
James Graham
4bf65339f8 Texthandler edited
Move the handling of adding whether the message has been edited to texthandler.
2023-04-08 20:58:44 +00:00
l10n daemon script
e5f2e209a2 GIT_SILENT Sync po/docbooks with svn 2023-04-08 01:58:38 +00:00
James Graham
be3b5cdb8a Handle emotes in texthander
This moves the code to add the emote user pill into texthandler removing the now redundant checks from the message delegates.
2023-04-07 19:03:04 +00:00
l10n daemon script
abd56baa51 GIT_SILENT Sync po/docbooks with svn 2023-04-07 01:49:52 +00:00
l10n daemon script
ff27a1d0bb GIT_SILENT Sync po/docbooks with svn 2023-04-06 01:51:39 +00:00
Wang Zichong
8af2d4d273 Support both roomnick and myroomnick slash command
myroomnick is a more common-used command, so user can keep using
/myroomnick if they are from other matrix client.
2023-04-05 23:19:07 +08:00
Carl Schwan
f64c8e28da Use newly introduced setBadgeNumber api on Qt >= 6.6 2023-04-05 10:15:04 +02:00
l10n daemon script
4570d6350b GIT_SILENT Sync po/docbooks with svn 2023-04-05 01:59:34 +00:00
Alessio Mattiazzi
6dd51a35c5 Clear room member filter when hiding search bar
closes #575
2023-04-04 21:04:05 +00:00
l10n daemon script
2470990d75 GIT_SILENT Sync po/docbooks with svn 2023-04-04 02:01:31 +00:00
Tobias Fella
1a87e605d6 Fix formatting 2023-04-03 23:32:31 +02:00
Jan Bidler
e995740790 Text cleanup
This MR goes over text and cleans it up to be more unifying. Mostly just lowercasing words in non-titles, but it also changes the "show fancy effects" text to be clearer with its meaning.  
It also fixes the room access being printed in the room settings:  ![image](/uploads/864606de81f0f603ebb85dbe7c745491/image.png)  
I'd like to do a second pass later with another MR to unify triple dots (...) and ellipsis (…)
2023-04-03 20:47:14 +00:00
l10n daemon script
0fb8b740a4 GIT_SILENT Sync po/docbooks with svn 2023-04-03 01:53:49 +00:00
James Graham
5087161e4b Document NeoChatRoom
Add documentation to NeochatRoom and reorganise the functions in the header file in a more logical order.

For Q_PROPERTIES the documentation is on the property not the functions it calls as seems to be the convention elsewhere.
2023-04-02 17:56:03 +00:00
James Graham
918e9e492a Make sure the file delegate label fill the width and elide if needed. 2023-04-02 15:41:55 +00:00
Marc Deop i Argemí
f10805dddb feat: add background-color to <code> blocks 2023-04-02 10:54:41 +02:00
l10n daemon script
55e4d03dfe GIT_SILENT Sync po/docbooks with svn 2023-04-02 01:54:00 +00:00
James Graham
9f9086b4b0 Make the room page header span the width in compact mode with the sam emargin on both sides. 2023-04-01 17:03:53 +00:00
James Graham
e00ce79d26 Change the background colour in compact mode to achieve the same level of contrast as with bubbles. 2023-04-01 15:52:48 +00:00
James Graham
a13b2e6bd2 Cleanup Neochatroom
Remove unneeded functions, remove Q_INVOKABLE from setters that are part of a Q_PROPERTY, move inlined getters and setters to the .cpp
2023-04-01 12:49:27 +00:00
James Graham
cefe5acdaa Fix Long Topics in the RoomDrawer Overflowing
Use a scrollView for the topic so that a scrollBar is shown when it really long

BUG: 467512
2023-04-01 10:24:26 +00:00
James Graham
1438aea965 Revert "Add kquickcharts to the flatpak manifest"
This reverts commit 3cc8d32dd3
2023-04-01 08:23:48 +00:00
l10n daemon script
1b60e24c64 GIT_SILENT Sync po/docbooks with svn 2023-04-01 01:55:31 +00:00
l10n daemon script
4f1c8f6f35 GIT_SILENT Sync po/docbooks with svn 2023-03-31 01:57:59 +00:00
Carl Schwan
882945260a Fix dataChanged being sent with all roles
This is expensive so we should try to reduce it to the maximum

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-03-30 18:37:50 +00:00
Carl Schwan
3677088104 Remove one RoomListModel instance
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-03-30 18:21:03 +00:00
Akseli Lahtinen
8f141cd88d Set the mention and error color according to colorscheme
Use kirigami to set the proper link and error color for mentions and error underlining in chatbox

This is with my own colorscheme:

![image](/uploads/6269b85f936a98b02f42a9ce01da76b1/image.png)
2023-03-30 16:25:01 +00:00
l10n daemon script
0d1b35b610 GIT_SILENT Sync po/docbooks with svn 2023-03-30 01:53:26 +00:00
Tobias Fella
87c20bf03c Update .gitignore 2023-03-29 22:18:20 +02:00
l10n daemon script
77479ca22d GIT_SILENT Sync po/docbooks with svn 2023-03-29 01:56:21 +00:00
Tobias Fella
34ad743e98 Don't crash in UserListModel when there is no room
BUG: 466045
2023-03-28 11:47:14 +00:00
l10n daemon script
493e27622f GIT_SILENT Sync po/docbooks with svn 2023-03-28 02:21:27 +00:00
James Graham
b1b6c7ceed Improve location marker
Change location marker to GPS icon, make sure the point is the anchor and colour it with highlight colour

m.self \
![image](/uploads/d7136e7f70a106665fcaea0588a334f7/image.png)

m.pin \
![image](/uploads/baee5d19c098eaab1abd91533fe431e5/image.png)
2023-03-27 16:38:34 +00:00
l10n daemon script
d0b1610a9f GIT_SILENT Sync po/docbooks with svn 2023-03-27 02:44:58 +00:00
Tobias Fella
dcf520a7a9 Fix locations for geouris with uncertainty 2023-03-26 22:55:05 +02:00
James Graham
a0ae8b28b2 Handle stripnewlines for plain text list
Handle stripping new lines when the plain text input is a markdown list.
2023-03-26 20:27:23 +00:00
l10n daemon script
78a6179a11 GIT_SILENT Sync po/docbooks with svn 2023-03-26 01:58:24 +00:00
l10n daemon script
9c91557d8f GIT_SILENT Sync po/docbooks with svn 2023-03-25 01:55:18 +00:00
Tobias Fella
fb24ffd20d Show a map for location events 2023-03-24 13:52:17 +00:00
l10n daemon script
0c985a0af1 GIT_SILENT Sync po/docbooks with svn 2023-03-24 01:52:23 +00:00
Tobias Fella
787dc5ab66 Ensure that the room list subtitle is a single line 2023-03-23 20:10:35 +00:00
l10n daemon script
f11abdeebd GIT_SILENT Sync po/docbooks with svn 2023-03-22 02:16:45 +00:00
l10n daemon script
89141dddf2 GIT_SILENT Sync po/docbooks with svn 2023-03-21 02:03:28 +00:00
l10n daemon script
69f08de0ff GIT_SILENT Sync po/docbooks with svn 2023-03-20 01:59:17 +00:00
James Graham
925e20ebb8 Handle quotes in plain strings
Unescape quotes in plain strings
2023-03-19 19:58:56 +00:00
James Graham
ee254a286d Handle single quotes for links
Make sure that the text handler can handle links which use single or double quotes for the attributes.
2023-03-19 19:06:08 +00:00
James Graham
3cc8d32dd3 Add kquickcharts to the flatpak manifest 2023-03-19 18:34:45 +00:00
l10n daemon script
50cf6d9750 GIT_SILENT Sync po/docbooks with svn 2023-03-19 01:51:40 +00:00
Tobias Fella
cedbb64932 Remove unused include 2023-03-19 02:00:45 +01:00
Tobias Fella
b45898a5b6 Fix typo in actionName 2023-03-19 01:59:55 +01:00
Tobias Fella
ccb1748ab3 Only try to find sqlite on android
Cleans up the cmake output a bit
2023-03-19 01:54:16 +01:00
James Graham
11e9af15f7 Add Quick Formatting Menu in the Chatbar
Add a menu to quickly apply text effects when selecting text in the chatbar.

![image](/uploads/aa4d3b6f7e89695e1168aeee536d2df4/image.png)
2023-03-18 10:44:28 +00:00
l10n daemon script
8ad41fec92 GIT_SILENT Sync po/docbooks with svn 2023-03-18 02:12:49 +00:00
James Graham
ac5212ebb2 Update space heirarchy cache
Add functions to update the space heirarchy cache when a new space is added or removed.
2023-03-17 14:23:39 +00:00
James Graham
4e16b91f54 Hide local edit message
When a local message is edited make sure that the initial message that will be merged remains hidden so it doesn't flash up then disappear.

closes network/neochat#314
2023-03-17 10:07:31 +00:00
l10n daemon script
343f4965ed GIT_SILENT Sync po/docbooks with svn 2023-03-17 02:11:51 +00:00
James Graham
ac775c5aaf Add pie shaped progress bar for chatbar instead of busy indicator
![2023-03-15_15-06-51](/uploads/7a56d2a1696e26b87451b0951995a730/2023-03-15_15-06-51.mp4)

Closes network/neochat#151
2023-03-16 19:22:37 +00:00
James Graham
db17888d42 Add action name required propereties for the room settings. 2023-03-16 09:16:21 +00:00
l10n daemon script
f12d10baa6 GIT_SILENT Sync po/docbooks with svn 2023-03-16 02:04:44 +00:00
James Graham
4289c1345f Update about neochat actionName to "aboutNeochat" and add one for about KDE 2023-03-15 14:56:37 +00:00
James Graham
0d6a83b063 Add end state to text handler and use to ensure that in nextTokenType to stop an out of bounds access to m_databuffer 2023-03-15 11:55:50 +00:00
l10n daemon script
76b04dcba9 GIT_SILENT Sync po/docbooks with svn 2023-03-15 01:58:28 +00:00
James Graham
64dee7eb12 Add right click menu to accountlist avatar
Adds a right click menu with the following options

![image](/uploads/09a266fb609bb8f94b206eb66f09e06d/image.png)

depends upon frameworks/kirigami!933
2023-03-14 23:00:41 +00:00
Carl Schwan
bc84ad8d56 Don't focus chatbar on mobile
This popup the virtual keyboard and is quite distrubing on mobile.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-03-14 22:27:44 +00:00
James Graham
afe8a2a5e4 Newline Mobile
Make return/enter create a newline on mobile. This is the traditional behaviour in other messengers as the send icon and return have are the same time to access and solves the linked issue.

Closes network/neochat#466
2023-03-14 22:26:18 +00:00
Carl Schwan
87213dc9dd Show back button when pushing the settings on mobile
To use with https://invent.kde.org/frameworks/kirigami/-/merge_requests/992

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-03-14 22:24:22 +00:00
James Graham
300d2428eb Remove rogue console.log statement 2023-03-14 19:38:18 +00:00
James Graham
abe7d70822 Add home and coloured notifications icons 2023-03-14 15:55:31 +00:00
l10n daemon script
d8bf26158a GIT_SILENT Sync po/docbooks with svn 2023-03-14 01:57:26 +00:00
James Graham
741cb57105 Fix state event visiblity in timeline
Rework the filtering of state events in the timeline and for lastevent. This is now consistent everywhere and includes the following:
- The timeline settings are obeyed everywhere
- A new setting is added to filter all state events
- Last event obeys the timeline setting in all cases
- The roomlist will show a state event as the latest event if it's visible in the timeline
- Names are no longer hyperlinked in eventToString if plaintext is selected.

BUG: 455048\
Closes network/neochat#148
2023-03-13 19:00:22 +00:00
James Graham
81c73037ca Room URL preview settings
- Add the ability to set the deafult url preview setting for the room if you have sufficient power level.
- Add the ability for the user to set the desired url preview setting.

network/neochat#560
2023-03-13 18:23:18 +00:00
James Graham
f6ba4f2ecd Improve Text Handling
Improve the handling of text both when sending and receiving.

The main feature is to fix the linked bug (and a host of others that are unreported but similar) which is caused by the fact that we don't properly clean html. This mr does that as per the matrix spec https://spec.matrix.org/v1.5/client-server-api/#mroommessage-msgtypes. So any disallowed tags or attributes are removed and it does the special handling for certain attributes.

Additionally the functions are also designed to cover any other text formatting required, particularly fro received strings.

The receive side is covered by 2 functions `handleRecieveRichText` and `handleRecievePlainText`. The rich/plain in the function name refers to the output type not the input type (both can take plain and rich input), so `handleRecieveRichText` is called to get a string suitable to go in a rich text control and `handleRecievePlainText` for a plain control.

The functions also handle the following some of which was previously handled by `eventToString` in `NeoChatRoom`:
- Strip and reply from the string
- Format any user mentions
- Linkify links in plain strings
- Handle mxc urls in rich text (uses the new `room->makeMediaUrl` functionality from libQuotient)
- `handleRecievePlainText` also deals with markup making `NeoChatRoom->subtitle` redundant

There is also an extensive test suite which defines the behaviour and the best way to review this is probably to look at the tests and decide whether you agree with the expected output given the inputs and/or if there is any missing behaviour.

The final aim especially with the test suite is to give us a framework to make further updates in the future easier and hopefully prevent a new feature breaking old behaviour with the tests.

BUG: 463932 \
BUG: 466330 \
BUG: 466930
2023-03-13 17:28:56 +00:00
James Graham
23303c0483 Other user read markers
Add the ability to see other user's read markers. 

![image](/uploads/a4bdc35a60ab10685c7d3ea4d9b13c87/image.png)

Implements network/neochat#133
2023-03-13 15:12:46 +00:00
l10n daemon script
5a02448326 GIT_SILENT Sync po/docbooks with svn 2023-03-13 02:08:04 +00:00
l10n daemon script
411ae25e80 GIT_SILENT Sync po/docbooks with svn 2023-03-12 03:18:42 +00:00
l10n daemon script
6e1b3fe860 GIT_SILENT Sync po/docbooks with svn 2023-03-11 02:14:41 +00:00
Albert Astals Cid
4a38d83a68 GIT_SILENT Upgrade release service version to 23.07.70. 2023-03-10 22:00:27 +01:00
l10n daemon script
280d90e191 GIT_SILENT Sync po/docbooks with svn 2023-03-10 02:03:01 +00:00
Nicolas Fella
b4b24430a1 Allow building against KF6 2023-03-09 15:50:43 +01:00
l10n daemon script
b7b7f1817a GIT_SILENT Sync po/docbooks with svn 2023-03-09 01:56:25 +00:00
Joshua Goins
3d67a682f4 Bump kirigami-addons to 0.7.2 2023-03-08 09:33:34 -05:00
Joshua Goins
da6df18367 Add separate "About KDE" page to settings 2023-03-08 14:30:48 +00:00
l10n daemon script
0b1b1b8c8c GIT_SILENT Sync po/docbooks with svn 2023-03-08 02:02:32 +00:00
l10n daemon script
2493a00ba4 GIT_SILENT Sync po/docbooks with svn 2023-03-07 02:01:54 +00:00
Tobias Fella
d6ebb1308c Temporarily disable android Qt6 CI 2023-03-07 00:11:26 +01:00
l10n daemon script
332c311023 GIT_SILENT Sync po/docbooks with svn 2023-03-06 01:56:17 +00:00
Carl Schwan
27d33d121a Small improvement to clipbard
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-03-06 00:31:17 +01:00
Tobias Fella
e954fc204f Don't open context menu when tapping on an image
BUG: 466381
2023-03-05 23:19:13 +00:00
Alessio Mattiazzi
d1f7e7091e Copy image to the clipboard
Add a context menu option to save an image in the timeline to the clipboard

BUG: 466478
2023-03-05 23:19:02 +00:00
James Graham
bd4eeb405b Set power level from userdetaildialog
Add the option to set powerlevel to userdetaildialog.

This is done by making the powerleveldialog into it's own file and using that.

implements network/neochat#570
2023-03-05 22:44:04 +00:00
Tobias Fella
e6a060c192 Don't show highlights in DMs
It's a DM, the messages are all meant for us anyway

CCBUG: 466895
2023-03-05 17:21:07 +01:00
l10n daemon script
f53a7a27f6 GIT_SILENT Sync po/docbooks with svn 2023-03-05 02:36:21 +00:00
l10n daemon script
34384dced4 GIT_SILENT made messages (after extraction) 2023-03-05 00:51:47 +00:00
l10n daemon script
b68cfafab2 GIT_SILENT Sync po/docbooks with svn 2023-03-04 01:57:30 +00:00
l10n daemon script
58b836fd1e GIT_SILENT Sync po/docbooks with svn 2023-03-03 01:58:44 +00:00
Alessio Mattiazzi
90cad05bae Fix save-as button in FullScreenImage view
Save-as button in the fullscreenimage view did not work because it could not access the Config object; adding the import statement to access it.
2023-03-02 18:16:08 +00:00
l10n daemon script
072f7cec37 GIT_SILENT Sync po/docbooks with svn 2023-03-02 02:48:28 +00:00
James Graham
39388e204e Roomlist Drag Improvements
- Move the room list drag handler and logic to RoomList.qml.
- Make the compact mode logic not rely on a saved width value from Config as this was causing the room list to have large icons the first launch after a recent update.
- Instead save the compact mode state and initialise the width based upon that.
2023-02-28 19:30:20 +00:00
l10n daemon script
6ccb201110 GIT_SILENT Sync po/docbooks with svn 2023-02-28 02:31:10 +00:00
James Graham
178b516c7c Replace Global Menu
Remove the global menu and move explore and new chat/room buttons to new `ExploreComponent.qml`.

This is designed to sit in the header of the `RoomListPage` and will only be visible when the room list is. The other settings have just been removed as they are covered by the `UserInfo` component and quick can be done form the decoration or system tray.

When wide\
![image](/uploads/ae652b4beeae8cbde0def427fbc65112/image.png)

Collapsed mode\
![image](/uploads/0aac45d8fa1dd718afd764656dded76b/image.png)
2023-02-27 20:11:50 +00:00
Tobias Fella
ac88e13e58 Update Tobias' email address 2023-02-27 19:13:48 +01:00
Kevin Wolf
8d3e145e0b Jump to first unread message with Shift+PgUp
This feature doesn't work very well at the moment, but that's not an
excuse not to have a keyboard shortcut for it. As usual, it's the same
shortcut as many other chat clients use.
2023-02-27 12:05:18 +00:00
Kevin Wolf
f40d1b9f4e Jump to bottom and mark messages read with Escape
Pressing the Escape key again when you're already at the bottom and
there are no unread messages takes you back to the room list like
before.
2023-02-27 12:05:18 +00:00
Kevin Wolf
e9cd165457 Fix Escape shortcut in RoomPage
Since commit eee93e0f1, the ChatBar has a conflicting shortcut that
takes precedence even when it doesn't do anything, so that the Escape
shortcut of RoomPage is never actually invoked any more.

Fix this by using Keys.onShortcutOverride() instead in ChatBar and
accepting the event only when it actually cancelled something. So if
you're writing a reply, the first time pressing Escape cancels the reply
and the second one calls the RoomPage shortcut that goes to the
RoomListPage.
2023-02-27 12:05:18 +00:00
Kevin Wolf
c0c86c67b6 Alt+Shift+Up/Down to switch to previous/next unread room
This is the same key combination as commonly used by other chat clients
such as Element, Slack and Discord. For consistency, also add the same
Alt+Up/Down shortcut as used in thes other clients as aliases for
switching rooms without considering the unread status.
2023-02-27 12:05:18 +00:00
Kevin Wolf
12afa43d23 Scroll the room content with PgUp/PgDown
This is pretty much standard behaviour in any chat client. We should do
the same.
2023-02-27 12:05:18 +00:00
Kevin Wolf
386f637b94 Add Ctrl+U shortcut for switching user
This is a key combination that doesn't seem to be used either in NeoChat
nor with a common meaning in other chat clients, so let's use it for
switching the user.
2023-02-27 12:05:18 +00:00
Kevin Wolf
d7bd9f4609 Use Shortcut for keyboard room switching
This allows to use the room switching shortcuts like Ctrl+PgUp/PgDn even
when the RoomPage doesn't currently have the focus. It's also a nice
code simplification.
2023-02-27 12:05:18 +00:00
Kevin Wolf
33c9edc9a3 Don't switch to invisible first/last room on Ctrl+PgUp/PgDn
If you're on the first visible room and try to switch to the previous
one (or on the last visible room switching to the next one), the first
(or last) room in the list is incorrectly selected even if it's not
currently visible.

Fix this by not first entering each room and then checking whether it is
the one we really wanted, but iterating until we find a room that we
want and only entering it then.
2023-02-27 12:05:18 +00:00
Kevin Wolf
3b2dbc731e RoomListPage: Fix skipping invisible items in goToNextRoom()
We don't want to skip over invisible items if they are one element after
the end of the ListView, but if they aren't the last item.
2023-02-27 12:05:18 +00:00
l10n daemon script
51a29ac528 GIT_SILENT Sync po/docbooks with svn 2023-02-27 02:37:04 +00:00
James Graham
cc8bf79a9b Allow read marker to be cleared when at 0 in Timeline
The read marker can be at posiiton 0 in the timeline so make sure that can be cleared by checking >=0 in markReadIfVisible
2023-02-26 09:20:15 +00:00
l10n daemon script
8d47e58861 GIT_SILENT Sync po/docbooks with svn 2023-02-26 02:23:15 +00:00
James Graham
47ce8a4846 Add button to copy the room Id to clipboard 2023-02-25 22:09:13 +00:00
James Graham
71c9537c61 Fix Inline Edit Focus
Make sure that the inline edit component get focus when an edit is started and the cursor is at the end
2023-02-25 16:30:17 +00:00
Nicolas Fella
8825e6ec83 Add parent windows to file dialogs
This makes sure they are properly placed and modal to the main window
2023-02-25 12:14:58 +00:00
James Graham
44ec93f0a0 Change plain text for a spolier from /rainbow to /spoiler. 2023-02-25 10:34:53 +00:00
l10n daemon script
ed7688e66f GIT_SILENT Sync po/docbooks with svn 2023-02-25 03:06:51 +00:00
Tobias Fella
6b49854b12 Automatically open room after creation 2023-02-24 18:15:50 +00:00
l10n daemon script
e8484ebc7a GIT_SILENT Sync po/docbooks with svn 2023-02-24 02:19:24 +00:00
Tobias Fella
17d01c68c4 Prefer password login over sso login when failing to query flows
Password login is more likely to be correct, maybe this can help in some cases

Fixes #513
2023-02-23 20:06:30 +00:00
Joshua Goins
dae2cbab90 Refresh the notification count when unread stats change
libquotient doesn't update the notification count properly, so let's
listen on the unread stats changing instead.
2023-02-23 19:36:13 +00:00
l10n daemon script
b8e8fa3ee5 GIT_SILENT Sync po/docbooks with svn 2023-02-23 02:21:10 +00:00
Tobias Fella
9c4a925171 Indicate messages that are not sent yet 2023-02-22 23:21:03 +00:00
Tobias Fella
8996806b05 Copy other user's matrix ID instead of room id for direct messages
Implements #469
2023-02-22 19:56:37 +00:00
l10n daemon script
2bd4579c10 GIT_SILENT Sync po/docbooks with svn 2023-02-22 02:11:15 +00:00
l10n daemon script
0891f32c08 GIT_SILENT Sync po/docbooks with svn 2023-02-21 02:19:57 +00:00
Tobias Fella
5287c2d529 Focus member search field when opening it 2023-02-20 23:27:05 +01:00
Kevin Wolf
084b89f3dc Fix two null pointer dereferences 2023-02-20 19:00:54 +00:00
James Graham
2dd3197beb Inline Edit Fixes
- Make sure the connection to the room's chatBoxEditIdChanged signal is made so that the edit box gets filled.
- Make sure the minimum height and preferred width are available to the loader so they can be set and dynamically updated.

BUG: 465934
2023-02-20 18:24:00 +00:00
Tobias Fella
6d9dca7da8 Show a warning when a file is too large to download
BUG: 465527
2023-02-20 17:19:19 +00:00
Kevin Wolf
e0f16054fc Fix Ctrl+PgUp/PgDn shortcut for room switching
Before this change, Ctrl+PgUp/PgDown didn't select the next room, but
actually moved two rooms at once because the signal handler was called
twice. I'm not entirely sure why this happens (it might be a bug in a
lower layer?), but as we don't want to handle the same event elsewhere,
accepting the event doesn't feel wrong and it appears to fix the issue.
So let's just do that.

BUG: 459997
2023-02-20 17:07:35 +00:00
l10n daemon script
fa70679439 GIT_SILENT Sync po/docbooks with svn 2023-02-20 02:21:40 +00:00
l10n daemon script
949bd20873 GIT_SILENT Sync po/docbooks with svn 2023-02-19 02:24:50 +00:00
l10n daemon script
79a9eb0de0 GIT_SILENT Sync po/docbooks with svn 2023-02-18 02:21:24 +00:00
Shooting Star
e1b9bc7d0e Add knock command 2023-02-17 13:29:02 +00:00
l10n daemon script
a1abf22174 GIT_SILENT Sync po/docbooks with svn 2023-02-17 02:15:57 +00:00
Tobias Fella
fa27d993e2 Don't complete emojis when typing uppercase letters
BUG: 463049
2023-02-16 15:06:52 +00:00
l10n daemon script
d4b750433e GIT_SILENT Sync po/docbooks with svn 2023-02-16 03:09:51 +00:00
Tobias Fella
9df534c72c Check if connection is null when handling notifications
BUG: 465143
2023-02-16 00:30:27 +01:00
James Graham
f785e4d5b0 Inline Edit Loader
Put the edit component in a loader to that it doesn't use resources when not in use.

CCBUG: 465715
2023-02-15 19:30:23 +00:00
James Graham
f186be7314 Disable link loading animation when offscreen
Stop the link preview loading indicator animation running when the delegate isn't visible.

CCBUG: 465715
2023-02-15 18:22:51 +00:00
l10n daemon script
3cbcc2b597 GIT_SILENT Sync po/docbooks with svn 2023-02-15 02:19:47 +00:00
l10n daemon script
61f3d6c9ae GIT_SILENT Sync po/docbooks with svn 2023-02-14 02:18:22 +00:00
l10n daemon script
d8b2436f0d GIT_SILENT Sync po/docbooks with svn 2023-02-13 02:14:05 +00:00
James Graham
ea76edce74 Improve Link Preview Sizing
Update linkpreviewer to minimise the number of resizes.

- There is now a placeholder loading element to hold space while the data is obtained
- The component starts with a set size but can be expanded to see the whole item.
- The expand/contract button is only visible on hover
- The default size is picked to show 3 lines of text (1 heading and 2 description, 2 heading and 1 description, etc)

This is designed to help with the timeline scroll jumping CCBUG: 463235 by minimizing the amount of resizing for items in the timeline.

Before

![image](/uploads/bb46f55dc38851e640a7382aafea8640/image.png)

After when compressed

![image](/uploads/3cbc7894688721d944a5551251b12a12/image.png)

After When expanded

![image](/uploads/50ff53fe51eefe88713a2ded34530534/image.png)

After Loading

![image](/uploads/72567f805af6b08ab0c5fc1cf94bd247/image.png)
2023-02-12 21:10:52 +00:00
James Graham
5482aad7ba Inline Edits
Edit text messages inline instead of in the chatbar
2023-02-12 13:46:23 +00:00
James Graham
aaa26571d1 Foldable State Events
Implement folding sections for multiple consecutive state events. This also reworks some of the aggregated text output:

- Only new days cause a new section
- The aggregated text starts with either a single username or n users
- If the same user did the same action mutltiple times it will be in the aggregated text a user did x n times
- When there are multiple authors in a block with multiple state event types it will use or rather than and before the last event. e.g 3 user left the room or joined the room.

Folded

![image](/uploads/17141ed5e1f2e0e3539523a082275976/image.png)

Unfolded

![image](/uploads/1d5db5804da457b921544cc81099997d/image.png)

Implements network/neochat#90
2023-02-12 11:43:39 +00:00
l10n daemon script
554e3576fd GIT_SILENT Sync po/docbooks with svn 2023-02-11 02:13:55 +00:00
l10n daemon script
8d2c7ff8c2 GIT_SILENT Sync po/docbooks with svn 2023-02-10 02:19:19 +00:00
l10n daemon script
92261eb94f GIT_SILENT Sync po/docbooks with svn 2023-02-09 02:31:12 +00:00
Tobias Fella
4dfb7fc3e2 Use 22.08 flatpak runtime for CI 2023-02-08 18:19:22 +01:00
l10n daemon script
2728446692 GIT_SILENT Sync po/docbooks with svn 2023-02-08 03:07:40 +00:00
Devin Lin
dfb32fe687 Fix project name 2023-02-07 20:15:48 +00:00
Devin Lin
55507112a9 Move neochat to the release service 2023-02-07 20:15:48 +00:00
Nikita Karpei
d9aa77a9f4 Fix crash after logout 2023-02-07 19:54:27 +00:00
Nikita Karpei
c0ea52c331 Fix crash after login 2023-02-07 18:53:49 +00:00
Nikita Karpei
f1b9d2329f Don't play GIF images while Neochat isn't focused
BUG: 465019
2023-02-07 17:33:10 +00:00
l10n daemon script
0707fd8189 GIT_SILENT Sync po/docbooks with svn 2023-02-07 02:21:31 +00:00
Nikita Karpei
6bef2205db Delete a device from the list if the job succeed 2023-02-06 20:51:26 +00:00
Wang Zichong
ace62b4df1 Use SelectableLabel for selectable labels 2023-02-06 11:16:08 +08:00
l10n daemon script
d76e512785 GIT_SILENT Sync po/docbooks with svn 2023-02-06 02:25:46 +00:00
l10n daemon script
db2692c411 GIT_SILENT Sync po/docbooks with svn 2023-02-05 02:15:49 +00:00
l10n daemon script
4c9bdd03ce GIT_SILENT Sync po/docbooks with svn 2023-02-04 02:37:23 +00:00
l10n daemon script
efa2c012a7 GIT_SILENT Sync po/docbooks with svn 2023-02-03 02:27:55 +00:00
Shooting Star
072dc1b6a3 Show error if room join failed 2023-02-02 21:31:15 +00:00
James Graham
4066427168 Fix Account Switcher Missing Clicks
Use a state machine to open and close the account switcher so clicks aren't missed.

BUG: 462549
2023-02-02 21:19:04 +00:00
James Graham
b901c1bdf2 Pull in the updates from video delegate to image delegate to improve sizing behaviour. 2023-02-02 19:28:49 +00:00
l10n daemon script
532310d739 GIT_SILENT Sync po/docbooks with svn 2023-02-02 02:22:20 +00:00
Tobias Fella
4f7d32df2b Fix compilation against Qt6 and add CI 2023-02-01 16:34:39 +00:00
l10n daemon script
833d2159e7 GIT_SILENT Sync po/docbooks with svn 2023-02-01 02:14:48 +00:00
l10n daemon script
ccf8701395 GIT_SILENT Sync po/docbooks with svn 2023-01-31 02:17:09 +00:00
l10n daemon script
5d696aabc4 GIT_SILENT Sync po/docbooks with svn 2023-01-30 02:33:24 +00:00
Tobias Fella
ebd521e2ee Don't crash when leaving an opened room
Should fix #568
2023-01-29 13:51:52 +00:00
Tobias Fella
9d5303113e Close login window after the account is loaded 2023-01-29 09:26:09 +00:00
l10n daemon script
3850fe15a5 GIT_SILENT Sync po/docbooks with svn 2023-01-29 02:21:51 +00:00
Tobias Fella
5392481d06 Try fixing sqlite on android 2023-01-28 23:50:14 +01:00
Tobias Fella
0ce048517b Update gitignore 2023-01-28 22:57:15 +01:00
James Graham
c51e16e16c Add basic video controls
Add play, volume and duration slider

![image](/uploads/e85c6685c3d81c7a3839727a995b816f/image.png)
2023-01-28 19:17:17 +00:00
Joshua Goins
765a95050d Replace deprecated usage of iconName with icon.name 2023-01-28 17:48:45 +00:00
l10n daemon script
38dcefffcb GIT_SILENT Sync po/docbooks with svn 2023-01-28 02:22:22 +00:00
Carl Schwan
391b61dcb4 Bump cmake version to 23.01
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-01-27 20:47:44 +00:00
Tobias Fella
d76c9fcbcf Add release notes for 23.01 2023-01-27 20:47:44 +00:00
Tobias Fella
f7b8ae2af2 Link against sqlite on android
This is needed to ensure that the sqlite lib is packaged into the apk
2023-01-27 21:33:57 +01:00
l10n daemon script
ddbf9b60d4 GIT_SILENT Sync po/docbooks with svn 2023-01-27 02:17:55 +00:00
James Graham
8948ff5faa Add padding to the right of the timeline delegate highlight same as left 2023-01-26 15:50:52 +00:00
l10n daemon script
d270e202a8 GIT_SILENT Sync po/docbooks with svn 2023-01-26 02:09:20 +00:00
l10n daemon script
61e1dd14ba GIT_SILENT Sync po/docbooks with svn 2023-01-25 02:22:18 +00:00
James Graham
eee93e0f1f Chatbar Refactor
This is mostly a stylistic rework of the chatbar but there are some buxfixes / improvements in here as well. The aim was to make the chatbar so it's size was managed in the same manner as the timeline in both bubble and compactmode in the same manner as network/neochat!476.

The other features are:
- Replies, attachments and edits now look like they are inside the chatbar and use a similar styling to edits in message bubbles
- Replies and edits now part of the message so they arte part of the ScrollView and will scroll away when the text is long
- ~~The emoji picker is now a popup so it doesn't mess with the timeline layout when activated~~ (done in network/neochat!697)
- ~~Emoji dialog is now no longer required as the picker itself is a popup now~~ (no longer the case see above)
- The scrollbar now sits on the right of the chatbar actions rather than weirdly to the left
- The action icons will always stay in the same place even as the chatbar gets taller


Updated\
![2022-12-10_14-13-41.mkv](/uploads/ccbe14843834a19bf98ef0028e023eae/2022-12-10_14-13-41.mkv)

Scrollbar behaviour before
![chatbar_refactor_scrollbar_before](/uploads/2f3b91a79eb302ccf83dd35e51004e6a/chatbar_refactor_scrollbar_before.png)

Scrollbar behaviour after
![chatbar_refactor_scrollbar_after](/uploads/fcab044d8a4338ed9bcff6721b65e89c/chatbar_refactor_scrollbar_after.png)
2023-01-24 18:02:19 +00:00
l10n daemon script
826760a55c GIT_SILENT Sync po/docbooks with svn 2023-01-24 02:18:50 +00:00
Tamara Schmitz
749398df8f remove execute bit from LICENSE file 2023-01-23 11:29:01 +01:00
l10n daemon script
150968d226 GIT_SILENT Sync po/docbooks with svn 2023-01-23 02:10:28 +00:00
l10n daemon script
d81df24e7c SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-01-23 01:56:42 +00:00
James Graham
594a5cf6ca Move the qt models to their own folder
Felt like the src folder was getting a bit crowded so move all the models to a folder named models.
2023-01-22 21:33:30 +00:00
Joshua Goins
0af420b824 Improve link regex to fix handling paranthesis and question marks
This patch fixes two key issues:
* `?` is considered part of the URL, even if there might not be anything past it. I've seen people now putting spaces after URLs to get around this issue.
* `)` is also part of the URL, as well as `:` despite those not being valid characters at the end of URLs.
2023-01-22 18:35:31 +00:00
l10n daemon script
31fed8362a GIT_SILENT Sync po/docbooks with svn 2023-01-22 02:19:48 +00:00
Joshua Goins
dbcf8c6327 Change placeholder text to make it clear that it's going to be a caption
When sending an image as an attachment, the message you type into the
chat box becomes its caption. However, it's not clear when in the chat
box itself, which confusingly says you're typing a message.
2023-01-21 22:10:50 +00:00
l10n daemon script
8012392400 GIT_SILENT Sync po/docbooks with svn 2023-01-21 02:13:08 +00:00
l10n daemon script
3e48578b44 GIT_SILENT Sync po/docbooks with svn 2023-01-20 02:15:42 +00:00
Nicolas Fella
d7e656e57f Activate window first thing when clicking on notification
Currently we enter the room first, which introduces a noticeable delay between clicking the notification and the window being activated
2023-01-19 17:56:26 +00:00
Volker Krause
8e83b923d9 Adapt APK build to Qt 5.15.8
This should fix the binary factory build, but it unfortunately not backward
compatible below Qt 5.15.8. Qt 6 will need the same changes anyway, so it's
not all bad at least.
2023-01-19 17:17:47 +01:00
l10n daemon script
a739f0f09f GIT_SILENT Sync po/docbooks with svn 2023-01-19 02:26:37 +00:00
Gary Wang
bc74737b0f Avoid logout when loginError caused by network error 2023-01-18 12:01:10 +08:00
l10n daemon script
e92fccf904 GIT_SILENT Sync po/docbooks with svn 2023-01-18 02:12:14 +00:00
l10n daemon script
20cbedfff5 GIT_SILENT Sync po/docbooks with svn 2023-01-17 02:30:38 +00:00
Xaver Hugl
e0d508d3dd hide the time header in chats if it would be transparent
Text over other text without a background is unreadable and looks horrible,
it's better to not have the header at all
2023-01-16 21:18:17 +01:00
l10n daemon script
af318a2bae GIT_SILENT Sync po/docbooks with svn 2023-01-16 02:19:17 +00:00
l10n daemon script
6b4e81c763 GIT_SILENT Sync po/docbooks with svn 2023-01-15 02:07:37 +00:00
l10n daemon script
dcac63aa04 GIT_SILENT Sync po/docbooks with svn 2023-01-14 17:44:16 +00:00
Nicolas Fella
7818747e45 Also handle notification startupId on X11
On X11 we can get a startupId/token from the notification too, so don't waste it
2023-01-14 12:51:15 +00:00
l10n daemon script
7cb1f856ca GIT_SILENT Sync po/docbooks with svn 2023-01-14 12:42:44 +00:00
James Graham
5955c8e7dc Improve global notification settings
Separate the setting for globally setting push rules on/off from the configuration to decide whether desktop popup notifications are sent.

The current master setting is pulling double duty and should probably be separate as some people may want to see notification counts in Neochat but don't want to see popup notifications on their desktop.
2023-01-14 12:29:08 +00:00
Gary Wang
dee3c279e8 fix crash when open invitation page 2023-01-14 06:17:32 +00:00
l10n daemon script
94427280d8 GIT_SILENT Sync po/docbooks with svn 2023-01-14 02:15:51 +00:00
Gary Wang
8b245b1cc9 fix crash on invite via /invite command 2023-01-13 22:15:22 +08:00
l10n daemon script
0513cd10c4 GIT_SILENT Sync po/docbooks with svn 2023-01-13 02:56:44 +00:00
James Graham
28b5631d06 Update userlistmodel permission roles
Change the userlist model so that permission names are based upon the following power level convention:
- 0: member
- 50: moderator
- 100: admin
- other: custom

This is inline with the new permission room page. Follow on from network/neochat!712
2023-01-12 19:13:20 +00:00
l10n daemon script
5f2cd92da7 GIT_SILENT Sync po/docbooks with svn 2023-01-12 02:16:04 +00:00
Tobias Fella
4535125c54 Change message shown when encryption is disabled in libQuotient 2023-01-11 19:03:29 +00:00
James Graham
8831da956a Notifications for all accounts
- Handle notifications from all accounts not just the active one.
- When a notification from the non-active account is clicked the active account is changed over to enter the correct room.

network/neochat#121
2023-01-11 19:02:51 +00:00
Akseli Lahtinen
f2ec6e1d4c Write inside .cache folder in home, instead of just home
Back when testing !745, i was using `kdesrc-run` and this bug slipped through my fingers: It began to create folder named after the file inside the home (or in this case, kdesrc-run home) folder.

This fixes that. Now the clipboard image files go correctly to `~/.cache/KDE/screenshots/` folder.

Anyhow, my bad, should've done more print debugging.. 😓
2023-01-11 12:58:23 +00:00
l10n daemon script
93f7def532 GIT_SILENT Sync po/docbooks with svn 2023-01-11 02:17:17 +00:00
Wang Zichong
782f5517d3 Fix falsely treat some symbols as emoji 2023-01-10 22:20:49 +00:00
Brent Mackey
f238c18ce8 Fix last message read receipt reporting time in GMT instead of localtime 2023-01-10 20:59:31 +10:00
l10n daemon script
4fe0ea373f GIT_SILENT Sync po/docbooks with svn 2023-01-10 02:13:38 +00:00
l10n daemon script
982d21dd58 GIT_SILENT Sync po/docbooks with svn 2023-01-09 02:16:57 +00:00
l10n daemon script
7002132bde GIT_SILENT Sync po/docbooks with svn 2023-01-08 02:18:44 +00:00
l10n daemon script
1ef931f7e7 GIT_SILENT Sync po/docbooks with svn 2023-01-07 02:50:39 +00:00
l10n daemon script
8797015c6a GIT_SILENT Sync po/docbooks with svn 2023-01-06 02:39:53 +00:00
Gary Wang
85a562d469 Move encrypt room option to Security page 2023-01-05 16:13:59 +00:00
Akseli Lahtinen
f50c62ba12 Use local file path instead of url
If the localFile url is used, it creates a folder called `file:` in the home folder.

So get filepath from url instead :)
2023-01-05 16:09:20 +00:00
Gary Wang
13f05a0995 Move invite option to header of members section
This patch moves the invite option to header of members section. We also check if user can send invitation event and we won't show the invite button if it's not allowed.

This patch also added an toggle button to show the member search bar since it won't needed by the user in most of the cases.
2023-01-05 14:56:29 +00:00
l10n daemon script
1adddcc0d9 GIT_SILENT Sync po/docbooks with svn 2023-01-05 02:21:03 +00:00
Gary Wang
f03cd3f4c6 Fix SSO login button needs to click twice to open login URL
Before this patch, the `ssoUrlChanged` signal might emitted before the URL actually get changed. This patch ensure the signal emitted at the correct place, and also disable the Login button before `LoginHelper` done its work.

To test this change, you can simply enter `@a:mozilla.org` (or whatever the account name is) and attempt to login it by click "continue". Then click the "Login" button and see if the first click can let your browser open the SSO login URL.
2023-01-05 00:42:56 +00:00
James Graham
29a2e4eb99 Room Settings - Permissions
Work to add the ability to set user power levels and modify the power levels required for certain actions.

Updated

![image](/uploads/50bce18f5eb31bb0c3508e03a39e7589/image.png)
2023-01-05 00:36:13 +00:00
Tobias Fella
7137a5808f Fix building room test on windows
Making protected public seems to mess things up
2023-01-04 19:27:49 +00:00
l10n daemon script
fa6f451e11 GIT_SILENT Sync po/docbooks with svn 2023-01-04 02:46:43 +00:00
James Graham
666f247185 Fix Ctrl + F not working
Fix Crtl + F not working by only having the shortcut assigned to a single searchfield. 
- Ctrl + F is now for the roomlist search
- The user search in the room drawer is now ctrl + shift + f
- for the emoji picker and qucik switcher these have the shortcut removed and focus is managed by the popup.

BUG: 462524
2023-01-03 18:06:51 +00:00
Ingo Klöcker
93dd25f954 Add the Microsoft Store URL 2023-01-03 08:13:57 +01:00
l10n daemon script
8e2ba9552f GIT_SILENT Sync po/docbooks with svn 2023-01-03 03:02:20 +00:00
l10n daemon script
1f02c5ea5e SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2023-01-03 02:01:04 +00:00
l10n daemon script
112b26c39d GIT_SILENT made messages (after extraction) 2023-01-03 00:47:28 +00:00
l10n daemon script
5e243ed01b GIT_SILENT Sync po/docbooks with svn 2023-01-02 02:55:40 +00:00
Carl Schwan
706809d12a Make space list smaller
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-01-01 23:38:15 +00:00
l10n daemon script
3fc06c2a74 GIT_SILENT Sync po/docbooks with svn 2023-01-01 02:52:37 +00:00
James Graham
4bc2c42982 Remove stary consol.log statement 2022-12-31 15:25:00 +00:00
James Graham
6651fa4fa3 Improve the sizing of notification count with longer numbers
![image](/uploads/ad2128bbfc0ebfd58e2d58926fceb844/image.png)
2022-12-31 12:54:45 +00:00
l10n daemon script
07d65a0046 GIT_SILENT Sync po/docbooks with svn 2022-12-31 02:17:03 +00:00
Gary Wang
4c9f062a70 Fix from and to is not defined in NetworkProxyPage 2022-12-30 14:08:20 +00:00
James Graham
893ee4a763 Add room upgrade button
Add button to upgrade the room if the user has a high enough power level and the room is not at the highest available version.
2022-12-30 13:51:34 +00:00
Tobias Fella
fa67d174d2 Move room actions out of RoomDrawer header 2022-12-30 13:14:00 +00:00
Gary Wang
bb542521fb Support opening space in room list
While it's not *that* useful since we cannot view all the rooms under the space, it can be useful to view all members inside a Space, and invite people to the Space.
2022-12-30 13:13:39 +00:00
l10n daemon script
85d3cf2d77 GIT_SILENT Sync po/docbooks with svn 2022-12-30 02:30:36 +00:00
Nicolas Fella
ebf4cfb825 Add QCoro to third-party deps 2022-12-29 20:50:52 +01:00
l10n daemon script
d7daa697df GIT_SILENT Sync po/docbooks with svn 2022-12-29 02:20:28 +00:00
James Graham
884484922d Fix Room Initial Position
When the room is changed set the roomlist view to the bottom making sure that it isn't in some random place.

BUG: 456647
2022-12-28 17:36:17 +00:00
James Graham
83ab751d4a Add room id and room version to room settings
Add internal room ID and room version number
2022-12-28 13:06:43 +00:00
l10n daemon script
fcee5bfa92 GIT_SILENT Sync po/docbooks with svn 2022-12-28 02:16:59 +00:00
Gary Wang
eb610ffe81 Allow set room join rule to knock 2022-12-27 13:22:35 +00:00
James Graham
647cc25e57 Improve fileDelegate
Make the buttons in file delegate always align left even in compact layout as this looks better. Also fix margins.

BUG: 463327
2022-12-27 13:19:04 +00:00
Wang Zichong
3912b8e096 Support inviting people from UserDetailDialog 2022-12-27 19:22:38 +08:00
Gary Wang
67f88416f1 Use the correct config option for 'In sidebar'
BUG: 463512
2022-12-27 18:13:33 +08:00
James Graham
8e3398df34 Fix icons only mode
- Fix the headers in icons only mode.
- Allow section collapsing
- Show scrollbar when needed

[2022-12-12_19-06-46.mkv](/uploads/e1633058b2b4a24ef7b6144bf5392b9c/2022-12-12_19-06-46.mkv)

BUG: 462576
2022-12-27 09:57:53 +00:00
l10n daemon script
1a09405829 GIT_SILENT Sync po/docbooks with svn 2022-12-27 02:09:12 +00:00
Gary Wang
304054a4bb Add a compact room list option 2022-12-26 21:31:36 +00:00
James Graham
3c33bea7db Improve UserDetailDialog
- Cleanup Layout.
- Remove broken show avatar as FullScreenImage as I see no value and it hasn't worked for a while now and no one complained.
2022-12-26 18:05:58 +00:00
l10n daemon script
15a7cc6e08 GIT_SILENT Sync po/docbooks with svn 2022-12-26 02:17:33 +00:00
l10n daemon script
19b530d34b SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-12-26 02:03:49 +00:00
l10n daemon script
7fe8bc9f3b GIT_SILENT made messages (after extraction) 2022-12-26 00:53:18 +00:00
l10n daemon script
422fca4dc9 GIT_SILENT Sync po/docbooks with svn 2022-12-25 02:46:50 +00:00
l10n daemon script
142dbe2c2c GIT_SILENT Sync po/docbooks with svn 2022-12-24 02:12:04 +00:00
l10n daemon script
dced8ace1d GIT_SILENT Sync po/docbooks with svn 2022-12-23 02:07:44 +00:00
Tobias Fella
de1fa71d8c Fix uploading files
BUG: 462751
2022-12-22 20:53:57 +00:00
James Graham
158c99daef Improve timeline image sizing
Improve the initial resizing of an image in the timeline by always looking to see whether sourcesize or image.info is populated first.

This allows the actual size of the image to be calculated as soon as possible while still maintaining the fix fo CCBUG: 460205

May also help CCBUG: 463235 I need help testing this it currently no longer happens for me.
2022-12-22 20:23:00 +00:00
Tobias Fella
51e0023384 Implement searching in rooms
BUG: 457839
2022-12-22 19:49:48 +00:00
l10n daemon script
7f27056a34 GIT_SILENT Sync po/docbooks with svn 2022-12-22 02:04:02 +00:00
l10n daemon script
cdbf5ea8e7 GIT_SILENT Sync po/docbooks with svn 2022-12-21 02:07:31 +00:00
l10n daemon script
8bbd5e5a88 GIT_SILENT Sync po/docbooks with svn 2022-12-20 02:04:45 +00:00
James Graham
2e3c2c2424 Fix roompage sectionBanner visible check
change check to `messageListView.sectionBannerItem != undefined` so that the command line isn't spammed with qrc:/RoomPage.qml:263:13: Unable to assign [undefined] to bool
2022-12-19 16:00:41 +00:00
James Graham
80faa4bd4f Set the page title for room/space settings windows 2022-12-19 15:26:51 +00:00
Wang Zichong
de6f93b200 Remove no longer existed property 2022-12-19 22:20:21 +08:00
Laurent Montel
c46bfe05c1 Remove duplicate headers between cpp/h files 2022-12-19 13:32:39 +01:00
l10n daemon script
0d50af6285 GIT_SILENT Sync po/docbooks with svn 2022-12-17 12:30:52 +00:00
l10n daemon script
efb9ca5ac8 GIT_SILENT Sync po/docbooks with svn 2022-12-17 02:14:51 +00:00
l10n daemon script
3ad5b62e27 GIT_SILENT Sync po/docbooks with svn 2022-12-16 02:20:30 +00:00
Nicolas Fella
8985aadcf1 Process KDBusService before loading QML
Otherwise we start loading QML before we attach to an existing instance

Not only is this wasteful but it also breaks raising the existing window on X11 since showing a window clears the startup id
2022-12-15 22:32:40 +01:00
l10n daemon script
907d52d693 GIT_SILENT Sync po/docbooks with svn 2022-12-15 02:16:49 +00:00
James Graham
eb5523a69c Make sure the function createRoomListContextMenu doesn't make the roomlist settings button visible on mobile 2022-12-14 18:22:42 +00:00
James Graham
f475965cf7 Fix code formatting 2022-12-14 16:14:13 +00:00
James Graham
1176cf029b Now allow links to be clicked in replies 2022-12-14 16:14:13 +00:00
James Graham
d68fb81bcf Show a Qt.PointingHandCursor when hovering over a reply 2022-12-14 16:14:13 +00:00
James Graham
81f7afe730 Fix the hover text for add alias button.
Only show the add alias textfield if the user has the appropriate permissions
2022-12-14 16:04:58 +00:00
l10n daemon script
60e43a2794 GIT_SILENT Sync po/docbooks with svn 2022-12-14 02:45:30 +00:00
Nicolas Fella
76f686b580 Require QCoro 0.4 2022-12-13 18:06:51 +00:00
l10n daemon script
cba4fdc397 GIT_SILENT Sync po/docbooks with svn 2022-12-13 02:30:29 +00:00
l10n daemon script
62ea4bc67d GIT_SILENT Sync po/docbooks with svn 2022-12-12 02:22:30 +00:00
James Graham
25c7b7b780 Hide loading item and show info message when on the devices page and not logged in. 2022-12-11 16:47:16 +00:00
James Graham
6b3f44e923 Fix crash when opening notification settings with no account by making sure that the keyword model doesn't try to update the noficiation settings when there is no active connection.
Also make sure that ability to add a keyword or change the global notiifcaiton state is disabled without an active connection as these will cause the same crash.
2022-12-11 13:11:02 +00:00
James Graham
9334585e0f Add missing icons to CMakeLists.txt so they are available on mobile 2022-12-11 13:08:59 +00:00
James Graham
1190511b54 Don't show the settings button in the RoomListPage if on mobile 2022-12-11 11:00:00 +00:00
l10n daemon script
b40d51841e GIT_SILENT Sync po/docbooks with svn 2022-12-11 02:12:55 +00:00
Nicolas Fella
f2ddee09c0 Add third-party deps to .kde-ci.yml
The CI system already provides these so it doesn't have any effect there, but this allows to generate correct dependency data for kdesrc-build from .kde-ci.yml
2022-12-10 13:54:08 +01:00
l10n daemon script
698cbceda3 GIT_SILENT Sync po/docbooks with svn 2022-12-10 02:00:43 +00:00
l10n daemon script
66b1499fad GIT_SILENT Sync po/docbooks with svn 2022-12-09 02:00:06 +00:00
l10n daemon script
e8748ce733 GIT_SILENT Sync po/docbooks with svn 2022-12-08 02:12:20 +00:00
James Graham
4bfa9c783c Move check for RoomPage being visible on the pagestack to enabled so the RoomDrawer can't be swiped on mobile. 2022-12-07 20:12:31 +00:00
Gary Wang
5cdfa086b2 Move tones data to another file to workaround msvc bigobj issue 2022-12-07 15:38:39 +00:00
Gary Wang
e8824edfd4 Add description for emoji 2022-12-07 15:38:39 +00:00
Gary Wang
507bd44bbf Add Quick Reaction to EmojiDialog 2022-12-07 14:44:05 +00:00
Tobias Fella
bfa08d178f Remove \r\n linebreaks in roomlist subtitles
BUG: 462575
2022-12-07 08:36:41 +00:00
Zhang Dingyuan
9e01c96476 feat: support proxy user and password 2022-12-07 11:48:17 +08:00
l10n daemon script
fe855f16f8 GIT_SILENT Sync po/docbooks with svn 2022-12-07 02:08:08 +00:00
Carl Schwan
0fbc1b2121 Improve sizing of emoji delegate
* Use Kirigami.Units.gridUnit * 2.5 for normal emoji
* Use Kirigami.Units.gridUnit * 3 for custom emoji
* Add small background padding to delegate
* Add rounded hover effect

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-12-06 23:40:25 +01:00
James Graham
b5d8acf9de Use EmojiDialog popup in chatbar
This converts the emoji dialog in the chatbar to be the same popup as for reactions. This includes:

- EmojiPicker and ReactionPicker were already similar and are made identical, as such ReactionPicker no longer needed
- Emoji dialog used for both reactions and chatbar emojis
- Add some parameters to allow for different use cases (include custom emojis and whether selection closes the popup)

![image](/uploads/c71bb5ffdc6914efad654998a886ade6/image.png)
2022-12-06 14:49:25 +00:00
l10n daemon script
1ab5bdb600 GIT_SILENT Sync po/docbooks with svn 2022-12-06 01:59:17 +00:00
Tobias Fella
9060de1d60 Improve emojis & reactions 2022-12-05 16:46:55 +00:00
Tobias Fella
1f83ab4450 Remove Keys from FullScreenImage
Broken apparently
2022-12-05 16:29:25 +01:00
Gary Wang
e5680da5ce Use more commonly-used emoji shortname 2022-12-05 09:50:27 +00:00
Tobias Fella
66bfcd6239 Fix cursorShape for avatar in StateDelegate
BUG: 454893
2022-12-05 00:35:40 +01:00
l10n daemon script
8f19c73908 GIT_SILENT Sync po/docbooks with svn 2022-12-04 02:02:15 +00:00
l10n daemon script
716616210f GIT_SILENT Sync po/docbooks with svn 2022-12-03 02:08:50 +00:00
l10n daemon script
cc414f71f4 GIT_SILENT Sync po/docbooks with svn 2022-12-02 02:56:27 +00:00
Tobias Fella
d107dfcab1 Fix file size when uploading files
BUG: 462416
2022-12-01 14:55:10 +00:00
Wang Zichong
875c03a0f6 fix: add missing QQC2 for InviteUserPage 2022-12-01 12:00:25 +08:00
l10n daemon script
4145987c65 GIT_SILENT Sync po/docbooks with svn 2022-12-01 02:04:01 +00:00
Ingo Klöcker
232f3f624b Add icons for the appx bundle for the Microsoft Store 2022-11-30 17:49:15 +00:00
Tobias Fella
2a2791c37f Try fixing windows icon 2022-11-30 17:16:36 +01:00
Tobias Fella
f1c9f5902a Hide account switcher in collapsed roomlist mode 2022-11-30 14:35:34 +01:00
Bhushan Shah
3f8d2a11d0 Update version number for 22.11
GIT_SILENT
2022-11-30 13:30:05 +05:30
l10n daemon script
eb38741486 GIT_SILENT Sync po/docbooks with svn 2022-11-30 02:06:44 +00:00
Tobias Fella
f207f57bd5 Various Qt6 fixes 2022-11-30 00:13:29 +00:00
Tobias Fella
74b9f5fa4f Make sure at most one layer is pushed from the menu
BUG: 459738
2022-11-30 00:07:33 +00:00
Tobias Fella
6347c02d8b Delete access token file infrastructure
We've never supported it and it's broken, unsecure and leads to crashes-

BUG: 460407
2022-11-29 23:43:35 +00:00
Tobias Fella
8dbfc093fa Don't show "Configure Web Shortcuts" in flatpak
Doesn't work as it requires kcmshell5
2022-11-29 23:34:43 +00:00
James Graham
6acb847843 Migrate room general settings to mobileform
![image](/uploads/98b895cbbf59ef9215b2085e120e5db5/image.png)
2022-11-29 23:27:30 +00:00
Tobias Fella
e270a46a36 Add Kirigami-Addons to CI 2022-11-29 22:57:23 +00:00
Tobias Fella
e010116232 Re-enable windows CI 2022-11-29 23:51:46 +01:00
Tobias Fella
9bcbdb78fd Revert "Fix /me giving extra newline"
This reverts commit 42d728ac4b.
2022-11-29 16:21:45 +01:00
Devin Lin
85b0ec1e96 Add compile time Kirigami Addons dependency 2022-11-29 03:15:50 +00:00
l10n daemon script
e4f42e2c2b GIT_SILENT Sync po/docbooks with svn 2022-11-29 02:06:38 +00:00
Tobias Fella
8b5910773c Fix avatar name in RoomDrawer for DMs 2022-11-28 20:36:28 +01:00
Tobias Fella
1366158b45 Add menu items to copy matrix.to links for users and messages
BUG: 456637
2022-11-28 19:01:27 +00:00
Tobias Fella
d0dd86e6e8 Add option to hide deleted messages
Implements #430
2022-11-28 18:52:49 +00:00
James Graham
af40860315 Fix roompage up/down button highlights
Set the focus to the chatbar after clicking the jump up/down buttons so that they don't stay highlighted.
Also remove messageListView.headerItem.height as part of the down button margin calc as it no longer exists

BUG: 456075
2022-11-28 18:43:52 +00:00
Tobias Fella
f3d7fbc483 Don't convert emotes to HTML
BUG: 461837
2022-11-28 18:31:42 +00:00
Nicolas Fella
d07066e540 Don't hardcode Qt5 2022-11-28 03:06:45 +01:00
Akseli Lahtinen
dfb569c0f6 Possible typing notification fixes
I've made few possible fixes for the typing notification getting stuck for long periods of time.

I could use some help testing these to see if they help others too. 

For me the typing notification doesn't linger around that long after these changes.
2022-11-27 20:44:41 +00:00
Tobias Fella
fda433706b Remember last used folder in save dialogs
BUG: 460166
2022-11-27 19:54:07 +00:00
Tobias Fella
a734be5f9e Open target room when using join command with an already joined room
BUG: 455825
2022-11-27 18:04:17 +00:00
Tobias Fella
7ebd82d441 Port Loading.qml to LoadingPlaceholder
BUG: 456629
2022-11-27 18:31:42 +01:00
Tobias Fella
9bf5c1adf2 Don't clear chatbox text when starting a reply 2022-11-27 17:26:22 +01:00
James Graham
e813fc336d chatboxhelper.cpp was leftover from the input refactor when the .h was removed so remove now. 2022-11-27 14:50:32 +00:00
James Graham
0c57765465 Fix the padding in the security and push notification room settings page 2022-11-27 13:31:40 +00:00
James Graham
0ef1d4bfa3 Fix RoomDrawer Button Visibility
Change the condition for RoomDrawer handle visibility to pageStack.visibleItems.length > 1 rather than wideMode so that it is always visible when the window is wide enough to have 2 pages shown.

BUG: 455976
2022-11-27 13:31:04 +00:00
Tobias Fella
252108c652 Don't show replied-to event as edited for edited replies 2022-11-27 13:03:09 +00:00
James Graham
bad15cadd1 Fix link preview persisiting when room changed
Clear the hovertext on room change

BUG: 461036
2022-11-27 12:07:46 +00:00
l10n daemon script
2b512087e0 GIT_SILENT Sync po/docbooks with svn 2022-11-27 02:01:07 +00:00
Tobias Fella
3697146f44 Revert "Implement selection across multiple MessageDelegates"
This reverts commit 405c2c3d2d.
2022-11-27 02:18:14 +01:00
Tobias Fella
a313522d08 Set Accessible names for space list 2022-11-27 01:58:17 +01:00
Tobias Fella
e8668d52cd Improve avatar in QuickSwitcher 2022-11-27 01:56:41 +01:00
Tobias Fella
8944c0ac78 Improve mobile room list context menu 2022-11-27 01:51:57 +01:00
Tobias Fella
f2503723a4 Don't show header on android
All of the corresponding settings are hidden so it would be empty
2022-11-26 23:31:05 +01:00
Tobias Fella
405c2c3d2d Implement selection across multiple MessageDelegates
BUG: 457669
2022-11-26 18:10:45 +01:00
Tobias Fella
99ad4130d9 Disable DropArea in flatpak
The droparea doesn't support flatpak and dropping something leads to a crash

BUG: 455990
2022-11-26 15:30:11 +01:00
Tobias Fella
c96d894714 Add kirigami-addons to flatpak manifest 2022-11-26 15:29:12 +01:00
Tobias Fella
dd0300d025 Reimplement normal emoji completion
BUG: 460632
2022-11-26 13:56:02 +00:00
Gary Wang
f27b64edef Add a status icon for muted room on RoomListPage
![图片](/uploads/3ae8ca85875765a75f0c4f19a60c7af2/图片.png)

This could be helpful for some working use-case: When user want to mute a channel temporary and want to un-mute it later, the icon could help user know the mute status at a glance so they won't forget to un-mute the channel.

This icon will only be shown if the channel is muted, and have no unread message and the item is not hovered, so it won't get in the way when user have unread messages.
2022-11-26 13:55:45 +00:00
l10n daemon script
1f0e8dd87d GIT_SILENT Sync po/docbooks with svn 2022-11-26 02:02:12 +00:00
l10n daemon script
0dfdad5f32 GIT_SILENT made messages (after extraction) 2022-11-26 00:46:31 +00:00
Tobias Fella
e729097df1 Add my website to aboutdata 2022-11-26 01:01:10 +01:00
Tobias Fella
03f4234483 Modernize AboutData registration 2022-11-26 00:59:17 +01:00
Tobias Fella
933bf1877f Create better EmojiModel 2022-11-25 23:43:34 +00:00
Tobias Fella
8895693dc4 Allow adding a reason for banning a user 2022-11-25 22:28:17 +00:00
Tobias Fella
2920247ab4 Don't render custom emojis in code blocks
BUG: 458993
2022-11-25 22:27:21 +00:00
Tobias Fella
debf2e41d6 Add nameFilter to custom emoticon file selector
BUG: 455011
2022-11-25 22:26:45 +00:00
Tobias Fella
9d8cc5c907 Fix cursor position when inserting emoji
BUG: 456641
2022-11-25 17:05:26 +00:00
James Graham
054ad80d30 Add history visibiltiy room setting
Add setting for setting the history visibility.

Note this setting can only be read not set for Quotient version < 0.7 as there is no event definition for a history visibility state event and it doesn't seem worth creating one when not needed with Quotient 0.7.

BUG: 457840
2022-11-25 16:13:01 +00:00
Tobias Fella
23548ef151 Fix compilation against newer libQuotient 2022-11-25 14:10:04 +01:00
l10n daemon script
b488da4e33 GIT_SILENT Sync po/docbooks with svn 2022-11-25 02:06:26 +00:00
James Graham
1fb3d35021 Add tooltips to the device settings page
Add tooltips to the device settings page

BUG: 456859
2022-11-24 21:17:44 +00:00
James Graham
eff994a9be Fix readmarker background colour animation
Update the target for the read marker background colour animation
2022-11-24 21:04:48 +00:00
Devin Lin
10796b2359 Tune up settings to fix inconsistencies and improve layout
There were some inconsistencies in capitalization and colons, so those were fixed in this MR.
I also rearranged some settings in the appearance section to improve the grouping.
2022-11-24 20:19:39 +00:00
Devin Lin
60243c723a Fix account button margins on settings page 2022-11-24 19:54:56 +00:00
l10n daemon script
6e4fda2737 GIT_SILENT Sync po/docbooks with svn 2022-11-24 02:02:47 +00:00
Tobias Fella
ab1b1f6c08 Integrate file uploads and downloads with plasma's job tracker
Implements #538
2022-11-23 23:16:50 +00:00
Yuri Chornoivan
37e4d85978 Fix minor typo 2022-11-23 07:14:54 +02:00
l10n daemon script
ef9f17840d GIT_SILENT Sync po/docbooks with svn 2022-11-23 02:11:14 +00:00
Tobias Fella
67980ea560 Fix starting device verification 2022-11-22 23:55:42 +01:00
Tobias Fella
beef616caa Fix running 2022-11-22 23:12:45 +01:00
James Graham
7ce02ef0db Improve read marker
- Update from deprecated readMarkerEventId to lastFullyReadEventId for quotient 0.7.
- Removed duplicate code for marking read from the read marker delegate.
- Make sure that mark as read only trigger at the end of the timeline
- Allow the read marker to be highlighted when jumped to
2022-11-22 20:25:04 +00:00
Tobias Fella
eac2f30087 Show hover link indicator in RoomWindow
BUG: 455019
2022-11-22 19:33:48 +01:00
Tobias Fella
d647bae102 Close RoomWindow when leaving room
BUG: 454995
2022-11-22 14:56:18 +00:00
Tobias Fella
149ca05423 Add "plain" command to send a message without any formatting
Fixes #532
2022-11-22 15:38:24 +01:00
Wang Zichong
7ee79ee93a Avoid replace URL cross multiple line of text 2022-11-22 16:18:30 +08:00
l10n daemon script
8463aafd7b GIT_SILENT Sync po/docbooks with svn 2022-11-22 02:10:40 +00:00
James Graham
42d728ac4b Fix /me giving extra newline
Make sure that the emote name is added inside the first paragraph rather than as an additional one.

Note alternate to network/neochat!632 because I didn'y realise @tfella had done a patch

CCBUG: 461837
2022-11-21 18:43:29 +00:00
Carl Schwan
4e4f2fac6b Fix android build
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-11-21 17:36:05 +01:00
Carl Schwan
edaf1005d4 Make it possible to "save as" attachment after opening them
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-11-21 16:17:41 +00:00
Carl Schwan
236c6a2d04 Fix opending dir
UrlHelper doesn't return anything so it is useless to check the return
value in a if condition

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-11-21 16:17:41 +00:00
Carl Schwan
ffa8fbf365 Allow to open file directly
Fix #506

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-11-21 16:17:41 +00:00
Tobias Fella
3e5421604b Hide inapplicable settings on android
BUG: 456674
CCBUG: 454741
CCBUG: 456676
2022-11-21 15:24:29 +00:00
Carl Schwan
89471b797d Add missing translators
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-11-21 15:44:44 +01:00
Carl Schwan
7a6ea752e7 Use MobileForm.AboutPage instead
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-11-21 08:46:06 +00:00
Carl Schwan
afa1493799 Also add kitsune in the credits
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-11-21 08:46:06 +00:00
Carl Schwan
f47b5f5ba5 Update author information
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-11-21 08:46:06 +00:00
Carl Schwan
bbcbfb48d9 Use AboutCard Mobileform component
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-11-21 08:46:06 +00:00
l10n daemon script
355985666e GIT_SILENT Sync po/docbooks with svn 2022-11-21 02:03:09 +00:00
Tobias Fella
c789f4d4f7 Set font to Segoe UI Emoji on windows 2022-11-20 23:33:26 +00:00
James Graham
699f38b575 Fix Unclickable Invite in RoomPage
Move the invite PlaceholderMessage inside the ListView so mouse events can be received.

Fixes network/neochat#558
2022-11-20 19:17:27 +00:00
Tobias Fella
2e6df89dc5 Add commands for banning, unbanning and kicking users 2022-11-20 18:59:30 +00:00
James Graham
c0b29afc47 Fix logout
Fix the account editor setting page and the controller logout function so that you can logout without crashing.
2022-11-20 16:55:50 +00:00
James Graham
cd257137ba Fix typing indicator causing markAllMessagesAsRead
Move the typing indicator out of the listView header so it doesn't resize the view when appearing and disappearing causing all messages to be marked as read

BUG: 457666
2022-11-20 16:48:36 +00:00
James Graham
ab844fb075 Escape the characters < and > in sed edits
Fixes network/neochat#425
2022-11-20 16:43:44 +00:00
James Graham
869bb5ad87 Refine mobileform settings
Numerous refinements to the new mobileform setting pages 
- Ensure left and right padding at the top level is 0 for mobile
- Centre align the avatar in the account editor page and add tooltip to button
- Fix the bubble/compact mode setting so that it fits when thin, i.e on mobile
- Fix the loading placeholder in device settings
2022-11-20 16:30:54 +00:00
Tobias Fella
be86eec99c Remove windows CI while cmark is not available 2022-11-20 17:12:15 +01:00
l10n daemon script
53deae552e GIT_SILENT Sync po/docbooks with svn 2022-11-20 02:36:22 +00:00
l10n daemon script
0a4e873110 GIT_SILENT made messages (after extraction) 2022-11-20 00:46:44 +00:00
l10n daemon script
8af406137e GIT_SILENT Sync po/docbooks with svn 2022-11-19 02:04:01 +00:00
Tobias Fella
8d44dd948a Add missing import to ConfirmLogoutDialog 2022-11-18 13:42:45 +01:00
Tobias Fella
6dab5c5936 Fix crash when prevContent is none 2022-11-18 07:56:52 +00:00
l10n daemon script
e23d06ef70 GIT_SILENT Sync po/docbooks with svn 2022-11-18 02:03:57 +00:00
l10n daemon script
57555a3f0b GIT_SILENT made messages (after extraction) 2022-11-18 00:45:01 +00:00
Tobias Fella
d70f77f622 Allow adding a reason for deleting messages
BUG: 458911
2022-11-18 00:56:12 +01:00
Tobias Fella
a695c31b2b Show version number of libquotient 2022-11-17 23:56:27 +01:00
Tobias Fella
b282c335d4 Ask for confirmation before activating encryption in a room 2022-11-17 23:24:30 +01:00
James Graham
74cf615e53 Port the devices settings page to mobileform
As description, also note that the edit device name is now an inline element rather than an overlay.

Normal 
![image](/uploads/46008dfcaa7e29a809f5ef93d2d51b79/image.png)

Editing Name
![image](/uploads/841c70cf9ad03d7abeef62202d799a72/image.png)
2022-11-17 20:00:55 +00:00
Tobias Fella
b8eb18d7bc Remove unused commandmodel 2022-11-17 20:30:50 +01:00
Gary Wang
de1833cc40 port Security and Notifications tab of room settings to mobileform 2022-11-17 17:37:44 +00:00
James Graham
d7f3284aa2 Room Page Up/Down buttons always on top
Ensure that in the small number of cases where the room page up down buttons overlap messages due to the screen being thin that they are always on top

BUG: 461718
2022-11-17 14:35:59 +00:00
James Graham
7e82f75d14 More ApplicationWindow QQC2 2022-11-17 11:31:18 +00:00
James Graham
757733e531 Global Notifications Settings Fixes
Fix it so that scrollpage works and update switch to check delegate
2022-11-17 11:23:50 +00:00
Gary Wang
2cd01164a6 add missing QQC2s 2022-11-17 18:16:46 +08:00
Gary Wang
cae6479a3a Add missing QQC2 to RoomListContextMenu 2022-11-17 08:18:12 +00:00
Gary Wang
bd236e89a3 Use inputMethodHints, correct label text 2022-11-17 07:51:23 +00:00
Tobias Fella
e608e63d1c Add icon for android 2022-11-17 03:16:42 +01:00
l10n daemon script
e5147b3c06 GIT_SILENT Sync po/docbooks with svn 2022-11-17 02:01:22 +00:00
Tobias Fella
c58d8b58ff Implement basic developer tools 2022-11-16 23:45:45 +00:00
Tobias Fella
752e7f4d9a Implement changing join rules 2022-11-16 22:55:04 +00:00
James Graham
1946228d2b Add Global Notification Settings
This add the final list of settings in the main setting window as a new page notifications as there are quite a few now. This completes previous work on push rules giving the ability to set the default global rules. Adding keyword rules is also now supported. 

This also uses the new mobileform layout. The settings are designed to give some visual feedback as options for whether notifications are on/off, play a sound or are highlighted are chosen. The left icon is designed to mimic the notification dot in the roomlist. The whole mobileform delegate can also be clicked to cycle through the available options.

The rationale for whether an option is available is as follows:
- Highlight is not available if would lead to every message in a room being highlighted
- Keyword notifications cannot be switched off instead the rule is just deleted
- Only keyword rules can be deleted, default rules cannot be touched

There is also rules plumbed in for features that don't exist in neochat yet, i.e. encrypted chats and rooms, calls. I figured I may as well plumb these in and test them my plan was to hide them before merge, they can then be unhidden when the features are complete.

![image](/uploads/12fa8378847887ea7234e22b1460f952/image.png)
2022-11-16 20:59:35 +00:00
Marius P
c3fcd280fb serverlistmodel replace "QStringLiteral("")" with "QString()"
Fix clazy issue "src/serverlistmodel.cpp:48:9: warning: Use an empty QLatin1String instead of an empty QStringLiteral [clazy-empty-qstringliteral]".
2022-11-16 19:57:33 +00:00
Gary Wang
f6b2340016 Use FormTextFieldDelegate for host field 2022-11-16 19:55:33 +00:00
Gary Wang
ff98e378e6 Port the network proxy page to mobileform 2022-11-16 19:55:33 +00:00
Tobias Fella
73e7f3eaf1 Make network warning label wrap
BUG: 456866
2022-11-16 20:53:28 +01:00
Carl Schwan
5e15c38afb Add a confirm dialog for the sign out
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-11-16 18:03:25 +00:00
Carl Schwan
05c4d6d90c Port Settings to new Kirigami Form components 2022-11-16 09:52:40 +00:00
l10n daemon script
0c1efd03bb GIT_SILENT Sync po/docbooks with svn 2022-11-16 02:16:24 +00:00
Tobias Fella
5a8cea6d44 Add missing QQC2 2022-11-16 02:05:51 +01:00
James Graham
cc7081cd19 Add nick and roomnick commands to change global and room display names
/nick - changes the global display name
/roomnick - changes the display name fort the room you are in

BUG: 455043
2022-11-15 19:03:45 +00:00
James Graham
5f93dca878 Missing QQC2 on Tooltip in ImageDelegate was causing fullscreen image not to open. 2022-11-15 18:18:48 +00:00
James Graham
95bdaf7b3d Make it so that when the window is wide enough the compact mode messages are indented slightly so that they don't overlap the up and down buttons 2022-11-15 17:54:07 +00:00
Tobias Fella
29603313a5 Fix rendering of custom emoticons 2022-11-15 17:44:29 +00:00
Tobias Fella
0eeb7ffbc9 Fix eliding matrix id and display name in account switcher 2022-11-15 16:37:48 +00:00
Gary Wang
2f6f91e678 fix WelcomePage not working due to missing QQC2 2022-11-15 22:40:02 +08:00
l10n daemon script
6992ed127b GIT_SILENT Sync po/docbooks with svn 2022-11-15 02:11:27 +00:00
Jan Bidler
5f12e10fe9 Adds a workaround to login on servers without .well_known 2022-11-14 23:31:36 +00:00
Carl Schwan
4ed123fd52 Start adding autotests 2022-11-14 23:25:39 +00:00
Tobias Fella
ab5afa26ef Always include QtQuick.Controls as QQC2 2022-11-14 23:21:14 +00:00
Tobias Fella
f733a2edef Fix sending files on android
Requires https://github.com/quotient-im/libQuotient/pull/585
2022-11-14 23:12:23 +00:00
Tobias Fella
b332993b77 Close fullscreen image when pressing the back button 2022-11-14 23:05:20 +00:00
Tobias Fella
d13c00bb20 Update room list subtitle when sending message 2022-11-14 22:13:46 +00:00
Tobias Fella
089c6c1a46 Add validity checks for mentions before inserting them into the message
For yet unknown reasons, sometimes invalid mentions are inserted into the list, which will mess up all further messages. While finding those bugs is the better approach, these checks should also be useful.
2022-11-14 21:53:44 +00:00
Tobias Fella
c03b69cd17 Fix reactions sometimes not showing up
We need to adjust for the readmarker in the model
2022-11-14 20:18:33 +00:00
Tobias Fella
42cd470e15 Fix running without polls 2022-11-14 19:32:46 +01:00
l10n daemon script
2145cfa9a6 GIT_SILENT Sync po/docbooks with svn 2022-11-14 02:05:32 +00:00
Tobias Fella
cd461628ab Account switcher fixes, part 1
- Make account index notifyable
- Give login window a title
- Fix height of account list
2022-11-14 02:30:06 +01:00
Tobias Fella
0e782c4a93 Implement viewing and responding to polls 2022-11-14 01:40:44 +01:00
Tobias Fella
425f2a4b85 Add action to open account editor from account switcher 2022-11-13 19:11:50 +01:00
Tobias Fella
90cbe37a92 Create new Account Switcher 2022-11-13 15:54:42 +00:00
Tobias Fella
cfe3825d63 Stop lying to our users 2022-11-13 16:37:11 +01:00
Carl Schwan
7f403c18ea Add manpage
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-11-13 15:16:08 +00:00
Gary Wang
6ecc18d985 Add proxy config with Socks5 and HTTP proxy support
Resolve https://invent.kde.org/network/neochat/-/issues/547

This patch attempts to add proxy config support to NeoChat so people could set a HTTP or Socks5 proxy for anonymity or privacy/censorship-circumvention reason.

Currently this will only allows setting proxy type, host and port (which should be usable for most of the cases). Settings in that page needs to be applied by clicking the Apply button so the proxy setting won't accidentally get changed.

Proxy is disabled (use System Default option) by default.
2022-11-13 15:13:28 +00:00
Carl Schwan
7a2c4f6c71 Make regex static and const
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-11-13 09:37:17 +00:00
Carl Schwan
ded5c5d363 Make regex static to determine subtitleText of room
Non trivial time is spend on making sure the regex are valid otherwise

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-11-13 09:37:17 +00:00
l10n daemon script
df951d354d GIT_SILENT Sync po/docbooks with svn 2022-11-13 02:03:54 +00:00
James Graham
815ec1b30e Show animated images
Use animated images in imageDelegate and FullScreenImage so that animated images can be viewed.

Note webp animated images don't work this is a bug with qt see https://bugreports.qt.io/browse/QTBUG-70245
2022-11-12 14:42:20 +00:00
James Graham
bb8db23057 Remove and \n tags from the link preview description which were present only on certain homeservers, e.g. matrix.org 2022-11-12 11:30:45 +00:00
l10n daemon script
6848cfa581 GIT_SILENT Sync po/docbooks with svn 2022-11-12 02:04:46 +00:00
James Graham
460997bca3 Refactor Timeline Container
Update the base item in the timeline container to be a column layout. This means that all the items can be laid out automatically without the need to set lots of manual settings and anchoring. 

The overall height calculation for the delegate is vastly simplified (in fact it is removed) which deals with the fact that there were still instances where the manual calculation didn't work e.g. a delegate with a reaction followed by another message from the same user didn't give the correct bottom margin (see below)

before:
![timelineContainer_height_bug](/uploads/5b14568294698198dee8412f6cd19be0/timelineContainer_height_bug.png)

after:
![timelineContainer_height_bug_fix](/uploads/c5828f1b793817fd0ed523c3580a2ecc/timelineContainer_height_bug_fix.png)

This also improves upon the recently changed hover highlight behaviour. The previous patched moved it to cover the avatar as well as the bubble however it also covered the section and reaction when present which didn't look good. The highlight now only covers the avatar and bubble

before:
![highlight_bug](/uploads/0d08dc769ff737e0fb4981243d02d5f3/highlight_bug.png)

after:
![highlight_bug_fixed](/uploads/536ed672d0f1bb6cbe6c45777fed4b53/highlight_bug_fixed.png)

This also cleans up some of the margins in both bubble and compact to ensure consistency.
2022-11-11 17:05:14 +00:00
l10n daemon script
8addf0f078 GIT_SILENT Sync po/docbooks with svn 2022-11-11 02:06:41 +00:00
Tobias Fella
957ebb5502 Don't open context menus when touching on a delegate 2022-11-10 23:01:46 +01:00
Tobias Fella
3eb1080129 Don't crash when creating a DM 2022-11-10 22:52:35 +01:00
Tobias Fella
efd78c3fc7 Use monochrome icon for emoji in ChatBar
BUG: 456671
2022-11-10 21:45:19 +01:00
Tobias Fella
d02b4007c0 Fix showing old name for rename events 2022-11-10 21:37:03 +01:00
Tobias Fella
824fa469ef Don't send an empty message for member events without changes
BUG: 461667
2022-11-10 20:25:00 +00:00
Tobias Fella
95345973cb Correctly hide avatar and name change events when configured 2022-11-10 20:19:55 +00:00
Tobias Fella
962a1b228c Highlight other party in state events
BUG: 458267
2022-11-10 20:15:07 +00:00
Tobias Fella
35f4a4d1b4 Match case-insensitive during completion 2022-11-10 19:57:04 +00:00
James Graham
7aed6d2e44 Apply max image size so they don't become huge in compact mode.
Set max size to gridUnits * 30. The aim is to allow them to be generally bigger than bubble mode but not so huge that they take up the entire screen

BUG: 454878
2022-11-10 18:49:52 +00:00
Tobias Fella
782b71c826 Use plaintext in reaction delegate 2022-11-10 14:02:47 +01:00
l10n daemon script
974d37f1e1 GIT_SILENT Sync po/docbooks with svn 2022-11-10 02:06:06 +00:00
Tobias Fella
3619e4a66c Disable libquotient submodules in flatpak 2022-11-10 00:37:39 +01:00
Tobias Fella
b5a7ca96ee Add missing android icons 2022-11-10 00:30:58 +01:00
l10n daemon script
bd4c5edca4 GIT_SILENT Sync po/docbooks with svn 2022-11-09 02:01:23 +00:00
James Graham
a4c445d1a5 Add a section label at the top which shows the date label of the next section
**Updated**

Add a section label at the top which shows the date label of the next section up. This means that the user will always be able to see the date of all messages on screen.

![image](/uploads/ecbcdc0740877ea0d72e735176353036/image.png)

From the feedback given I've added a background at the top. I also added an underline to the heading which applies both at the top and in the listView since they use the same component. I added it originally for the top because I felt it looked a bit weird having messages appear from behind a heading background the same colour as the listView background.

Note: I know the gaps between messages are not right. I had to set the spacing in the listView to 0 to prevent itemAt returning null. I plan to add it back in as part of the delegate code before it would be merge.

Fixes BUG:454880
2022-11-08 19:40:56 +00:00
l10n daemon script
c71beb30f7 GIT_SILENT Sync po/docbooks with svn 2022-11-08 02:01:22 +00:00
James Graham
5bd184b297 Prevent logging into the same account twice
Check if an account is already logged in before allow the login process to continue.

BUG:459603
2022-11-07 18:26:47 +00:00
James Graham
364ce45668 Trim Link Preview Text
Trim the text from the link preview title and description to ensure no whitespace at the beginning.
2022-11-07 17:26:03 +00:00
Tobias Fella
a97761f65c Fix custom emojis 2022-11-07 14:40:01 +00:00
l10n daemon script
c739f4f378 GIT_SILENT Sync po/docbooks with svn 2022-11-07 02:36:48 +00:00
l10n daemon script
4705a323e3 GIT_SILENT Sync po/docbooks with svn 2022-11-05 02:02:06 +00:00
Tobias Fella
7f353ca0fa Fix seconard window 2022-11-04 22:33:32 +01:00
Nate Graham
b9d7e43fd1 Add icons to room actions 2022-11-04 15:08:50 -06:00
l10n daemon script
58ed108a1b GIT_SILENT Sync po/docbooks with svn 2022-11-04 02:02:37 +00:00
Tobias Fella
da9de1d2a8 Use Plaintext in CompletionMenu 2022-11-03 23:52:04 +01:00
Tobias Fella
31a038ce82 Fix editing messages 2022-11-03 22:41:44 +01:00
l10n daemon script
589dd66004 GIT_SILENT Sync po/docbooks with svn 2022-11-03 02:07:32 +00:00
Tobias Fella
92ec441594 Use enum instead of strings for message type 2022-11-02 08:55:28 +00:00
l10n daemon script
bba947e508 GIT_SILENT Sync po/docbooks with svn 2022-11-02 02:17:07 +00:00
Carl Schwan
2be566668c Fix typo
We are using matrix uris, not appstream uris in NeoChat

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-11-01 17:26:01 +01:00
l10n daemon script
49e2b2cfff GIT_SILENT Sync po/docbooks with svn 2022-11-01 02:05:43 +00:00
Tobias Fella
08300b994c Don't show banned user as sender for state events
BUG: 461158
2022-10-31 14:45:23 +00:00
Tobias Fella
66fadd78a3 Improve messages for bans without given reason 2022-10-31 16:18:23 +01:00
l10n daemon script
f0be045727 GIT_SILENT Sync po/docbooks with svn 2022-10-31 02:44:21 +00:00
Tobias Fella
24202350ab Fix more avatars 2022-10-31 01:43:04 +01:00
Tobias Fella
4e6aca9a4e Add button to encrypt room 2022-10-30 18:38:45 +00:00
l10n daemon script
82ec92b209 GIT_SILENT Sync po/docbooks with svn 2022-10-30 02:04:16 +00:00
James Graham
7f11bfea63 After the new heading style was introduced the member heading needs updating as it used to have a background.
Remove the background and adjust the margins and spacing.
2022-10-29 15:51:53 +01:00
l10n daemon script
2fbc38fa9a GIT_SILENT Sync po/docbooks with svn 2022-10-29 02:05:07 +00:00
l10n daemon script
b53ecb4a1f GIT_SILENT Sync po/docbooks with svn 2022-10-28 02:11:52 +00:00
Tobias Fella
e56920abd5 Fix compilation 2022-10-27 21:07:33 +02:00
Tobias Fella
c34d99a234 Use correct preprocessor definition 2022-10-27 21:03:31 +02:00
Tobias Fella
a4c26371d6 Fix two cases of usernames containing html being rendered wrong 2022-10-27 21:02:13 +02:00
l10n daemon script
c377534b62 GIT_SILENT Sync po/docbooks with svn 2022-10-27 02:04:46 +00:00
l10n daemon script
2c3715aef6 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-10-27 01:49:19 +00:00
l10n daemon script
ffcf5242ae GIT_SILENT made messages (after extraction) 2022-10-27 00:46:19 +00:00
James Graham
34e0e0205b Improve JoinRoom Server List
Initial work to create a model so that new servers can be added to the list.
The model will also check if the server is valid before allowing it to be added.

Implements network/neochat#11

### TODO
- [x] Add functionality to cache added servers
2022-10-26 18:23:17 +00:00
James Graham
0e42042fa4 Use updated ListSectionHeader
Don't override the contentItem for the RoomList section header and just add the extra icon.
2022-10-26 18:18:13 +00:00
l10n daemon script
4443b58fc6 GIT_SILENT Sync po/docbooks with svn 2022-10-26 02:06:05 +00:00
Tobias Fella
6b73a7a3cb Require passing tests on freebsd 2022-10-25 15:47:32 +02:00
l10n daemon script
7b9908664f GIT_SILENT Sync po/docbooks with svn 2022-10-25 02:04:55 +00:00
Tobias Fella
834424eccc Fix more QML warnings 2022-10-24 16:53:46 +02:00
Tobias Fella
f873999652 QML Warnings-- 2022-10-24 16:51:43 +02:00
Tobias Fella
9ae72058d9 Fix qml warning 2022-10-24 16:50:34 +02:00
Tobias Fella
0b9b3e3496 Create screenshots folder if it doesn't exist 2022-10-24 16:39:53 +02:00
Tobias Fella
659f10c71a Improve Space list
- Give it a context menu
- Clean up code

BUG: 460167
2022-10-24 14:12:34 +02:00
Tobias Fella
e2faba153f Ifdef E2EE notifications 2022-10-24 13:02:19 +02:00
l10n daemon script
153ede4009 GIT_SILENT Sync po/docbooks with svn 2022-10-24 02:04:16 +00:00
Tobias Fella
6efb814f3a Fix can-change-password check 2022-10-24 01:45:56 +02:00
Tobias Fella
88d38578e6 Use and fix avatars in Accounts settings 2022-10-24 01:45:23 +02:00
Tobias Fella
2817ce9d16 Move QML files to src/qml and don't use internal qml modules 2022-10-24 00:40:54 +02:00
Tobias Fella
813a8003c6 Fix notifications for encrypted events
BUG: 459935
2022-10-23 22:12:15 +00:00
Tobias Fella
510c6d4a90 Don't freeze when pasting large markdown documents
BUG: 460802
2022-10-23 22:10:43 +00:00
Tobias Fella
a9c80b90f6 Show old display name for name change events
BUG: 457664
2022-10-23 21:40:39 +00:00
Tobias Fella
bbf76e1e64 Fix disconnects 2022-10-23 23:23:56 +02:00
Tobias Fella
67b53a898f Set name for Space list avatars 2022-10-23 23:13:56 +02:00
Link Dupont
ef255243ec Use ComboBox as AccountRegistry view
Replace the RowLayout with a ComboBox. This permits a higher number
of accounts to be used in the application without reducing the
usability.

BUG: 460601
2022-10-23 15:51:45 +00:00
Tobias Fella
10667f98ef Always pass displayName without matrix id to avatar name
BUG: 456638
2022-10-23 17:45:24 +02:00
Tobias Fella
a287e61b5a Fix avatar names in RoomDrawer 2022-10-23 16:53:02 +02:00
James Graham
d42c831e80 Use plain text for RoomPage header as this is what is required 2022-10-23 10:38:34 +01:00
l10n daemon script
7003dbdfc4 GIT_SILENT Sync po/docbooks with svn 2022-10-23 01:53:52 +00:00
l10n daemon script
329768f874 GIT_SILENT Sync po/docbooks with svn 2022-10-22 11:27:14 +00:00
l10n daemon script
7ef0bbc044 GIT_SILENT Sync po/docbooks with svn 2022-10-21 02:11:01 +00:00
l10n daemon script
3a54088cf8 GIT_SILENT Sync po/docbooks with svn 2022-10-20 03:00:37 +00:00
l10n daemon script
60732f8a60 GIT_SILENT Sync po/docbooks with svn 2022-10-19 02:01:12 +00:00
Tobias Fella
6cc8955bce Fix changing avatar image
BUG: 460679
2022-10-19 00:10:17 +02:00
James Graham
595ece8108 Fix line breaks being removed
Stop stripping paragraph tags as this is causing line breaks to be removed in the formatted body. Any double new line in the plain text is treated as a paragraph in rich text.

BUG: 458800
2022-10-18 19:09:35 +00:00
l10n daemon script
4bd1b2fab4 GIT_SILENT Sync po/docbooks with svn 2022-10-18 02:00:09 +00:00
James Graham
2ced0c902e Fix the play slider and time label so that they don't overflow the bubble when thin.
The time label now appears below the duration slider when very thin.
Remove unnecessary padding from the audio inner object, including deleting the outer control which added padding but little else.
2022-10-17 21:48:13 +00:00
Tobias Fella
1c9575ccfd Fix notifications with libquotient 0.7 2022-10-17 21:14:03 +02:00
Tobias Fella
785a82df93 Fix inline images not showing up
Work around QTBUG 93281

See https://bugreports.qt.io/browse/QTBUG-93281 for details
2022-10-17 18:54:59 +00:00
l10n daemon script
b9f8ef2570 GIT_SILENT Sync po/docbooks with svn 2022-10-17 02:14:34 +00:00
Slawek Kaplonski
f64608f87c Add config option to make link previews configurable
This patch adds new config option "ShowLinkPreview" which can
control if links' preview in the chat messages should be loaded and
shown or not.
2022-10-16 14:21:54 +02:00
James Graham
f1b9cbbf6c Fix RoomDrawer not respecting user choice after other menus are opened
Ensure that user choice is given precedent for opening/closing the room drawer.

This makes it so that the previous state is restored after one of the menu pages is closed or if the window is dragged thin then wide again.

Fixes network/neochat#196
2022-10-16 09:46:32 +00:00
l10n daemon script
88001ef0eb GIT_SILENT Sync po/docbooks with svn 2022-10-15 02:07:14 +00:00
l10n daemon script
d43cd368ee GIT_SILENT Sync po/docbooks with svn 2022-10-14 02:02:27 +00:00
Claudio Cambra
68a15913bd Fix emoji dialog padding and background
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-10-13 20:34:41 +00:00
Claudio Cambra
dc8b68931e Improve scrolling behaviour of emoji picker on desktop, show scrollbars for categories
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
2022-10-13 20:34:41 +00:00
Tobias Fella
47a4e5c447 Move CustomEmojiModel sources to single file 2022-10-13 22:24:16 +02:00
l10n daemon script
4c093b2efc GIT_SILENT Sync po/docbooks with svn 2022-10-13 02:04:13 +00:00
l10n daemon script
e248d32eb0 GIT_SILENT Sync po/docbooks with svn 2022-10-12 01:59:27 +00:00
James Graham
d2888bc479 Reply Refactor
The aim here is to tidy up the reply component and make it so it sizes automatically without any need to manually set widths or heights. This is achieved by putting the layout in a grid layout. The implicitwidth and height variables are also simplified meaning that the margins are no longer prone to being slightly off because the calculation didn't add up the margins and spacing right.

Also added here is a mime component which is used to provide a nicer representation for files, videos and audio in the reply because trying to put the full component in wouldn't look good.

This also fixes the situation in right to left mode where the layout now mirror properly and everything sits where it should.

New reply elements
![image](/uploads/bfdc81040b3477b064fe8a06d30bdb6e/image.png)
2022-10-11 20:36:15 +00:00
Tobias Fella
d97448eb07 Port away from deprecation 2022-10-11 21:03:03 +02:00
Tobias Fella
878369901c Cleanup userlistmodel 2022-10-11 18:40:42 +00:00
Bharadwaj Raju
61f1e2481b Fix custom emojis
Don't turn them into a tags, and don't generate previews of them.

BUG: 460178

BUG: 460179
2022-10-11 18:31:06 +00:00
Tobias Fella
9398c5004c Reintroduce selectionStart, selectionEnd 2022-10-11 17:58:49 +02:00
l10n daemon script
6301dc4c7e GIT_SILENT Sync po/docbooks with svn 2022-10-11 02:02:16 +00:00
Tobias Fella
4bfd857093 Refactor input stuff
This is the start of a significant refactoring of everything related to sending messages, which is roughly:
- the chatbox
- action handling
- message sending on the c++ side
- autocompletion of users/rooms/emojis/commands/things i forgot

Notable changes so far include:
- ChatBox is now a ColumnLayout. As part of this, i removed the height animations for now. <del>as far as i can tell, they were broken anyway.</del> I'll readd them later
- Actions were refactored to live outside of the message sending function and are now each an object; it's mostly a wrapper around a function that is executed when the action is invoked
- Everything that used to live in ChatBoxHelper is now in NeoChatRoom; that means that the exact input status (text, message being replied to, message being edited, attachment) is now saved between room switching).
- To edit/reply an event, set `NeoChatRoom::chatBox{edit,reply}Id` to the desired event id, `NeoChatRoom::chatBox{reply,edit}{User,Message}` will then be updated automatically
- Attachments behave equivalently with `NeoChatRoom::chatBoxAttachmentPath`
- Error message reporting from ActionsHandler has been fixed (same fix as in !517) and moved to NeoChatRoom


Broken at the moment:
- [x] Any kind of autocompletion
- [x] Mentions
- [x] Fancy effects
- [x] sed-style edits
- [x] last-user-message edits and replies
- [x] Some of the actions, probably
- [x] Replies from notifications
- [x] Lots of keyboard shortcuts
- [x] Custom emojis
- [x] ChatBox height animations

TODO:
- [x] User / room mentions based on QTextCursors instead of the hack we currently use
- [x] Refactor autocompletion stuff
- [x] ???
- [x] Profit
2022-10-10 23:10:00 +00:00
Tobias Fella
b2fa269515 Send correct width and height for images 2022-10-10 18:49:43 +00:00
James Graham
589f9f88a3 Handle images with size (0,0) in fullscreen mode 2022-10-10 18:41:28 +00:00
Tobias Fella
de0b138992 Handle images with incorrect (0, 0) size better
BUG: 460205
BUG: 460150
2022-10-10 20:06:27 +02:00
l10n daemon script
eba6c1faaa GIT_SILENT Sync po/docbooks with svn 2022-10-10 02:00:16 +00:00
James Graham
d00e122d88 Rework fullscreen image
As discussed in network/neochat#161, when clicking the image it now only covers the neochat window. A modal popup that covers the neochat window is now used. The app behind get dimmed.

Left clicking anywhere closes the preview as well as the using the close button. Right clicking on the image itself still gives the image's context menu.

Before
![fullscreenimage_before](/uploads/f7a64ab2f0b75405f3f0a16f32c029f3/fullscreenimage_before.png)

After
![fullscreenimage_updated2](/uploads/8feb6c79891019203a6a0a8439c71b70/fullscreenimage_updated2.png)

Latest
![fullscreenimage_updated_final](/uploads/61ca4c1251b914ae3a6bdd158f4dc396/fullscreenimage_updated_final.png)

Closes network/neochat#161
2022-10-09 16:27:51 +00:00
l10n daemon script
a761d36abd GIT_SILENT Sync po/docbooks with svn 2022-10-09 02:09:16 +00:00
Tobias Fella
22448ea9ae Clean up includes 2022-10-08 19:03:49 +02:00
Tobias Fella
6756e1fd45 Remove unused includes from main.cpp 2022-10-08 12:27:37 +02:00
l10n daemon script
005580dcea GIT_SILENT Sync po/docbooks with svn 2022-10-08 02:04:36 +00:00
James Graham
7cfc0e24e2 Fix Section After Read Marker Removal
After the readmarker is removed it leaves a gap in the indexs until the model is refreshed.
Add check to ignore the gap for the purpose of show author and show section roles.

Closes network/neochat#295

BUG: 454885
2022-10-07 13:32:05 +00:00
Tobias Fella
a6a152acdc Also fix video resolution in qt5
Replaces !395

Fixes #120
2022-10-07 09:56:08 +00:00
l10n daemon script
4ddf614108 GIT_SILENT Sync po/docbooks with svn 2022-10-07 02:14:21 +00:00
Tobias Fella
3ae6a0266d Fix compilation against libQuotient 0.6 2022-10-06 12:50:04 +02:00
Tobias Fella
c081b42fd4 Use non-deprecated name version of accessing the accountregistry 2022-10-06 12:47:42 +02:00
Tobias Fella
0dcd71af53 Compiler warnings-- 2022-10-06 12:44:03 +02:00
Tobias Fella
eee96bc462 Refactor and clean up spaces 2022-10-06 10:38:20 +00:00
l10n daemon script
932c3e10fe GIT_SILENT Sync po/docbooks with svn 2022-10-05 01:59:59 +00:00
James Graham
81bbfce7cd Fix bubble header in right to left mode
Convert to rowLayout so that the bubble header works in right to left mode.

Before
![bubble_header_righttoleft_before](/uploads/91d9b5e41a7f84f8ab2750d1193ed4b6/bubble_header_righttoleft_before.png)

After
![bubble_header_righttoleft_after](/uploads/abf8018cf9e103f3d32dfb686efa946f/bubble_header_righttoleft_after.png)
2022-10-04 18:15:15 +00:00
James Graham
1a3befef36 Add highlight on goToEvent
Add a temporary highlight when the goToEvent is triggered.

This implementation also alows a temporary highlight of an item at anytime if the timeline container's isTemporaryHighlighted property is set to true.

Closes network/neochat#34
2022-10-04 18:07:54 +00:00
Bharadwaj Raju
cd7232e7bf Replace links with HTML <a> tags when messages have a formatted_body and in all other cases
This makes (https) links show up as actual links when they're in a message with a `formatted_body`. For example, the pursuivant messages in any KDE channel (like #kirigami), or links which are in a reply to another message/image.

Also corrected a regex mistake in another place using the same link replacement regex.

Fix #331
2022-10-04 09:38:29 +00:00
l10n daemon script
f6609f55f8 GIT_SILENT Sync po/docbooks with svn 2022-10-04 02:06:09 +00:00
Tobias Fella
17a36f1959 Revert "Busy Indicator when Backfilling Room"
This reverts commit 0514a52ff1.
2022-10-03 15:27:46 +02:00
l10n daemon script
a4e16ad3f1 GIT_SILENT Sync po/docbooks with svn 2022-10-03 02:45:10 +00:00
James Graham
0514a52ff1 Busy Indicator when Backfilling Room
Add busy indicator when the user scrolls to the last available message if more are being loaded.

Closes network/neochat#48
2022-10-02 12:33:26 +00:00
l10n daemon script
8c3666ac74 GIT_SILENT Sync po/docbooks with svn 2022-10-01 02:03:07 +00:00
l10n daemon script
761ec0f1cb SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-10-01 01:54:38 +00:00
l10n daemon script
b5d7173e88 GIT_SILENT made messages (after extraction) 2022-10-01 00:48:07 +00:00
James Graham
7b81af43b1 Timeline Container Highlight Update
Moves the highlight to the timeline container object itself so the whole delegate is highlighted. This was suggested for compact mode but I also left it visible for bubble as I think it still works and adds some user feedback.

Fine tunes the hover actions as follows:
- In compact mode as long as the screen is wide enough they are inset further so they don't overlap the up and down buttons.
- In bubble mode for a user message on the right they are inset slightly further so that they don't overlap the scrollbar

Fine tuned the spacing around the avatar and highlight.

Based upon the suggestions here network/neochat#550

Bubble Before - no highlight can be seen
![bubble_highlight_before](/uploads/4417d80d62881ff7256bd18a1760002e/bubble_highlight_before.png)

Bubble After
![bubble_highlight_after](/uploads/817e8c749809bf07362af4c9dcdf7087/bubble_highlight_after.png)

Compact Before
![compact_highlight_before](/uploads/aada5d39cfd69563753e5048bd4c248d/compact_highlight_before.png)

Compact After
![compact_highlight_after](/uploads/d3b6c066e86910e7cd2162a970d77ca6/compact_highlight_after.png)
2022-09-30 15:02:19 +00:00
l10n daemon script
6bf69ae77e GIT_SILENT Sync po/docbooks with svn 2022-09-30 01:53:48 +00:00
Tobias Fella
055deb4115 Add back button to SSO login 2022-09-29 16:20:57 +00:00
James Graham
058e8034d9 Make sure that contentMaxWidth is used instead of bubbleMaxWidth for the message delegate. 2022-09-29 16:10:50 +00:00
Tobias Fella
17240ea8a6 Don't show url for matrix.to links
Since we open these in neochat directly

BUG: 457835
2022-09-29 16:05:11 +00:00
Tobias Fella
727842df4b Close RoomDrawer when opening userdetail while modal
BUG: 457890
2022-09-29 16:00:10 +00:00
l10n daemon script
04182f98f2 GIT_SILENT Sync po/docbooks with svn 2022-09-29 01:54:38 +00:00
l10n daemon script
4aff25347f GIT_SILENT Sync po/docbooks with svn 2022-09-28 02:04:13 +00:00
James Graham
f8e57d60f5 Fix margins for images and videos
This patch makes it so that the margins for images and videos is the same as other components.
2022-09-27 17:18:43 +00:00
Bhushan Shah
2839d44ea8 GIT_SILENT: bump version to 22.09 2022-09-27 20:53:11 +05:30
l10n daemon script
5f32ae79c1 GIT_SILENT Sync po/docbooks with svn 2022-09-27 01:50:19 +00:00
Tobias Fella
0fc94310c3 Implement reporting events
BUG: 458856
2022-09-26 14:38:45 +00:00
l10n daemon script
7f26651edf GIT_SILENT Sync po/docbooks with svn 2022-09-26 01:58:14 +00:00
l10n daemon script
36880d001c GIT_SILENT Sync po/docbooks with svn 2022-09-25 01:53:43 +00:00
Tobias Fella
e0e289d424 Fix dialogbuttonbox 2022-09-24 15:28:17 +02:00
Tobias Fella
b79956871f Fix build without E2EE 2022-09-24 15:27:19 +02:00
l10n daemon script
917f77152d GIT_SILENT Sync po/docbooks with svn 2022-09-24 01:53:35 +00:00
l10n daemon script
e28d1918f5 GIT_SILENT Sync po/docbooks with svn 2022-09-23 01:50:01 +00:00
Tobias Fella
149b11ba6f Set application domain before using any translated strings 2022-09-23 00:42:22 +02:00
Tobias Fella
c007961ef6 Fix some compilation warnings 2022-09-23 00:21:08 +02:00
James Graham
ef40f5a747 Fix Stickers
Fix so that stickers are rendered and that the context menu works for them.
2022-09-22 19:03:06 +00:00
Bharadwaj Raju
37780c2e3b Link Previews
Uses Matrix's preview API to generate embedded link previews.

Only title and description for now.

![image](/uploads/2c5d632480073fe54345cdbe22ea54dc/image.png)
2022-09-22 15:42:53 +00:00
James Graham
53b9f42399 Fix Slash Commands in the Middle of a Message
Make sure that a slash command only activates when the slash is at the beginning of the message.

BUG: 457474
2022-09-22 15:11:56 +00:00
l10n daemon script
d2ed1cfb2e GIT_SILENT Sync po/docbooks with svn 2022-09-22 01:51:02 +00:00
Carl Schwan
c7d4b1a529 Update Flatpak.cmake 2022-09-21 12:07:44 +00:00
Carl Schwan
a8045f2134 Install emoji fonts to correct location
See https://wiki.archlinux.org/title/font_configuration#Fontconfig_configuration
and https://invent.kde.org/network/neochat/-/issues/341#note_525953
2022-09-21 12:07:44 +00:00
Tobias Fella
b8262fef92 Implement device verification 2022-09-21 11:49:11 +00:00
l10n daemon script
3071901a47 GIT_SILENT Sync po/docbooks with svn 2022-09-21 01:54:16 +00:00
l10n daemon script
396260549a GIT_SILENT Sync po/docbooks with svn 2022-09-20 01:55:30 +00:00
l10n daemon script
50c2de8d52 GIT_SILENT Sync po/docbooks with svn 2022-09-19 01:52:03 +00:00
Ahmad Samir
d4e067d57c Use KDE_INSTALL_TARGETS_DEFAULT_ARGS
The KF_* variant is for KF repos

GIT_SILENT
2022-09-17 00:45:00 +02:00
l10n daemon script
3797b0129a GIT_SILENT Sync po/docbooks with svn 2022-09-15 01:50:41 +00:00
l10n daemon script
59b4146c63 GIT_SILENT Sync po/docbooks with svn 2022-09-14 01:50:01 +00:00
Bharadwaj Raju
c76524d540 Fix CI tripping on .reuse/dep5
The dep5 parser in the suse_tumbleweed_qt515 CI doesn't like duplicate Copyright entries.

cc @carlschwan
2022-09-13 13:40:54 +00:00
Bharadwaj Raju
10030efd08 Fix text selection with context menu
Make the context menu actually work with selected text in a message.
2022-09-13 10:04:45 +00:00
l10n daemon script
918bd5439c GIT_SILENT Sync po/docbooks with svn 2022-09-13 01:50:39 +00:00
Bharadwaj Raju
e3ff50bbe8 Use Kirigami LoadingPlaceholder everywhere
Replace the custom Placeholder + BusyIndicator with the new LoadingPlaceholder component.

Also remove the "Loading…" page title on first load, as that is redundant to the existing front-and-center "Loading…" message and hence doesn't look nice.
2022-09-12 20:41:23 +00:00
Bharadwaj Raju
76edc858aa Add proper tooltip delays
Split from !521
2022-09-12 20:35:40 +00:00
Bharadwaj Raju
2a2c117ac1 Use selected text colors from theme
When using Breeze light:

| Before | After |
| ------ | ------ |
| ![Screenshot_20220913_005141](/uploads/9b15c79acaaa92e23855def9ca6bc6ab/Screenshot_20220913_005141.png) | ![Screenshot_20220913_005049](/uploads/06cb614edae21f7ddb027bebaf732edc/Screenshot_20220913_005049.png) |
2022-09-12 20:34:47 +00:00
l10n daemon script
d3e4640af9 GIT_SILENT Sync po/docbooks with svn 2022-09-12 01:49:03 +00:00
James Graham
7e1f0f4ea7 PushRule RoomList Room Menu Option
Add an option to the roomlist room menu to set the room push rule override.

Rename default to "follow global setting" for clarity.
2022-09-11 10:29:05 +00:00
l10n daemon script
80bf279321 GIT_SILENT Sync po/docbooks with svn 2022-09-11 01:49:10 +00:00
l10n daemon script
6eb4b8c9d2 GIT_SILENT Sync po/docbooks with svn 2022-09-10 01:49:47 +00:00
James Graham
4bba505da6 Initial work to add push rule support
This commit adds the ability to set the master push rule and set push rules for individual rooms as per the matrix spec. See https://spec.matrix.org/v1.3/client-server-api/#push-rules.

The master push rule is just on/off and uses the existing notification setting in general setting to enable/disable the server default master push rule .m.rule.master.

For each room there is now a page in the room setting that allows the following to be set:
- Default
- All messages
- @mentions and keywords
- off

New room or override rules are added/removed to achieve this.

There is also functionality to check the master/room notification state whenever the setting menu is entered. This allows the status to be updated if changed in another client or get the initial state for a room as it isn't stored.

Note - There is currently no menu items in the room list for setting the room push rule settings. This will be added in a later commit, the aim is to focus on making sure the technical implementation is good for now.
2022-09-09 16:41:03 +00:00
l10n daemon script
c2fc4e44a7 GIT_SILENT Sync po/docbooks with svn 2022-09-09 01:54:13 +00:00
Tobias Fella
274bf824e3 Don't quote property names 2022-09-09 00:23:18 +02:00
Tobias Fella
d70a8a652a Always use system-style includes for libQuotient 2022-09-09 00:16:39 +02:00
Jan Bidler
8c436075d8 Changes room access into radio buttons 2022-09-08 17:31:37 +00:00
James Graham
828032ba06 RoomDrawer Cleanup
This started off as me just wanting to adjust the margin of the search bar but grew a touch ...

- Cleanup margins especially make the member search bar have the same padding as everything else
- Move room information title to header and align all buttons right.
- Make the room name actually bold
- Remove highlight from the user list item after the menu is closed
- Always use actual width so that the drawer isn't wider when modal
- Use control instead of pane for the search bar as the padding works more consistently
- Use BasicListItem instead of AbstractListItem for the member list as this has the layout predefined

![image](/uploads/ab2c4066479b0510bcb2fe6ae91f7bc3/image.png)
2022-09-08 17:30:58 +00:00
l10n daemon script
c30abfefa9 GIT_SILENT Sync po/docbooks with svn 2022-09-08 01:56:22 +00:00
Jan Bidler
5d4efad2f8 Make "show avatar" in settings localizable 2022-09-07 13:55:26 +00:00
l10n daemon script
3a391aafe8 GIT_SILENT Sync po/docbooks with svn 2022-09-07 01:53:26 +00:00
l10n daemon script
7b5b8197bc SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-09-07 01:48:36 +00:00
Jan Bidler
55659e488f unify custom emojis text 2022-09-06 19:42:53 +00:00
Jan Bidler
c2c235eff1 Use " in all i18n functions instead of ' 2022-09-06 19:42:53 +00:00
l10n daemon script
f6f4edec86 GIT_SILENT Sync po/docbooks with svn 2022-09-06 01:51:42 +00:00
Nicolas Fella
55847cb9cc Refactor window handling code
Currently when we want to show/raise the window in reaction to the tray icon/notification being clicked etc we do this by emitting a signal on the controller.
This is connected to in main.qml, which does some things, then calls back to controller to do more things.

This is quite convoluted. Instead introduce a new class WindowController that is responsible for all things window, in particular showing/raising and config saving
2022-09-05 19:27:55 +00:00
Nicolas Fella
736c4b02ed Don't call show() on visible windows
It messes with the geometry
2022-09-05 19:27:55 +00:00
Nicolas Fella
4cf5b516d0 Extract code for obtaining a window from the QML engine into a function 2022-09-05 19:27:55 +00:00
Nicolas Fella
c379a7fa27 Fix Android packaging
In the AndroidManifest we specify 'neochat' as the executable

That causes the lib to be used instead of the executable, which breaks things

Shuffle around the names so that the executable is picked
2022-09-05 18:42:27 +00:00
Tobias Fella
2318fb95d9 Adapt to libQuotient API changes 2022-09-05 20:37:55 +02:00
James Graham
14e57e7833 Fix show author after state regression
The avatar should be shown after a state message

Fixes network/neochat#553
2022-09-03 14:33:58 +00:00
l10n daemon script
8c9ea72a9b GIT_SILENT Sync po/docbooks with svn 2022-09-02 01:50:06 +00:00
l10n daemon script
efd3f2e8d0 GIT_SILENT Sync po/docbooks with svn 2022-08-30 01:49:54 +00:00
l10n daemon script
ea70782771 GIT_SILENT Sync po/docbooks with svn 2022-08-28 01:50:03 +00:00
James Graham
6cca3dbe3a Add the right click menu for image delegates in fullscreen mode
Add the right click menu for image delegates in fullscreen mode

BUG: 455147
2022-08-27 11:52:45 +00:00
l10n daemon script
696b34e094 GIT_SILENT Sync po/docbooks with svn 2022-08-27 01:57:39 +00:00
l10n daemon script
6ce74bbd0c GIT_SILENT made messages (after extraction) 2022-08-27 00:47:18 +00:00
Carl Schwan
3c7e85fbbf Fix loading state detection in devices page
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-26 23:39:05 +02:00
Carl Schwan
6c6e408497 Cleanup account page
- Fix small padding on the right when they is not enough elements for a
  scrollbar to appear (possibly due to a kirigami regression)
- Move account editor to a seperate page
- Cleanup a bit the code style
- Add tooltip to toolbuttons

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-26 23:29:29 +02:00
Jan Bidler
1ac79273b6 Fix emoji add button being unavailable 2022-08-26 20:35:09 +00:00
Tobias Fella
d4d99284cc Correctly hide spoiler links
BUG: 458311
2022-08-26 22:08:22 +02:00
Tobias Fella
25226aa61f Don't save connection state when destructing the controller
This causes neochat to crash and is done automatically by the connections

BUG: 458353
2022-08-26 22:00:38 +02:00
James Graham
6748a2d21d Fix the reply an edit text being shown in all chat rooms when multiple windows are open
Fix the reply an edit text being shown in all chat rooms when multiple windows are open. This is done by changing chatBoxHelper from a singleton to being instantiated for each instance of roompage.

BUG: 454963
2022-08-26 19:33:20 +00:00
Carl Schwan
fdb424e65e Improve contrast of new notification background
This is required to be accessible

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-26 21:24:07 +02:00
Jan Bidler
8cd0b12c4a Make typing indocator anchor on the left 2022-08-26 19:09:45 +00:00
James Graham
d133c4fab7 Improve showAuthor behaviour
2 changes to showAuthor role; the first removes the same eventRole condition as currently a video or image followed by text will both show the avatar, second is to fix it so that the avatar is actually shown if messages are 10 mins apart as this is currently broken.
2022-08-26 19:00:02 +00:00
Jan Bidler
2f8303348b Make NeoChat room a link 2022-08-26 18:43:56 +00:00
Tobias Fella
7dfac8a9f7 Fix audio playback
Since the preparation for encrypted events landed, audio playback was broken since QtMultimedia (gstreamer)
doesn't use our custom QNAM. Instead of letting QtMultimedia download the media, we thus need to manually download it
and point QML Audio to the local file. On the positive side, this also allows encrypted Audio files to be played and enables us to seek in the audio delegate :)
It does however mean that we do need to do an annoying bit of manual state management.

BUG: 457687
2022-08-26 18:37:18 +00:00
Jan Bidler
3c98a8fac4 Make clearing reply not remove your text 2022-08-26 18:29:19 +00:00
Jan Bidler
57b1bb659c Remove normal PageUp and PageDown from switching rooms 2022-08-26 18:22:17 +00:00
Jan Bidler
da8c8c48bc Fix CTRL+Page moving into wrong direction 2022-08-26 18:22:17 +00:00
Tobias Fella
07c5cd8016 Consider nested space when populating space hierarchy 2022-08-26 20:21:35 +02:00
Jan Bidler
a23ef130ca Make unread messages use an ascii circle 2022-08-26 12:33:43 +00:00
Jan Bidler
2f4116796a Rework notification colors 2022-08-26 12:33:43 +00:00
Tobias Fella
f004f9e3c8 Fix build 2022-08-26 12:52:46 +02:00
l10n daemon script
9a3726f9ff GIT_SILENT Sync po/docbooks with svn 2022-08-26 01:50:05 +00:00
Snehit Sah
91d1f6ffeb Show spaces horizontal bar
### Summary

This merge request adds a horizontal bar at top of room list, which shows spaces. By clicking on a space, user can filter out rooms belonging only to that specific space.

### Pending/ Help needed

#### Segfault when loading active connection on startup

Refer `void SortFilterRoomListModel::cacheSpaceHierarchy()` ([link](8c372800d7 (b969e462c30df43ef3714ea441948d8d8027f6a0_117_126))) in `src/sortfilterroomlistmodel.cpp`.

On [line 129](8c372800d7 (b969e462c30df43ef3714ea441948d8d8027f6a0_117_129)), I have called `connection->allRooms()`, which segfaults if the active connection hasn't been loaded yet. Is there a way to ensure that `Controller::instance().activeConnection()` on line 128 waits till connection is loaded?

#### Avatars

Avatars on space horizontal bar aren't aligned to vertical middle. I'll need help with that. 

Using the code below doesn't help with padding

```qml
delegate: QQC2.Control {
    topPadding: 10
    contentItem: Kirigami.Avatar { ..... }
}
```

This complains about uninitialized properties in `Kirigami.Avatar`. (`id`, `currentRoom`, `avatar`, `index` are properties utilized during run time)

After we get around these two issue, this MR will be ready from my side.
2022-08-25 13:46:09 +00:00
Tobias Fella
cd895f1b06 QML warnings -= 2 2022-08-23 21:24:41 +02:00
Tobias Fella
fead1a69b3 QML warning-- 2022-08-23 21:22:02 +02:00
James Graham
63af4cae77 Fix timeline layout for non text messages
Change the target of the hover component and delegate layout to timeline container so it applies to all delegates not just text messages.

BUG: 457689
2022-08-22 17:38:50 +00:00
l10n daemon script
89090690b4 GIT_SILENT Sync po/docbooks with svn 2022-08-21 01:56:52 +00:00
l10n daemon script
6a16334eab GIT_SILENT Sync po/docbooks with svn 2022-08-20 01:49:36 +00:00
l10n daemon script
5b05622058 GIT_SILENT Sync po/docbooks with svn 2022-08-16 01:54:13 +00:00
l10n daemon script
1eb705c17f GIT_SILENT Sync po/docbooks with svn 2022-08-14 01:52:46 +00:00
l10n daemon script
f9ad0e8426 GIT_SILENT Sync po/docbooks with svn 2022-08-13 01:50:50 +00:00
l10n daemon script
ef1ff04ef2 GIT_SILENT Sync po/docbooks with svn 2022-08-10 01:57:08 +00:00
James Graham
9b54aff3d5 Mark unread messages in the room as read when all messages are visible
This is an alternative to network/neochat!467. When discussing in the matrix channel this option seemed more popular so I implemented it.

Mark the unread messages in the room as read when all messages are visible to the user after a short timer. This happens on entry and when new messages come in as long as Neochat is active. If neochat isn't active, the room hasn't loaded or the read marker hasn't loaded the timer is for this is reset until all 3 conditions are false.
2022-08-09 16:42:32 +00:00
l10n daemon script
52a093d449 GIT_SILENT Sync po/docbooks with svn 2022-08-09 01:51:02 +00:00
Nate Graham
619369e148 Add hackaround for Qt bug to all non-horizontally-scrollable scrollviews
https://bugreports.qt.io/browse/QTBUG-83890 has been open for years with
a patch that's been stalled for years. There's no indication that it's
going to be fixed anytime soon, and it generates bug reports for us.
Let's add the typical hackaround for all non-horizontally-scrollable
scrollviews.

BUG: 457584
2022-08-08 15:02:09 -06:00
l10n daemon script
e63a9a9be1 GIT_SILENT Sync po/docbooks with svn 2022-08-08 01:58:51 +00:00
l10n daemon script
5c97e67404 GIT_SILENT Sync po/docbooks with svn 2022-08-04 01:52:39 +00:00
l10n daemon script
84a265b7f9 GIT_SILENT Sync po/docbooks with svn 2022-07-31 01:58:40 +00:00
l10n daemon script
61201a7097 GIT_SILENT Sync po/docbooks with svn 2022-07-29 01:56:35 +00:00
Snehit Sah
b9630ad2f2 Add Flatpak CI Support
Signed-off-by: Snehit Sah <snehitsah@protonmail.com>
2022-07-27 10:01:35 +00:00
l10n daemon script
179a201113 GIT_SILENT Sync po/docbooks with svn 2022-07-24 01:50:54 +00:00
l10n daemon script
6eef58e57d GIT_SILENT Sync po/docbooks with svn 2022-07-23 01:55:00 +00:00
l10n daemon script
94f325609a GIT_SILENT Sync po/docbooks with svn 2022-07-20 01:49:27 +00:00
l10n daemon script
a40ba493b6 GIT_SILENT Sync po/docbooks with svn 2022-07-19 01:46:04 +00:00
Tobias Fella
916e7465f1 Don't show a link preview for empty links
When hovering over a link without a target, qt5 will report the link target to be "1", which is wrong.
To work around this, we manually check if the link is "1" and if it is, we discard it.
In theory, this means that we won't get a preview for any link that actually *is* "1", but why would any link be "1"?

It's not worth reporting this to Qt since it seems fixed in Qt6

BUG: 456877
2022-07-18 21:18:48 +02:00
Tobias Fella
8257a9d65e Refactor delegates and improve context menu opening
This unifies the context menu opening and makes sure that clicking *anywhere* on the delegate opens the context menu, not just on the content
2022-07-18 20:12:26 +02:00
l10n daemon script
a75048761b GIT_SILENT Sync po/docbooks with svn 2022-07-18 01:47:32 +00:00
Carl Schwan
f21822aba7 Fix checkbox label on small screen
See https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/173
2022-07-17 14:46:18 +00:00
l10n daemon script
75eb5a51af GIT_SILENT Sync po/docbooks with svn 2022-07-17 01:54:19 +00:00
l10n daemon script
7e37c31011 GIT_SILENT made messages (after extraction) 2022-07-17 00:45:21 +00:00
l10n daemon script
f80039a5c4 GIT_SILENT Sync po/docbooks with svn 2022-07-16 01:56:39 +00:00
James Graham
400d86a1e9 Precise time on hover
Implement showing a long datetime as a tooltip when hovering over the timestamp for a message. The timestamp is also moved to just after the username of the poster this means it will not be under the hover buttons unless the message is very short.

Also some cleanup of the alignment of items in the bubble. The reply text is now indented the same amount as the username and message and the padding isn't removed from the username and message when avatars are disabled.

Implements: network/neochat#223
2022-07-15 15:39:33 +00:00
l10n daemon script
b20b1c10d0 GIT_SILENT Sync po/docbooks with svn 2022-07-15 01:55:09 +00:00
Tobias Fella
a37fd0713f Convert C++ parts into a static library
This allows us to start adding unit tests
2022-07-14 15:27:29 +00:00
Tobias Fella
b1581a54d1 Allow sending encrypted messages if build supports it 2022-07-14 16:59:37 +02:00
l10n daemon script
ded60b906b GIT_SILENT Sync po/docbooks with svn 2022-07-14 01:58:39 +00:00
James Graham
6957dd0fa2 Apply margin in SectionDelegate both for Compact and Bubble mode 2022-07-13 17:27:13 +00:00
Tobias Fella
7de4014b28 Update formatting 2022-07-13 17:27:13 +00:00
James Graham
63e7ec1bd7 Spell like an American 2022-07-13 17:27:13 +00:00
James Graham
f24428fab3 Apply margin in ReadMarkerDelegate both for Compact and Bubble mode 2022-07-13 17:27:13 +00:00
James Graham
c3a5a767c2 Fix alignment of hover buttons when user message on the right is thin. In this case the buttons sould align to the right of the message not the left so they don't go off screen. 2022-07-13 17:27:13 +00:00
James Graham
5fb311b509 Implement new delegate behaviour on ReadMarkerDelegate
Make sure that the messgae hover buttons account for the delegate x displacement
2022-07-13 17:27:13 +00:00
James Graham
f0d832f756 Make sure extra width is never less than 0 2022-07-13 17:27:13 +00:00
James Graham
a7c137ca39 Allow the delegate and bubble widths to grow when the ListView is very wide.
Disable user message on the right setting when in compact mode as it doesn't work anyway.
2022-07-13 17:27:13 +00:00
James Graham
a96e8958c9 Centre the timline when using bubbles but not in compact mode 2022-07-13 17:27:13 +00:00
James Graham
7dc951d2cd Support user messages on the right even when wide
Limit maximum delegate width to ensure that the gap between user and non-user messages isn't too large
2022-07-13 17:27:13 +00:00
Tobias Fella
c3ee277ede Fix opening room using touch
The previous fix wasn't enough for non-mobile touch devices. Now, we limit the TapHandler to mouse instead
2022-07-13 14:59:16 +02:00
Tobias Fella
78d62e9376 Revert "Disable opening context menu by right-clicking on mobile"
This reverts commit 51efecaa25.
2022-07-13 14:55:55 +02:00
l10n daemon script
11e9eaf3e9 GIT_SILENT Sync po/docbooks with svn 2022-07-13 01:52:14 +00:00
James Graham
4337d0d5d8 Removing all \n is incorrect as these are used to show linebreaks in the html formatted body. Instead use the CMARK_OPT_HARDBREAKS options so these softbreaks in the markdown string are converted to hard breaks <br/> in the html.
Also remove 2 step process to replace <!-- raw HTML omitted --> and straight replace with "" to ensure no real breaks are removed
2022-07-12 14:03:21 +00:00
l10n daemon script
a07537367f GIT_SILENT Sync po/docbooks with svn 2022-07-12 01:55:45 +00:00
Tobias Fella
51efecaa25 Disable opening context menu by right-clicking on mobile
Apparently TapHandlers interpret a tap as a right click, which causes rooms to not open reliably
2022-07-11 12:41:27 +02:00
l10n daemon script
830a47c5ff GIT_SILENT Sync po/docbooks with svn 2022-07-11 01:57:02 +00:00
Tobias Fella
24748d42d8 Port C++ to Qt6
QML is still broken
2022-07-10 21:43:57 +00:00
l10n daemon script
19fe439e95 GIT_SILENT Sync po/docbooks with svn 2022-07-10 01:57:44 +00:00
Tobias Fella
2bcd7118f4 Ensure that text isn't formatted in context menu 2022-07-09 23:01:13 +02:00
l10n daemon script
27e660178e GIT_SILENT Sync po/docbooks with svn 2022-07-09 01:57:03 +00:00
Tobias Fella
e0df553a72 Remove unused imports & includes 2022-07-08 13:16:07 +02:00
l10n daemon script
53f040cb28 GIT_SILENT Sync po/docbooks with svn 2022-07-08 01:54:23 +00:00
Nicolas Fella
28cc7cf616 Add FreeBSD CI 2022-07-07 12:51:33 +02:00
l10n daemon script
d224df8aa2 GIT_SILENT Sync po/docbooks with svn 2022-07-07 01:48:15 +00:00
l10n daemon script
1dff2b8273 GIT_SILENT Sync po/docbooks with svn 2022-07-06 01:49:30 +00:00
Nicolas Fella
722aa422e7 Fix activating browser windows on Wayland
QDesktopServices::openUrl does not have XDG activation support yet so it can't raise an existing browser window when opening URLs

Instead use KIO::OpenUrlJob, which does support that
2022-07-05 22:55:12 +00:00
Akseli Lahtinen
70de0dc624 add settings button to room context menu 2022-07-05 21:26:12 +00:00
l10n daemon script
9d804e6ea7 GIT_SILENT Sync po/docbooks with svn 2022-07-05 01:46:44 +00:00
Volker Krause
52d552650d Use product screenshots from CDN rather than expensive direct Gitlab links 2022-07-03 12:16:43 +02:00
l10n daemon script
0c5007fd56 GIT_SILENT Sync po/docbooks with svn 2022-07-03 02:06:37 +00:00
l10n daemon script
af19829225 GIT_SILENT Sync po/docbooks with svn 2022-06-28 01:49:26 +00:00
l10n daemon script
0be8828dd4 GIT_SILENT Sync po/docbooks with svn 2022-06-27 01:47:51 +00:00
l10n daemon script
729b6bd354 GIT_SILENT Sync po/docbooks with svn 2022-06-26 01:48:37 +00:00
Heiko Becker
ef10042179 Sonnet is only a runtime dependency
Since 98571cb37d.
2022-06-25 15:16:54 +02:00
l10n daemon script
846d430947 GIT_SILENT Sync po/docbooks with svn 2022-06-25 02:08:13 +00:00
l10n daemon script
cce4a3ebdf GIT_SILENT made messages (after extraction) 2022-06-25 00:49:02 +00:00
l10n daemon script
5b848961bc GIT_SILENT Sync po/docbooks with svn 2022-06-24 01:46:09 +00:00
Tobias Fella
51574f5125 Fix actions in ListItems
Apparently the combination of SwipeListItem and BasicListItem is evil, so port away from it to ensure that actions show up again.
2022-06-23 23:07:10 +00:00
Tobias Fella
a779907500 Add changelog for 22.06 2022-06-23 18:06:42 +00:00
Tobias Fella
f195db323d Fix matrix room link in appdata 2022-06-23 18:31:39 +02:00
Bhushan Shah
da47d76a7f GIT_SILENT: bump version to 22.06 2022-06-23 21:11:20 +05:30
l10n daemon script
6dc8c4976c GIT_SILENT Sync po/docbooks with svn 2022-06-23 01:48:38 +00:00
l10n daemon script
fec7680068 GIT_SILENT Sync po/docbooks with svn 2022-06-22 01:48:25 +00:00
l10n daemon script
b84264891d GIT_SILENT Sync po/docbooks with svn 2022-06-21 01:49:20 +00:00
l10n daemon script
465a981033 GIT_SILENT Sync po/docbooks with svn 2022-06-20 02:04:09 +00:00
l10n daemon script
06b4c40b33 GIT_SILENT Sync po/docbooks with svn 2022-06-19 01:48:06 +00:00
Tobias Fella
efae510fda Don't use PublicRoomsChunk::aliases
Doesn't seem to be part of the spec and currently isn't in libQuotient; if it comes back, we can revert this.
Until then, this fixes the build
2022-06-18 15:10:25 +02:00
l10n daemon script
f9fc8c5c0b GIT_SILENT Sync po/docbooks with svn 2022-06-18 01:48:49 +00:00
Weng Xuetian
49c9c63bf5 Fix the switch room direction
Down should be next and Up should be Previous
2022-06-17 18:11:24 +00:00
James Graham
90cee0f437 Clear the text from the user list filter in the room drawer when the room is changed 2022-06-17 18:59:33 +01:00
l10n daemon script
5bc9362fde GIT_SILENT Sync po/docbooks with svn 2022-06-17 01:47:27 +00:00
l10n daemon script
10922aeb52 GIT_SILENT Sync po/docbooks with svn 2022-06-16 02:02:06 +00:00
Tobias Fella
f9a96ccdab It's 2022 2022-06-15 16:16:51 +02:00
l10n daemon script
04056d9ed1 GIT_SILENT Sync po/docbooks with svn 2022-06-15 01:52:09 +00:00
l10n daemon script
ecf373e317 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-06-15 01:45:58 +00:00
James Graham
9c2e0669f6 Fixe Reply or Edit from Chatbar
Fixes it so that the cleaned text is shown when using the shortcuts to reply or edit from the chatbar. Also ensures that the correct eventids are passed when the message is an edit.

This also fixes the issue of having html pasted into the chatbar when editing and edit.

Fixes network/neochat#448

BUG: 455016
2022-06-14 13:47:13 +00:00
l10n daemon script
2b8aa9f975 GIT_SILENT Sync po/docbooks with svn 2022-06-14 01:58:53 +00:00
l10n daemon script
2f61090413 GIT_SILENT Sync po/docbooks with svn 2022-06-13 02:51:21 +00:00
l10n daemon script
aa9daad704 GIT_SILENT made messages (after extraction) 2022-06-13 01:02:32 +00:00
l10n daemon script
0e79d3506d GIT_SILENT Sync po/docbooks with svn 2022-06-12 01:51:48 +00:00
l10n daemon script
72994d0349 GIT_SILENT Sync po/docbooks with svn 2022-06-11 01:45:58 +00:00
l10n daemon script
0ee5ba76c9 GIT_SILENT Sync po/docbooks with svn 2022-06-09 02:19:15 +00:00
l10n daemon script
d1398f6726 GIT_SILENT made messages (after extraction) 2022-06-09 00:52:50 +00:00
l10n daemon script
9084817450 GIT_SILENT Sync po/docbooks with svn 2022-06-08 01:49:25 +00:00
Jan Bidler
083a2f9772 Compact Mode improvements
BUG: 454897
2022-06-07 12:33:14 +00:00
Jan Bidler
b44e81c849 Make Right Click on Room bring up Context Menu
BUG: 454892
2022-06-07 08:42:39 +00:00
l10n daemon script
014826bd09 GIT_SILENT Sync po/docbooks with svn 2022-06-07 02:33:47 +00:00
l10n daemon script
2858fcfad2 GIT_SILENT made messages (after extraction) 2022-06-07 00:53:49 +00:00
l10n daemon script
b6db36a9f2 GIT_SILENT Sync po/docbooks with svn 2022-06-06 01:48:51 +00:00
James Graham
ede860c99f For all html messages \n needs to be replaces with <br> or the linebreaks are lost 2022-06-05 12:36:33 +01:00
l10n daemon script
f8951fc760 GIT_SILENT Sync po/docbooks with svn 2022-06-05 01:49:04 +00:00
Tobias Fella
525015fe78 Fix fix 2022-06-05 00:41:59 +02:00
Akseli Lahtinen
b834510be0 Don't show notifications if application is active and same room is active 2022-06-04 23:24:24 +02:00
Tobias Fella
8700611235 Fix hoverActions 2022-06-04 20:32:49 +02:00
l10n daemon script
15ddcef115 GIT_SILENT Sync po/docbooks with svn 2022-06-04 01:49:22 +00:00
l10n daemon script
7216da8b6f GIT_SILENT Sync po/docbooks with svn 2022-06-03 01:47:11 +00:00
Tobias Fella
7bd4aac692 Fix custom emoji creation 2022-06-02 13:19:12 +02:00
l10n daemon script
10e17d9f0f GIT_SILENT Sync po/docbooks with svn 2022-06-02 01:48:24 +00:00
James Graham
db5e328869 Add automatic room sidebar hiding option
Add menu option to change whether the room information drawer is opened automatically or not. This also adds some code to switch off the dim effect during the first animation after modal is changed as this looked bad.

Implements network/neochat#243

Slight cleanup removing the edge option for context drawer from main.qml as this is duplicated from RoomDrawer.qml
2022-06-01 20:09:47 +00:00
l10n daemon script
921667565e GIT_SILENT Sync po/docbooks with svn 2022-06-01 02:05:25 +00:00
l10n daemon script
9cd8a380ed GIT_SILENT Sync po/docbooks with svn 2022-05-31 02:13:37 +00:00
James Graham
29816730e4 Add space after an autocomplete
Adds a space automatically after an autocomplete if the last char isn't one.

Implements network/neochat#132
2022-05-30 19:17:47 +00:00
Tobias Fella
7214936eaa Fix compilation against libQuotient 0.6 2022-05-30 14:41:00 +02:00
Tobias Fella
5a7c3295dc Revert "Linkify urls"
This seems to mess up user mentions. Probably a bug in the regex;
Reverting for now

This reverts commit 1763dc13c5.
2022-05-30 14:28:35 +02:00
Tobias Fella
dce4a409c7 Adapt to libQuotient API changes 2022-05-30 14:23:29 +02:00
l10n daemon script
bd27904f17 GIT_SILENT Sync po/docbooks with svn 2022-05-29 01:52:07 +00:00
l10n daemon script
731b234dda GIT_SILENT Sync po/docbooks with svn 2022-05-28 02:35:16 +00:00
l10n daemon script
ce0fc637c4 GIT_SILENT made messages (after extraction) 2022-05-28 00:56:00 +00:00
Yuri Chornoivan
070fe45a2d Fix XML 2022-05-27 09:27:48 +03:00
l10n daemon script
3a8d078e6c GIT_SILENT Sync po/docbooks with svn 2022-05-27 01:47:34 +00:00
Tobias Fella
fb9183e5c3 Update bug reporting urls 2022-05-26 17:18:29 +02:00
l10n daemon script
853113df3f GIT_SILENT Sync po/docbooks with svn 2022-05-22 01:48:20 +00:00
James Graham
e62288e6f1 Adds some basic mouse contorls to the quickswitcher. The icons can now be clicked to select the room and the highlight is moved to the current hovered room. 2022-05-21 10:55:43 +00:00
Tobias Fella
4f978a950b Appstream: define launchable 2022-05-20 13:13:36 +02:00
l10n daemon script
36b2868933 GIT_SILENT Sync po/docbooks with svn 2022-05-20 01:47:21 +00:00
Tobias Fella
1763dc13c5 Linkify urls 2022-05-19 23:14:33 +02:00
l10n daemon script
b7e4c2c6a2 GIT_SILENT Sync po/docbooks with svn 2022-05-19 01:47:37 +00:00
l10n daemon script
5969612ead SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-05-19 01:41:56 +00:00
Tobias Fella
0d00d4200c Don't crash while trying to load last message by own user
Fixes #535
2022-05-17 13:50:54 +02:00
l10n daemon script
35f30c293b GIT_SILENT Sync po/docbooks with svn 2022-05-17 01:50:13 +00:00
Tobias Fella
77e20ec446 Don't escape html while posting messages 2022-05-16 20:29:44 +02:00
Tobias Fella
101b57c581 Revert "Fix double quoting and missing new lines in message sent"
This reverts commit f2cf82ee8e.
2022-05-16 20:26:35 +02:00
l10n daemon script
b994907be4 GIT_SILENT Sync po/docbooks with svn 2022-05-16 01:56:18 +00:00
l10n daemon script
97ce81daca SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-05-16 01:45:56 +00:00
Nicolas Fella
4e61c5e53c Fix rasing window when activating notifications
This was done for invite notifications but not regular notifications
2022-05-15 23:28:13 +02:00
Tobias Fella
6871ed051c Always send messages as HTML
This works around limitations of Qt's rich text detection and prevents
some messages from being shown wrong, like in #532.

In theory it is not ideal to send every message as HTML, however it's
not a significant problem and we already do it for edits and replies
(which also explains why edited messages are sometimes magically
rendered correctly while the original is not).
2022-05-15 20:31:18 +00:00
James Graham
10da870ab3 Fix search item being behind the roomlist in collapsed mode by moving code into ListView. Now the search item is always at the top of the list. 2022-05-15 14:17:38 +01:00
l10n daemon script
6b5f76296a GIT_SILENT Sync po/docbooks with svn 2022-05-15 02:04:12 +00:00
l10n daemon script
93a4930301 GIT_SILENT made messages (after extraction) 2022-05-15 00:48:20 +00:00
l10n daemon script
7b393f2681 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-05-14 01:41:26 +00:00
l10n daemon script
fb6266fa15 GIT_SILENT made messages (after extraction) 2022-05-14 00:44:34 +00:00
l10n daemon script
334b245669 GIT_SILENT Sync po/docbooks with svn 2022-05-13 01:51:00 +00:00
l10n daemon script
3a969189b8 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-05-13 01:44:55 +00:00
James Graham
cef5d11130 Fix scrollbar behaviour in Room List
In the Room List there is always a gap left for the scrollbar in normal mode whether it is visible or not. This commit makes the gap disappear when the scrollbar is not visible by using the verticalscrollbarpolicy of the scrollpage.

Fixes network/neochat#518
2022-05-12 19:16:40 +00:00
l10n daemon script
216c751d81 GIT_SILENT Sync po/docbooks with svn 2022-05-12 01:46:13 +00:00
l10n daemon script
154109dde1 GIT_SILENT Sync po/docbooks with svn 2022-05-10 01:50:40 +00:00
l10n daemon script
312db10439 GIT_SILENT Sync po/docbooks with svn 2022-05-09 01:49:41 +00:00
l10n daemon script
f4f540e805 GIT_SILENT Sync po/docbooks with svn 2022-05-08 01:47:31 +00:00
l10n daemon script
b3ca71580f GIT_SILENT Sync po/docbooks with svn 2022-05-07 01:49:11 +00:00
l10n daemon script
2fc2ac113e GIT_SILENT Sync po/docbooks with svn 2022-05-06 01:49:57 +00:00
l10n daemon script
2ea95ea080 GIT_SILENT Sync po/docbooks with svn 2022-05-05 01:51:03 +00:00
l10n daemon script
22168dcef9 GIT_SILENT Sync po/docbooks with svn 2022-05-04 01:49:52 +00:00
l10n daemon script
e25ffd0c41 GIT_SILENT Sync po/docbooks with svn 2022-05-03 01:53:55 +00:00
Tobias Fella
5595d8f896 Allow disabling sending of typing notifications 2022-05-02 10:36:48 +00:00
l10n daemon script
abed37518d GIT_SILENT Sync po/docbooks with svn 2022-05-02 01:44:26 +00:00
l10n daemon script
57493e87ee GIT_SILENT Sync po/docbooks with svn 2022-05-01 02:01:04 +00:00
Tobias Fella
1bcff6503f Fix typo 2022-04-30 19:40:07 +02:00
Tobias Fella
98571cb37d Remove leftover spellchecking files 2022-04-30 14:48:28 +02:00
l10n daemon script
b64cd3c1b8 GIT_SILENT Sync po/docbooks with svn 2022-04-29 01:48:29 +00:00
l10n daemon script
69ced8406b GIT_SILENT Sync po/docbooks with svn 2022-04-27 01:51:49 +00:00
Nicolas Fella
1f551b5f59 Use proper reuse CI job 2022-04-26 00:27:23 +02:00
l10n daemon script
48a2a793c8 GIT_SILENT Sync po/docbooks with svn 2022-04-25 01:56:50 +00:00
Bhushan Shah
be116e1ba7 GIT_SILENT: add changelog entries for 22.04 2022-04-23 18:25:50 +05:30
Bhushan Shah
3396f831d4 GIT_SILENT: bump version to 22.04 2022-04-23 17:04:13 +05:30
l10n daemon script
a0f6170539 GIT_SILENT Sync po/docbooks with svn 2022-04-23 01:49:18 +00:00
l10n daemon script
731c6f924c GIT_SILENT Sync po/docbooks with svn 2022-04-22 01:53:07 +00:00
l10n daemon script
3011c3d885 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-22 01:44:58 +00:00
Nicolas Fella
709b2c8fd9 Use undeprecated install dirs
Using kde-dev-scripts/kf5/cmakelists_install_vars.pl
2022-04-21 20:58:00 +02:00
l10n daemon script
0cfa87e23d GIT_SILENT Sync po/docbooks with svn 2022-04-21 01:48:36 +00:00
l10n daemon script
538ed7dd02 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-21 01:42:02 +00:00
l10n daemon script
180a754e67 GIT_SILENT Sync po/docbooks with svn 2022-04-19 01:51:51 +00:00
l10n daemon script
81ba5f6ee5 GIT_SILENT Sync po/docbooks with svn 2022-04-17 01:57:04 +00:00
l10n daemon script
a15b406cff SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-16 01:44:16 +00:00
Marcus Harrison
d0bc8f3d05 Fix mis-aligned user messages
In compact mode with userMessagesOnRight, the user
avatar disappeared and their messages left space
on the right for an avatar that wasn't displayed
anymore.
2022-04-14 14:38:02 +02:00
l10n daemon script
c83f4b4f75 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-10 01:45:29 +00:00
Tobias Fella
0f5425e030 Require passing tests on CI 2022-04-09 21:33:52 +02:00
Tobias Fella
f381cc4623 Close WelcomePage after account is loaded 2022-04-09 19:47:36 +02:00
Tobias Fella
decd528079 Disable busyindicator 2022-04-09 19:47:17 +02:00
Tobias Fella
0c5bd57976 Fix REUSE check on CI
The CI installs files to _include and _build in the source directory, which breaks
the REUSE check
2022-04-09 15:19:35 +00:00
Tobias Fella
7362b90c42 Don't try to load more messages than there are in the timeline
The function call from qml is removed because it is redundant
2022-04-08 18:44:30 +00:00
Tobias Fella
aef6d6fc85 More typing notification improvements 2022-04-08 20:37:17 +02:00
Tobias Fella
432e209b16 Try fixing stuck read notifications 2022-04-08 20:33:41 +02:00
l10n daemon script
a72cac5ea3 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-08 01:44:45 +00:00
Tobias Fella
b9152dc93c Add ki18n_install 2022-04-07 17:25:16 +02:00
l10n daemon script
e5791970da SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-07 01:43:10 +00:00
Carl Schwan
c157625645 Fix link 2022-04-06 14:04:21 +00:00
Nicolas Fella
026c7660bc Add Windows CI 2022-04-06 12:01:47 +02:00
Nicolas Fella
be10e66974 Fix condition to build runner 2022-04-06 12:01:47 +02:00
l10n daemon script
024fb1a97a SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-04 01:46:19 +00:00
l10n daemon script
e4c8b6b676 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-03 01:54:27 +00:00
l10n daemon script
863508b629 GIT_SILENT made messages (after extraction) 2022-04-03 00:48:36 +00:00
l10n daemon script
ef5550bafd SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-04-02 01:41:06 +00:00
Nicolas Fella
1cc8d915bc Add rooms runner
This allows to search for and open rooms in KRunner
2022-04-01 10:56:19 +00:00
Snehit Sah
9a5f2e4938 Show subtitle text without markdown
Create new role in RoomListModel to send back cleaned subtitle text
2022-03-31 17:39:34 +00:00
l10n daemon script
a747d44cac SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-03-14 01:43:37 +00:00
Tobias Fella
334c13b36c Set preferredWidth and preferredHeight of images 2022-03-11 15:09:57 +01:00
Tobias Fella
aac96da2e2 Revert "Show RoomList when cached state is loaded"
This reverts commit db5f328539.
2022-03-08 21:10:38 +01:00
Tobias Fella
12f3f72a67 Lower typing notification timeouts 2022-03-08 15:00:00 +01:00
Tobias Fella
62f6cfbf9a Force RoomListDelegate to use plaintext
Text.AutoText isn't robust enough to handle this
2022-03-08 14:45:33 +01:00
l10n daemon script
c59e3db1dd SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-03-05 01:43:56 +00:00
Tobias Fella
9252e0e65e Disable the BusyIndicator
For some reason having the busyindicator running increases the time
required to load the state cache by several orders of magnitude
2022-03-01 12:18:07 +00:00
Carl Schwan
80ee5e9356 Apply 1 suggestion(s) to 1 file(s) 2022-03-01 00:29:07 +00:00
Tobias Fella
be802a28c2 Make invitation notifications persistent 2022-03-01 00:29:07 +00:00
Tobias Fella
b2a8430fa2 Don't apply autocompletion when autocomplete list is empty
Fixes sending messages like ':)'
2022-03-01 00:26:28 +00:00
Tobias Fella
db5f328539 Show RoomList when cached state is loaded
This should somewhat speed up the loading since we don't need to wait
until the first sync is done.

It's still slow though since loading the cache is slow
2022-03-01 00:29:48 +01:00
l10n daemon script
9ac1fbd99b GIT_SILENT made messages (after extraction) 2022-02-27 00:46:56 +00:00
Tobias Fella
022951a9df Add nicer delegate message for widget events 2022-02-25 20:49:57 +00:00
Tobias Fella
47a0d30e57 Fix quitting without tray icon
Setting KSNI status to Passive doesn't *disable* the tray icon, it just
moves it to the overflow menu. This causes the application to not quit
when closing the app even when disabling the tray icon
2022-02-25 20:19:12 +00:00
Tobias Fella
faeb1964bd Prepare Image & Video loading for E2EE
Changes the urls to make sure they are decrypted, while making sure that
it is backwards compatible to libQuotient 0.6
2022-02-25 21:15:46 +01:00
Tobias Fella
db8b2fd64b Aggregate similar state events 2022-02-25 20:10:07 +00:00
Tobias Fella
37c7fe380b Don't load backlog until read marker
This is bad if there are a lot of unread messages
2022-02-25 12:29:03 +01:00
l10n daemon script
537a1e44b1 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-02-25 01:50:55 +00:00
Tobias Fella
dc9d574b58 Fix login regex 2022-02-23 22:49:58 +01:00
Jose Flores
7c807e6a25 Modifies regex check for valid matrix server to accept ip addresses. 2022-02-22 22:54:43 +00:00
Jose Flores
f74c6a41ae Wraps the checkbox text for messages on the right to wrap on mobile devices (PinePhone). 2022-02-22 03:47:20 +00:00
Jose Flores
7d5a8c87a1 Wraps the quick edit checkbox using workaround 2022-02-22 03:47:20 +00:00
Sandro Knauß
ca719b835e The component of QtCoro5 is called Core and not Coro ;) 2022-02-21 16:31:24 +00:00
l10n daemon script
9b5ad3a3a0 GIT_SILENT made messages (after extraction) 2022-02-21 00:43:44 +00:00
Jose Flores
fdfbbb1b04 Uses the formatted message to enable clickable links for mobile. 2022-02-19 14:30:16 +00:00
Tobias Fella
dd91cb91d0 Load replied-to message when it isn't in the timeline already 2022-02-18 16:11:51 +01:00
Tobias Fella
290b2249c4 Port away from CMake deprecation 2022-02-14 22:41:42 +01:00
Jose Flores
8b8e521c56 Fix issue with clear image button. Will only be visible if the user has an avatar (local or saved) 2022-02-13 22:46:51 +00:00
Tobias Fella
cba88e1af7 Allow disabling notification inline reply
Is temporarily required for encrypted rooms
2022-02-12 22:33:10 +01:00
Tobias Fella
1661d34d7c Use Quotient's NetworkAccessManager in QML
Will be required for showing encrypted images
2022-02-12 22:23:59 +01:00
Tobias Fella
dc3b1a3c87 Remove unneeded parameter 2022-02-12 22:09:38 +01:00
Tobias Fella
f55dc19d95 Make user colors update when colortheme changes 2022-02-11 02:06:46 +01:00
Vitaly Zaitsev
6014c15b4f SingleMainWindow is a part of XDG SPEC version 1.5 and bogus on 1.0.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
2022-02-09 17:30:19 +01:00
l10n daemon script
a5f835b1eb GIT_SILENT made messages (after extraction) 2022-02-09 00:47:40 +00:00
Bhushan Shah
1fd6b615ff GIT_SILENT: Update version and appstream data for 22.02 2022-02-08 18:23:50 +05:30
Carl Schwan
dd4ef2e4ac GIT_SILENT: Add appstream description 2022-02-08 12:51:47 +00:00
Nicolas Fella
3b73409b7a Don't recreate config group when saving last room
Instead have the group as a member of the room manager
2022-02-07 21:54:46 +01:00
Tobias Fella
335ef240f5 Don't crash on empty creation event 2022-02-07 15:35:45 +01:00
Carl Schwan
ca8a21c0eb Implement sharing with Purpose (export)
This provide both a mobile and desktop view

Fix #181
2022-02-05 16:30:02 +00:00
ivan tkachenko
3e6f38c8ea Use ellipsis in «Loading…» strings 2022-02-04 20:59:17 +03:00
Tobias Fella
a6ab447955 Implement adding labels for account
This gives the user the ability to label different account (e.g. "work",
"private") and shows this label in the account switcher. Showing the
label in more places will be done in future MRs.

The label is stored in the user's account data and thus transfers
automatically to other instances of neochat
2022-01-31 22:45:17 +01:00
Tobias Fella
0b7dcd70ac Immediately apply leave/join event setting
Fixes #374
2022-01-31 21:52:28 +01:00
Tobias Fella
bce560b03b Fix left margin in EncryptedDelegate 2022-01-30 23:21:00 +01:00
Tobias Fella
5a1198d28c Set empty state key for room avatar change events 2022-01-29 01:13:55 +01:00
l10n daemon script
b236e61ea7 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-01-22 01:48:34 +00:00
l10n daemon script
79faeb21c9 GIT_SILENT made messages (after extraction) 2022-01-22 00:44:10 +00:00
Felipe Kinoshita
6ac6234886 Give settings window a title
Now the settings window title is "Configure ─ NeoChat" instead of
"Neochat <2>".
2022-01-21 21:42:46 +00:00
Devin Lin
fc9e4fc961 Reduce minimum height of the window
Reduce the minimum height of the window so that it doesn't go off the screen when on mobile landscape (Pinephone)
2022-01-18 23:56:57 +00:00
Friedrich W. H. Kossebau
24644887e0 Modernize code to activate window on user activation
* use KWindowSystem::updateStartupId() for abstract update of X11
  startup id or wayland activation token
* call QWindow::raise() also for wayland to prepare when it will
  support it
* call KWindowSystem::activateWindow() for all platforms, like done
  by other apps on user-triggered activation
2022-01-16 19:15:22 +00:00
Christopher Hock
a29ec0a18a Use the x-kde-origin-name notification hint to pass the account name to push notifications 2022-01-15 17:56:25 +01:00
Antonio Rojas
9300e65239 Fix build with qcoro 0.4
Cmake targets and config files have been renamed. Check for the 0.4 name first and fall back to the old one
2022-01-06 21:37:07 +00:00
Nate Graham
ee59006c08 Change X-GNOME-SingleWindow key to SingleMainWindow
X-GNOME-SingleWindow was upstreamed to be an XDG thing with the name
"SingleMainWindow" in
https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/53
2022-01-05 17:02:54 -07:00
Tobias Fella
ca8702fd5e Don't set cmake policy when using libquotient 0.7 2022-01-02 22:47:42 +01:00
Tobias Fella
183c3227a9 Set bugs url 2022-01-02 22:34:06 +01:00
l10n daemon script
e86f70db85 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-01-02 01:57:27 +00:00
l10n daemon script
00d8fb75e3 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-01-01 01:42:37 +00:00
l10n daemon script
c3d149765c GIT_SILENT made messages (after extraction) 2021-12-29 00:48:31 +00:00
Carl Schwan
200281702a Raise windows also on other platforms
And unify code related to unique application handling
2021-12-28 23:50:25 +01:00
Carl Schwan
297684a139 Fix issues with saveFileAs
Fix #491
2021-12-28 23:42:16 +01:00
Jack Hill
aeee367e82 Changed "Settings" to "Configure NeoChat" in menu
Changed both the hamburger menu and the global menu
Fix #489
2021-12-28 16:51:30 +00:00
Carl Schwan
aa9dcc87cb Fix variable lookup in the timeline delegates
This fix issues with downloading and interacting with files
2021-12-28 16:18:05 +01:00
Carl Schwan
8a70e240e4 Improve toolbar on mobile
* Use Toolbar style with only back button when needed
* Don't show context drawer on room list

![image](/uploads/681f11e7d1a340a1b6a834df2b32960a/image.png)

![image](/uploads/564a91df531e7de363743efd4915b2e8/image.png)
2021-12-28 15:00:30 +00:00
Carl Schwan
50a7df8e03 ifdef version for compatibility with our minimal required version 2021-12-26 20:30:10 +00:00
Carl Schwan
dd977976db Improve emoji pane 2021-12-26 13:26:42 +00:00
Carl Schwan
de666b9377 Check if password can be changed 2021-12-26 13:08:05 +00:00
Carl Schwan
5f41378214 Fix image tooltip
display needs to be from the model and not from the Control
2021-12-26 00:14:09 +01:00
Carl Schwan
383b31c185 Expose hiddent GUI option
Fix #49
2021-12-25 20:34:47 +00:00
Carl Schwan
de2fbadba5 Adapt list setting pages to new style 2021-12-25 19:50:31 +00:00
Carl Schwan
67bc66ee0c Allow using ESC to go back to room list
Fix #392
2021-12-25 18:12:13 +00:00
Carl Schwan
924a1fed21 Port away from QNetworkConfigurationManager
QNetworkConfigurationManager was removed from Qt6 and it's better to
check the status of the sync job anyway. Only two issues:

* The timeout in quotient is quite high so it might take up to one
  minute before the message appear.
* Only sync job are listened but since they are continuously done, this
  is not a big issue and other job are affected by the same issue of an
  high timeout anyway.

Fix #414
2021-12-25 17:55:48 +00:00
Carl Schwan
b0a1de7572 Fix reuse issue 2021-12-25 18:55:32 +01:00
Carl Schwan
ca2b5fde8e Remove lag when starting user autocompletion
We realistically don't need to interate over every user when typing '@',
since this is not usefull for the user and create some lag.
2021-12-25 18:31:22 +01:00
Nicolas Fella
26f0cd4cf4 Set single window hint in desktop file
NeoChat is a single window application

This allows shells to hide the 'Open new window' action for NeoChat
2021-12-25 17:30:50 +01:00
Carl Schwan
0801b815c8 Make room address selectable
Help with #469
2021-12-25 15:33:26 +01:00
Carl Schwan
28137c8c86 Display monochrome icon in tray
Fix #471
2021-12-25 15:30:20 +01:00
Carl Schwan
e79e06235f Fix QuickSwitcher activation
By making sure the global menu bar is disabled when not needed. This
should also help with memory usage.

Fix #482
2021-12-25 14:41:43 +01:00
Nicolas Fella
dce7fde7a6 Fix Windows/mac build 2021-12-23 23:24:29 +01:00
Tobias Fella
8d9f3b8658 Revert "Add CI for FreeBSD"
This reverts commit d71ccc46d0
2021-12-22 16:52:43 +00:00
Nicolas Fella
5e1adf7ea7 Fix notifications on Android
Bundle the notifyrc file in qrc so that KNotifications finds it
2021-12-22 14:23:47 +00:00
Tobias Fella
d71ccc46d0 Add CI for FreeBSD 2021-12-22 14:14:30 +00:00
Aleix Pol
284a1734ae Support raising when we receive a notification 2021-12-15 15:08:32 +00:00
Tobias Fella
8722c99c93 Remove unused function 2021-12-15 01:04:51 +01:00
Tobias Fella
0c5932b3da Use a reasonable role for message source 2021-12-15 01:03:05 +01:00
Tobias Fella
332d6c9782 Minor improvements
- Rename TextDelegate to RichLabel since it's not actually a delegate
- Allow web search for whole messages
2021-12-15 00:53:43 +01:00
Tobias Fella
91f3f64bb5 Don't connect to something that isn't a signal 2021-12-14 22:34:32 +00:00
Tobias Fella
599ab11656 Refactor delegates 2021-12-14 22:27:29 +00:00
Tobias Fella
ff707b7a58 Remove dead code 2021-12-14 16:48:42 +01:00
Tobias Fella
e551319245 Don't render html in RoomDrawer heading 2021-12-14 15:54:14 +01:00
Fushan Wen
59430cce89 Add support for minimizing to system tray on startup
If the user wants to automatically launch NeoChat when the system
starts up, the user may also want to minimize the window to system tray
on startup. So a new option named "Minimize to system tray on startup"
is added.

The option is only visible on desktop platforms, and is only enabled
when "Close to system tray" is checked.

In order to restore window geometry for the first time the user opens
the window if the option is checked,

1. a new function named `restoreWindowGeometry` is added, and
   `restoreWindowGeometryConnections` will be enabled if the option is
   checked, and will be disabled after the window debuts.
2. `saveWindowGeometryConnections` will be enabled if the option is not
   checked, and will be disabled if checked and enabled after the window
   debuts.
2021-12-13 22:05:20 +08:00
Carl Schwan
d1bbb5e3f7 Use non blocking passord reading
This also remove the do while loop that might cause problem and expose
the error message to the user.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-12-12 22:13:19 +00:00
Carl Schwan
6e1c07047e Add a mobile oriented context menu for the room list
It works similarly as in the timeline with a bottom based drawer on
mobile and a normal context menu on desktop

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-12-12 22:09:46 +00:00
Carl Schwan
738270f513 Fix loading room settings on mobile
Required properties don't work correctly with StackLayou.push

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-12-12 16:57:40 +00:00
l10n daemon script
9496127e88 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2021-12-12 01:44:42 +00:00
Nicolas Fella
16d43e9ee8 Use icon from qrc for system tray icon
Fixes the system tray on Windows
2021-12-11 20:10:59 +01:00
Tobias Fella
d0e04e0c97 Adapt to libQuotient API change 2021-12-10 18:06:12 +01:00
Carl Schwan
658eb187c9 Prevent instability with TextArea with null as background 2021-12-08 14:16:34 +01:00
826 changed files with 491207 additions and 19019 deletions

2
.contextProperties.ini Normal file
View File

@@ -0,0 +1,2 @@
[General]
disableUnqualifiedAccess = "i18nc,xi18nc,i18ncp,i18n"

6
.craft.ini Normal file
View File

@@ -0,0 +1,6 @@
; SPDX-FileCopyrightText: None
; SPDX-License-Identifier: CC0-1.0
[BlueprintSettings]
kde/applications/neochat.packageAppx=True
libs/qt.qtMajorVersion=6

201
.flatpak-manifest.json Normal file
View File

@@ -0,0 +1,201 @@
{
"id": "org.kde.neochat",
"branch": "master",
"runtime": "org.kde.Platform",
"runtime-version": "6.10",
"sdk": "org.kde.Sdk",
"command": "neochat",
"tags": [
"nightly"
],
"desktop-file-name-suffix": " (Nightly)",
"finish-args": [
"--share=network",
"--share=ipc",
"--socket=fallback-x11",
"--socket=wayland",
"--device=dri",
"--filesystem=xdg-download",
"--talk-name=org.freedesktop.Notifications",
"--talk-name=org.kde.kwalletd5",
"--talk-name=org.kde.StatusNotifierWatcher",
"--talk-name=org.freedesktop.secrets",
"--talk-name=org.kde.kuiserver",
"--own-name=org.kde.StatusNotifierItem-2-2"
],
"cleanup": [
"/include",
"/lib/*.a",
"/lib/cmake",
"/lib/pkgconfig",
"/share/ndk-modules"
],
"modules": [
{
"name": "opencv",
"config-opts": [
"-DBUILD_TESTS=OFF",
"-DWITH_GTK=OFF",
"-DBUILD_LIST=core,imgproc"
],
"buildsystem": "cmake-ninja",
"sources": [
{
"type": "git",
"url": "https://github.com/opencv/opencv"
}
],
"builddir": true
},
{
"name": "kquickimageeditor",
"config-opts": [
"-DBUILD_WITH_QT6=ON",
"-DBUILD_TESTING=OFF"
],
"buildsystem": "cmake-ninja",
"sources": [
{
"type": "git",
"url": "https://invent.kde.org/libraries/kquickimageeditor"
}
]
},
{
"name": "olm",
"buildsystem": "cmake-ninja",
"config-opts": [
"-DCMAKE_POLICY_VERSION_MINIMUM=3.5",
"-DOLM_TESTS=OFF"
],
"sources": [
{
"type": "git",
"url": "https://gitlab.matrix.org/matrix-org/olm.git",
"tag": "3.2.16",
"x-checker-data": {
"type": "git",
"tag-pattern": "^([\\d.]+)$"
},
"commit": "7e0c8277032e40308987257b711b38af8d77cc69"
}
]
},
{
"name": "libsecret",
"buildsystem": "meson",
"config-opts": [
"-Dmanpage=false",
"-Dvapi=false",
"-Dgtk_doc=false",
"-Dintrospection=false",
"-Dcrypto=disabled"
],
"sources": [
{
"type": "archive",
"url": "https://download.gnome.org/sources/libsecret/0.21/libsecret-0.21.7.tar.xz",
"sha256": "6b452e4750590a2b5617adc40026f28d2f4903de15f1250e1d1c40bfd68ed55e",
"x-checker-data": {
"type": "gnome",
"name": "libsecret",
"stable-only": true
}
}
]
},
{
"name": "qtkeychain",
"buildsystem": "cmake-ninja",
"sources": [
{
"type": "archive",
"url": "https://github.com/frankosterfeld/qtkeychain/archive/refs/tags/0.15.0.tar.gz",
"sha256": "f4254dc8f0933b06d90672d683eab08ef770acd8336e44dfa030ce041dc2ca22",
"x-checker-data": {
"type": "anitya",
"project-id": 4138,
"stable-only": true,
"url-template": "https://github.com/frankosterfeld/qtkeychain/archive/refs/tags/$version.tar.gz"
}
}
],
"config-opts": [
"-DBUILD_WITH_QT6=ON",
"-DCMAKE_INSTALL_LIBDIR=/app/lib",
"-DLIB_INSTALL_DIR=/app/lib",
"-DBUILD_TRANSLATIONS=NO",
"-DBUILD_TESTING=OFF"
]
},
{
"name": "libQuotient",
"buildsystem": "cmake-ninja",
"sources": [
{
"type": "git",
"url": "https://github.com/quotient-im/libQuotient.git",
"branch": "dev",
"disable-submodules": true
}
],
"config-opts": [
"-DBUILD_WITH_QT6=ON",
"-DQuotient_ENABLE_E2EE=ON",
"-DBUILD_TESTING=OFF"
]
},
{
"name": "cmark",
"buildsystem": "cmake-ninja",
"config-opts": [
"-DCMARK_TESTS=OFF",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INSTALL_PREFIX=/app"
],
"sources": [
{
"type": "git",
"url": "https://github.com/commonmark/cmark.git"
}
],
"builddir": true
},
{
"name": "kunifiedpush",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DENABLE_TESTING=OFF",
"-DKUNIFIEDPUSH_CLIENT_ONLY=ON"
],
"sources": [
{
"type": "archive",
"url": "https://download.kde.org/stable/release-service/25.08.3/src/kunifiedpush-25.08.3.tar.xz",
"sha256": "e8c924438d5359f0fa0930ab35111012076e3a0ff4e959d6929595571383320a",
"x-checker-data": {
"type": "anitya",
"project-id": 8763,
"stable-only": true,
"url-template": "https://download.kde.org/stable/release-service/$version/src/kunifiedpush-$version.tar.xz"
}
}
]
},
{
"name": "neochat",
"buildsystem": "cmake-ninja",
"config-opts": [
"-DBUILD_TESTING=OFF",
"-DNEOCHAT_FLATPAK=ON"
],
"sources": [
{
"type": "dir",
"path": "."
}
]
}
]
}

8
.gitignore vendored
View File

@@ -1,4 +1,4 @@
build
build*
.clang-format
.DS_Store
.kdev4/
@@ -7,3 +7,9 @@ compile_commands.json
.cache/
.vscode/
kate.project.ctags.*
*.user
.flatpak-builder/
.idea/
cmake-build-*
src/res.generated.qrc
.qmlls.ini

View File

@@ -2,6 +2,20 @@
# SPDX-License-Identifier: CC0-1.0
include:
- https://invent.kde.org/sysadmin/ci-tooling/raw/master/invent/ci-reuse.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/android.yml
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
- project: sysadmin/ci-utilities
file:
- /gitlab-templates/reuse-lint.yml
- /gitlab-templates/json-validation.yml
- /gitlab-templates/xml-lint.yml
- /gitlab-templates/yaml-lint.yml
- /gitlab-templates/android-qt6.yml
- /gitlab-templates/linux-qt6.yml
- /gitlab-templates/linux-qt6-next.yml
- /gitlab-templates/windows-qt6.yml
# - /gitlab-templates/freebsd-qt6.yml
- /gitlab-templates/flatpak.yml
- /gitlab-templates/snap-snapcraft-lxd.yml
- /gitlab-templates/craft-android-qt6-apks.yml
- /gitlab-templates/craft-appimage-qt6.yml
- /gitlab-templates/craft-windows-x86-64-qt6.yml
- /gitlab-templates/craft-windows-appx-qt6.yml

View File

@@ -1,25 +1,45 @@
# SPDX-FileCopyrightText: 2021 Tobias Fella <fella@posteo.de>
# SPDX-FileCopyrightText: 2021 Tobias Fella <tobias.fella@kde.org>
# SPDX-License-Identifier: BSD-2-Clause
Dependencies:
- 'on': ['@all']
'require':
'frameworks/extra-cmake-modules': '@stable'
'frameworks/kcoreaddons': '@stable'
'frameworks/kirigami': '@stable'
'frameworks/ki18n': '@stable'
'frameworks/kconfig': '@stable'
'frameworks/syntax-highlighting': '@stable'
'frameworks/kitemmodels': '@stable'
'frameworks/knotifications': '@stable'
'libraries/kquickimageeditor': '@stable'
- 'on': ['Windows', 'Linux', 'FreeBSD']
'require':
'frameworks/qqc2-desktop-style': '@stable'
'frameworks/kio': '@stable'
'frameworks/kwindowsystem': '@stable'
'frameworks/sonnet': '@stable'
'frameworks/kconfigwidgets': '@stable'
- 'on': ['Linux', 'FreeBSD']
'require':
'frameworks/kdbusaddons': '@stable'
- 'on': ['Linux', 'Android', 'FreeBSD', 'Windows']
'require':
'frameworks/extra-cmake-modules': '@latest-kf6'
'frameworks/kcoreaddons': '@latest-kf6'
'frameworks/kirigami': '@latest-kf6'
'frameworks/ki18n': '@latest-kf6'
'frameworks/kconfig': '@latest-kf6'
'frameworks/syntax-highlighting': '@latest-kf6'
'frameworks/kiconthemes': '@latest-kf6'
'frameworks/kitemmodels': '@latest-kf6'
'frameworks/kquickcharts': '@latest-kf6'
'frameworks/knotifications': '@latest-kf6'
'frameworks/kcolorscheme': '@latest-kf6'
'libraries/kquickimageeditor': '@latest-kf6'
'frameworks/sonnet': '@latest-kf6'
'frameworks/prison': '@latest-kf6'
'libraries/kirigami-addons': '@latest-kf6'
'third-party/libquotient': '@latest'
'third-party/qtkeychain': '@latest'
'third-party/cmark': '@latest'
'third-party/qcoro': '@latest'
- 'on': ['Windows', 'Linux', 'FreeBSD']
'require':
'frameworks/qqc2-desktop-style': '@latest-kf6'
'frameworks/kio': '@latest-kf6'
'frameworks/kwindowsystem': '@latest-kf6'
- 'on': ['Linux', 'FreeBSD']
'require':
'frameworks/kdbusaddons': '@latest-kf6'
'frameworks/purpose': '@latest-kf6'
'libraries/kunifiedpush': '@latest-kf6'
- 'on': ['Linux']
'require':
'sdk/selenium-webdriver-at-spi': '@latest-kf6'
Options:
per-test-timeout: 90
require-passing-tests-on: ['Linux', 'Android', 'FreeBSD', 'Windows']
run-qmllint: True
enable-lsan: True

View File

@@ -1,44 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: NeoChat
Upstream-Contact: Carl Schwan <carlschwan@kde.org>
Files: 128-logo.png icons/* logo.png org.kde.neochat.svg org.kde.neochat-symbolic.svg android/res/drawable/neochat.png
Copyright: 2020 Carson Black <uhhadd@gmail.com>
License: LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
Files: qtquickcontrols2.conf
Copyright: 2020 Tobias Fella <fella@posteo.de>
License: CC0-1.0
Files: android/res/drawable/splash.xml
Copyright: 2020 Tobias Fella <fella@posteo.de>
License: BSD-2-Clause
Files: */qmldir .gitignore
Copyright: None
License: CC0-1.0
Files: .gitlab/issue_templates/bug.md
Copyright: 2021 Carl Schwan <carlschwan@kde.org>
License: CC0-1.0
Files: res.qrc
Copyright: None
License: CC0-1.0
Files: cmake/Flatpak/99-noto-mono-color-emoji.conf
Copyright: 2021 Carl Schwan <carlschwan@kde.org>
License: BSD-2-Clause
Files: src/neochatconfig.kcfg
Copyright: 2020-2021 Carl Schwan <carlschwan@kde.org>
Copyright: 2020-2021 Tobias Fella <fella@posteo.de>
License: BSD-2-Clause
Files: neochat.notifyrc
Copyright: 2020 Tobias Fella <fella@posteo.de>
License: BSD-2-Clause
Files: imports/NeoChat/Component/confetti.png imports/NeoChat/Component/glowdot.png
Copyright: 2021 Alexey Andreyev <aa13q@ya.ru>
License: CC0-1.0

View File

@@ -1,69 +1,84 @@
# SPDX-FileCopyrightText: 2020-2021 Carl Schwan <carl@carlschwan.eu>
# SPDX-FileCopyrightText: 2020-2021 Nicolas Fella <nicolas.fella@gmx.de>
# SPDX-FileCopyrightText: 2020-2021 Tobias Fella <fella@posteo.de>
# SPDX-FileCopyrightText: 2020-2021 Tobias Fella <tobias.fella@kde.org>
# SPDX-FileCopyrightText: 2021 Adriaan de Groot <groot@kde.org>
# SPDX-License-Identifier: BSD-2-Clause
cmake_minimum_required(VERSION 3.16)
project(NeoChat)
set(PROJECT_VERSION "21.12")
# KDE Applications version, managed by release script.
set(RELEASE_SERVICE_VERSION_MAJOR "26")
set(RELEASE_SERVICE_VERSION_MINOR "03")
set(RELEASE_SERVICE_VERSION_MICRO "70")
set(RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
set(KF5_MIN_VERSION "5.88.0")
set(QT_MIN_VERSION "5.15.2")
project(NeoChat VERSION ${RELEASE_SERVICE_VERSION})
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(KF_MIN_VERSION "6.17")
set(QT_MIN_VERSION "6.9")
find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(KDE_COMPILERSETTINGS_LEVEL 5.84)
set(KDE_COMPILERSETTINGS_LEVEL 6.17)
include(FeatureSummary)
include(ECMSetupVersion)
include(KDEInstallDirs)
include(ECMQMLModules)
include(KDEClangFormat)
include(ECMFindQmlModule)
include(KDECMakeSettings)
include(ECMAddTests)
include(KDECompilerSettings NO_POLICY_SCOPE)
include(ECMAddAppIcon)
include(KDEGitCommitHooks)
include(ECMCheckOutboundLicense)
if(NEOCHAT_FLATPAK)
include(cmake/Flatpak.cmake)
include(ECMQtDeclareLoggingCategory)
include(ECMAddAndroidApk)
include(ECMQmlModule)
include(ECMDeprecationSettings)
include(GenerateExportHeader)
include(ECMGenerateHeaders)
if (NOT ANDROID)
include(KDEClangFormat)
endif()
# Fix a crash due to problems with quotient's event system. Can probably be removed once the reworked event system is in
cmake_policy(SET CMP0063 OLD)
set(QUOTIENT_FORCE_NAMESPACED_INCLUDES TRUE)
ecm_set_disabled_deprecation_versions(Qt 6.9.0 KF 6.17.0)
ecm_setup_version(${PROJECT_VERSION}
VARIABLE_PREFIX NEOCHAT
VERSION_HEADER ${CMAKE_CURRENT_BINARY_DIR}/neochat-version.h
)
find_package(Qt5 ${QT_MIN_VERSION} NO_MODULE COMPONENTS Core Quick Gui QuickControls2 Multimedia Svg)
set_package_properties(Qt5 PROPERTIES
find_package(Qt6 ${QT_MIN_VERSION} NO_MODULE COMPONENTS Core Quick Gui QuickControls2 Multimedia Svg TextToSpeech WebView)
set_package_properties(Qt6 PROPERTIES
TYPE REQUIRED
PURPOSE "Basic application components"
)
find_package(KF5 ${KF5_MIN_VERSION} COMPONENTS Kirigami2 I18n Notifications Config CoreAddons)
set_package_properties(KF5 PROPERTIES
if (QT_KNOWN_POLICY_QTP0004)
qt_policy(SET QTP0004 NEW)
endif ()
find_package(KF6 ${KF_MIN_VERSION} COMPONENTS Kirigami I18n Notifications Config CoreAddons Sonnet ItemModels ColorScheme IconThemes)
set_package_properties(KF6 PROPERTIES
TYPE REQUIRED
PURPOSE "Basic application components"
)
set_package_properties(KF5Kirigami2 PROPERTIES
set_package_properties(KF6Kirigami PROPERTIES
TYPE REQUIRED
PURPOSE "Kirigami application UI framework"
)
find_package(KF6KirigamiAddons 1.10.0 REQUIRED)
find_package(Qt5Keychain)
set_package_properties(Qt5Keychain PROPERTIES
TYPE REQUIRED
PURPOSE "Secure storage of account secrets"
)
if (UNIX AND NOT APPLE AND NOT ANDROID AND NOT NEOCHAT_FLATPAK AND NOT NEOCHAT_APPIMAGE)
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS Purpose)
endif ()
if(ANDROID)
find_package(OpenSSL)
@@ -72,22 +87,29 @@ if(ANDROID)
PURPOSE "Encrypted communications"
)
else()
find_package(Qt5 ${QT_MIN_VERSION} COMPONENTS Widgets)
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS QQC2DesktopStyle ConfigWidgets KIO WindowSystem Sonnet)
set_package_properties(KF5QQC2DesktopStyle PROPERTIES
find_package(Qt6 ${QT_MIN_VERSION} COMPONENTS Widgets)
find_package(KF6 ${KF_MIN_VERSION} REQUIRED COMPONENTS QQC2DesktopStyle KIO WindowSystem)
find_package(KF6SyntaxHighlighting ${KF_MIN_VERSION} REQUIRED)
set_package_properties(KF6QQC2DesktopStyle PROPERTIES
TYPE RUNTIME
)
ecm_find_qmlmodule(org.kde.syntaxhighlighting 1.0)
find_package(ICU 61.0 COMPONENTS uc)
set_package_properties(ICU PROPERTIES
TYPE REQUIRED
PURPOSE "Unicode library"
)
endif()
if (NOT ANDROID AND NOT WIN32 AND NOT APPLE)
find_package(KF5DBusAddons ${KF5_MIN_VERSION} REQUIRED)
if (NOT ANDROID AND NOT WIN32 AND NOT APPLE AND NOT HAIKU)
find_package(KF6DBusAddons ${KF_MIN_VERSION} REQUIRED)
endif()
find_package(Quotient 0.6)
set_package_properties(Quotient PROPERTIES
find_package(QuotientQt6 0.9.5)
set_package_properties(QuotientQt6 PROPERTIES
TYPE REQUIRED
DESCRIPTION "Qt wrapper arround Matrix API"
DESCRIPTION "Qt wrapper around Matrix API"
URL "https://github.com/quotient-im/libQuotient/"
PURPOSE "Talk with matrix server"
)
@@ -102,6 +124,9 @@ set_package_properties(cmark PROPERTIES
ecm_find_qmlmodule(org.kde.kquickimageeditor 1.0)
ecm_find_qmlmodule(org.kde.kitemmodels 1.0)
ecm_find_qmlmodule(org.kde.quickcharts 1.0)
ecm_find_qmlmodule(QtLocation)
ecm_find_qmlmodule(org.kde.prison)
find_package(KQuickImageEditor COMPONENTS)
set_package_properties(KQuickImageEditor PROPERTIES
@@ -111,32 +136,77 @@ set_package_properties(KQuickImageEditor PROPERTIES
PURPOSE "Add image editing capability to image attachments"
)
find_package(QCoro REQUIRED)
find_package(QCoro6 0.4 COMPONENTS Core Network REQUIRED)
qcoro_enable_coroutines()
if(ANDROID)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/android/version.gradle.in ${CMAKE_BINARY_DIR}/version.gradle)
find_package(KF6DocTools ${KF_MIN_VERSION})
set_package_properties(KF6DocTools PROPERTIES DESCRIPTION
"Tools to generate documentation"
TYPE OPTIONAL
)
option(WITH_UNIFIEDPUSH "Build with KUnifiedPush support" ON)
if (ANDROID OR APPLE OR WIN32 OR HAIKU)
set(WITH_UNIFIEDPUSH OFF)
endif()
if (WITH_UNIFIEDPUSH)
find_package(KUnifiedPush)
set_package_properties(KUnifiedPush PROPERTIES
TYPE REQUIRED
PURPOSE "Push notification support"
URL "https://invent.kde.org/libraries/kunifiedpush"
)
endif()
if(ANDROID)
find_package(Sqlite3)
set(BUILD_TESTING FALSE)
endif()
ki18n_install(po)
install(FILES org.kde.neochat.desktop DESTINATION ${KDE_INSTALL_APPDIR})
install(FILES org.kde.neochat.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
install(FILES org.kde.neochat.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps)
install(FILES org.kde.neochat-symbolic.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/16x16/apps RENAME org.kde.neochat.svg)
install(FILES org.kde.neochat-symbolic.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/16x16@2/apps RENAME org.kde.neochat.svg)
install(FILES org.kde.neochat-symbolic.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/16x16@3/apps RENAME org.kde.neochat.svg)
install(FILES org.kde.neochat-symbolic.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/symbolic/apps)
install(FILES neochat.notifyrc DESTINATION ${KNOTIFYRC_INSTALL_DIR})
install(FILES org.kde.neochat.tray.svg DESTINATION ${KDE_INSTALL_FULL_ICONDIR}/hicolor/scalable/apps)
add_definitions(-DQT_NO_FOREACH)
add_subdirectory(src)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
if (BUILD_TESTING)
find_package(Qt6 ${QT_MIN_VERSION} NO_MODULE COMPONENTS Test HttpServer QuickTest)
add_subdirectory(autotests)
# add_subdirectory(appiumtests)
if (NOT ANDROID)
add_subdirectory(memorytests)
endif()
endif()
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES src/*.cpp src/*.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
if(KF6DocTools_FOUND)
kdoctools_install(po)
add_subdirectory(doc)
endif()
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
if (NOT ANDROID)
file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES src/*.cpp src/*.h)
kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES})
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
endif()
file(GLOB_RECURSE ALL_SOURCE_FILES *.cpp *.h *.qml)
# CI installs dependency headers to _install and _build, which break the reuse check
# Fixes the test by excluding this directory
list(FILTER ALL_SOURCE_FILES EXCLUDE REGEX [[_(install|build)/.*]])
ecm_check_outbound_license(LICENSES GPL-3.0-only FILES ${ALL_SOURCE_FILES})
ecm_qt_install_logging_categories(
EXPORT NEOCHAT
FILE neochat.categories
DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
)

170
LICENSES/CC-BY-SA-4.0.txt Normal file
View File

@@ -0,0 +1,170 @@
Creative Commons Attribution-ShareAlike 4.0 International
Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors.
Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensors permission is not necessary for any reasonfor example, because of any applicable exception or limitation to copyrightthen that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public.
Creative Commons Attribution-ShareAlike 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
Section 1 Definitions.
a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.
h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
k. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
l. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
m. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
Section 2 Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
A. reproduce and Share the Licensed Material, in whole or in part; and
B. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
3. Term. The term of this Public License is specified in Section 6(a).
4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
5. Downstream recipients.
A. Offer from the Licensor Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
B. Additional offer from the Licensor Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapters License You apply.
C. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
Section 3 License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified form), You must:
A. retain the following if it is supplied by the Licensor with the Licensed Material:
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
b. ShareAlike.In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
1. The Adapters License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
Section 4 Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
Section 5 Disclaimer of Warranties and Limitation of Liability.
a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
Section 6 Term and Termination.
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.
c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
Section 7 Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
Section 8 Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
Creative Commons may be contacted at creativecommons.org.

175
LICENSES/LGPL-2.1-only.txt Normal file
View File

@@ -0,0 +1,175 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.]
Preamble
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
one line to give the library's name and an idea of what it does.
Copyright (C) year name of author
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in
the library `Frob' (a library for tweaking knobs) written
by James Random Hacker.
signature of Ty Coon, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

0
LICENSES/MIT.txt Executable file → Normal file
View File

106
README.md
View File

@@ -1,69 +1,89 @@
<!--
SPDX-FileCopyrightText: 2020-2021 Carl Schwan <carlschwan@kde.org>
SPDX-FileCopyrightText: 2020-2021 Tobias Fella <fella@posteo.de>
SPDX-FileCopyrightText: 2020-2024 Tobias Fella <tobias.fella@kde.org>
SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
SPDX-License-Identifier: CC0-1.0
-->
# NeoChat
NeoChat is a client for Matrix, the decentralized communication protocol for instant
messaging. It is a fork of Spectral, using KDE frameworks, most notably Kirigami,
KConfig and KI18n.
A Qt/QML based Matrix client.
<a href='https://matrix.org'><img src='https://matrix.org/docs/legacy/made-for-matrix.png' alt='Made for Matrix' height=64 target=_blank /></a>
<a href='https://flathub.org/apps/details/org.kde.neochat'><img width='190px' alt='Download on Flathub' src='https://flathub.org/assets/badges/flathub-badge-i-en.png'/></a>
<a href='https://snapcraft.io/neochat'><img width='190px' alt='Download on the Snap Store' src='https://apps.kde.org/store_badges/snapstore/en.svg'/></a>
## Introduction
## Get it
NeoChat is a client for [Matrix](https://matrix.org), the decentralized communication protocol for instant
messaging.
A stable release [is available](https://apps.kde.org/en/neochat) for download for Linux distributions.
NeoChat is based on KDE frameworks and as [libQuotient](https://github.com/quotient-im/libQuotient), a
Qt-based SDK for the [Matrix Protocol](https://spec.matrix.org/).
Along with the stable release, a Flatpak version is available for the nightly
version:
```
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --if-not-exists kdeapps --from https://distribute.kde.org/kdeapps.flatpakrepo
flatpak install kdeapps org.kde.neochat
```
A nightly build is also available for Android in the [KDE nightly F-Droid repo](https://community.kde.org/Android/FDroid)
and can also directly be downloaded from the [binary factory](https://binary-factory.kde.org/view/Android/job/NeoChat_Nightly_android-arm64/).
Nightly builds for [Windows](https://binary-factory.kde.org/job/NeoChat_Nightly_win64/), [MacOS](https://binary-factory.kde.org/job/NeoChat_Nightly_macos/) and [AppImages](https://binary-factory.kde.org/job/NeoChat_Nightly_appimage/) can also be downloaded from the [binary factory](https://binary-factory.kde.org/search/?q=neochat).
![Timeline](https://invent.kde.org/websites/product-screenshots/-/raw/master/neochat/application.png)
![Timeline](https://cdn.kde.org/screenshots/neochat/application.png)
## Features
* Sending messages
* Sending files from clipboard and filesystem
* Reply to message (right-click on a message to access menu)
* Start a private chat (but not encrypted)
* Show notifications, for the moment there is only a global switch
to disable it. We plan to implement the configuration part of the
specification soon.
* Autocompletion of usernames in chat
* Emoji picker
* Basic room setting page
* Send and accept invitations
* /rainbow <message> (very important)
* /me <message>
NeoChat aims to be a fully featured application for the Matrix specification. As such, most parts of the current specification are supported, with the notable exceptions
of VoIP, threads, and some aspects of End-to-End Encryption. There are a few other smaller omissions due to the Matrix spec constantly
evolving, but the aim remains to provide eventual support for the entire spec.
NeoChat is still missing a few features to become a full-featured
Matrix client (most notably encryption support and video chat support).
We welcome contributions in this direction.
## Get it
Details where to find stable releases for NeoChat can be found on its [homepage](https://apps.kde.org/neochat).
Nightly builds for Linux and Windows can be downloaded from [cdn.kde.org](https://cdn.kde.org/ci-builds/network/neochat/).
Nightly builds for Android are available from [KDE's nightly F-Droid repository](https://community.kde.org/Android/F-Droid).
Nightly Flatpaks are available from [KDE's nightly Flatpak repository](https://userbase.kde.org/Tutorials/Flatpak).
## Building NeoChat
The best way to build KDE apps during development is to use `kdesrc-build`. The full instructions for this can be found on
the KDE community website's get involved section under [development](https://community.kde.org/Get_Involved/development). This
is primarily aimed at Linux development.
For Windows and Android, [Craft](https://invent.kde.org/packaging/craft) is the primary choice. There are guides for setting up
development environments for [Windows](https://community.kde.org/Get_Involved/development/Windows) and [Android](https://develop.kde.org/docs/packaging/android/building_applications/).
## Running
Start the executable in your preferred way either from the build directory or from the installed location.
## Tests
Tests are in the repository under [autotests](autotests) and [appiumtests](appiumtests).
The project has CI setup to test new commits to the repository. All tests are expected to pass for a merge request to
be complete.
## Current build status
![coverage](https://invent.kde.org/network/neochat/badges/master/pipeline.svg)
Currently, the number of tests is limited but growing. If anyone wants to help improve this, those
contributions would be especially welcome.
## Contributing
As is the case throughout the KDE ecosystem, contributions are welcome from all. The code base is managed in the
[NeoChat repository](https://invent.kde.org/network/neochat) of the KDE Gitlab instance.
- [Code of Conduct](https://kde.org/code-of-conduct)
- [Report a Bug](https://bugs.kde.org/enter_bug.cgi?format=guided&product=neochat)
- [Feature Request](https://community.kde.org/Infrastructure/GitLab#Submitting_a_merge_request)
- [Create a Merge Request](https://community.kde.org/Infrastructure/GitLab#Submitting_a_merge_request)
- [Translation](https://community.kde.org/Get_Involved/translation)
## Contact
You can reach the maintainers at #neochat:kde.org, if you are already on Matrix.
Development happens in http://invent.kde.org/network/neochat (not in GitHub).
The best place to reach the maintainers is on the KDE Matrix instance in the NeoChat channel, [#neochat:kde.org](https://go.kde.org/matrix/#/#neochat:kde.org). See [Matrix](https://community.kde.org/Matrix) for more details.
## Acknowledgement
This program utilizes [libQuotient](https://github.com/quotient-im/libQuotient/)
library and some C++ models from [Quaternion](https://github.com/quotient-im/Quaternion/).
NeoChat uses [libQuotient](https://github.com/quotient-im/libQuotient/) as its Matrix SDK.
This program is a fork of [Spectral](https://gitlab.com/spectral-im/spectral/).
NeoChat is a fork of [Spectral](https://gitlab.com/spectral-im/spectral/).
## License

96
REUSE.toml Normal file
View File

@@ -0,0 +1,96 @@
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: CC0-1.0
version = 1
SPDX-PackageName = "NeoChat"
SPDX-PackageSupplier = "Carl Schwan <carlschwan@kde.org>"
[[annotations]]
path = ["128-logo.png", "icons/**", "logo.png", "org.kde.neochat.svg", "org.kde.neochat.tray.svg", "android/res/drawable/neochat.png", "android/neochat-playstore.png"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2020 Carson Black <uhhadd@gmail.com>"
SPDX-License-Identifier = "LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL"
[[annotations]]
path = "android/res/drawable/splash.xml"
precedence = "aggregate"
SPDX-FileCopyrightText = "2020 Tobias Fella <tobias.fella@kde.org>"
SPDX-License-Identifier = "BSD-2-Clause"
[[annotations]]
path = ".gitignore"
precedence = "aggregate"
SPDX-FileCopyrightText = "None"
SPDX-License-Identifier = "CC0-1.0"
[[annotations]]
path = ".gitlab/issue_templates/bug.md"
precedence = "aggregate"
SPDX-FileCopyrightText = "2021 Carl Schwan <carlschwan@kde.org>"
SPDX-License-Identifier = "CC0-1.0"
[[annotations]]
path = ["src/res.qrc", "src/res_android.qrc", "src/res_desktop.qrc"]
precedence = "aggregate"
SPDX-FileCopyrightText = "None"
SPDX-License-Identifier = "CC0-1.0"
[[annotations]]
path = "cmake/Flatpak/99-noto-mono-color-emoji.conf"
precedence = "aggregate"
SPDX-FileCopyrightText = "2021 Carl Schwan <carlschwan@kde.org>"
SPDX-License-Identifier = "BSD-2-Clause"
[[annotations]]
path = "src/app/neochatconfig.kcfg"
precedence = "aggregate"
SPDX-FileCopyrightText = "2020-2021 Carl Schwan <carlschwan@kde.org>, Tobias Fella <tobias.fella@kde.org>"
SPDX-License-Identifier = "BSD-2-Clause"
[[annotations]]
path = "src/app/neochat.notifyrc"
precedence = "aggregate"
SPDX-FileCopyrightText = "2020 Tobias Fella <tobias.fella@kde.org>"
SPDX-License-Identifier = "BSD-2-Clause"
[[annotations]]
path = ["src/qml/confetti.png", "src/qml/glowdot.png"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2021 Alexey Andreyev <aa13q@ya.ru>"
SPDX-License-Identifier = "CC0-1.0"
[[annotations]]
path = ".flatpak-manifest.json"
precedence = "aggregate"
SPDX-FileCopyrightText = "2020-2022 Tobias Fella <tobias.fella@kde.org>"
SPDX-License-Identifier = "BSD-2-Clause"
[[annotations]]
path = "autotests/data/**"
precedence = "aggregate"
SPDX-FileCopyrightText = "none"
SPDX-License-Identifier = "CC0-1.0"
[[annotations]]
path = "appiumtests/data/**"
precedence = "aggregate"
SPDX-FileCopyrightText = "2023 Tobias Fella <tobias.fella@kde.org>"
SPDX-License-Identifier = "CC0-1.0"
[[annotations]]
path = "src/purpose/purposeplugin.json"
precedence = "aggregate"
SPDX-FileCopyrightText = "2023 Tobias Fella <tobias.fella@kde.org>"
SPDX-License-Identifier = "BSD-2-Clause"
[[annotations]]
path = "memorytests/memtest-sync.json"
precedence = "aggregate"
SPDX-FileCopyrightText = "2024 James Graham <james.h.graham@protonmail.com>"
SPDX-License-Identifier = "BSD-2-Clause"
[[annotations]]
path = ".contextProperties.ini"
precedence = "aggregate"
SPDX-FileCopyrightText = "2025 Tobias Fella <tobias.fella@kde.org>"
SPDX-License-Identifier = "BSD-2-Clause"

View File

@@ -9,20 +9,20 @@
android:versionName="${versionName}"
android:versionCode="${versionCode}"
android:installLocation="auto">
<application android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="NeoChat" android:icon="@drawable/neochat">
<application android:name="org.qtproject.qt.android.bindings.QtApplication" android:label="NeoChat" android:icon="@drawable/neochat" android:usesCleartextTraffic="true">
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation"
android:name="org.qtproject.qt5.android.bindings.QtActivity"
android:name="org.qtproject.qt.android.bindings.QtActivity"
android:label="NeoChat"
android:windowSoftInputMode="adjustResize"
android:launchMode="singleTop">
android:launchMode="singleTop"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<meta-data android:name="android.app.lib_name" android:value="neochat"/>
<meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
<meta-data android:name="android.app.lib_name" android:value="neochat-app"/>
<meta-data android:name="android.app.repository" android:value="default"/>
<meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/>
<meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/>
@@ -38,8 +38,6 @@
<meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/>
<meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/>
<!-- Messages maps -->
<meta-data android:value="@string/ministro_not_found_msg" android:name="android.app.ministro_not_found_msg"/>
<meta-data android:value="@string/ministro_needed_msg" android:name="android.app.ministro_needed_msg"/>
<meta-data android:value="@string/fatal_error_msg" android:name="android.app.fatal_error_msg"/>
<!-- Splash screen -->
@@ -57,5 +55,6 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/> <!-- for Android >= 33 -->
</manifest>

View File

@@ -12,7 +12,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.4'
classpath 'com.android.tools.build:gradle:8.6.0'
}
}
@@ -23,8 +23,7 @@ repositories {
apply plugin: 'com.android.application'
apply from: '../version.gradle'
def timestamp = (int)(new Date().getTime()/1000)
apply from: '../ecm-version.gradle'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
@@ -35,7 +34,7 @@ android {
* The following variables:
* - androidBuildToolsVersion,
* - androidCompileSdkVersion
* - qt5AndroidDir - holds the path to qt android files
* - qtAndroidDir - holds the path to qt android files
* needed to build any Qt application
* on Android.
*
@@ -44,16 +43,20 @@ android {
* Changing them manually might break the compilation!
*******************************************************/
compileSdkVersion androidCompileSdkVersion.toInteger()
compileSdkVersion androidCompileSdkVersion
buildToolsVersion androidBuildToolsVersion
ndkVersion androidNdkVersion
// Extract native libraries from the APK
packagingOptions.jniLibs.useLegacyPackaging true
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = [qt5AndroidDir + '/src', 'src', 'java']
aidl.srcDirs = [qt5AndroidDir + '/src', 'src', 'aidl']
res.srcDirs = [qt5AndroidDir + '/res', 'res']
java.srcDirs = [qtAndroidDir + '/src', 'src', 'java']
aidl.srcDirs = [qtAndroidDir + '/src', 'src', 'aidl']
res.srcDirs = [qtAndroidDir + '/res', 'res']
resources.srcDirs = ['src']
renderscript.srcDirs = ['src']
assets.srcDirs = ['assets']
@@ -73,7 +76,11 @@ android {
defaultConfig {
minSdkVersion qtMinSdkVersion
targetSdkVersion qtTargetSdkVersion
manifestPlaceholders = [versionName: projectVersionFull, versionCode: timestamp]
applicationId "org.kde.neochat"
namespace "org.kde.neochat"
versionCode ecmVersionCode
versionName ecmVersionName
manifestPlaceholders = [versionName: ecmVersionName, versionCode: ecmVersionCode]
}
packagingOptions {
@@ -84,6 +91,7 @@ android {
exclude 'lib/*/*_imageformats_qtga_*'
exclude 'lib/*/*_imageformats_qtiff_*'
exclude 'lib/*/*_qmltooling_*'
exclude 'lib/*/*_multimedia_ffmpeg*' // temporary qt6 android fix
}
aaptOptions {

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -1,6 +0,0 @@
// SPDX-FileCopyrightText: 2021 Volker Krause <vkrause@kde.org>
// SPDX-License-Identifier: BSD-3-Clause
ext {
projectVersionFull = "@NEOCHAT_VERSION@"
}

View File

@@ -0,0 +1,28 @@
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-FileCopyrightText: 2022 Harald Sitter <sitter@kde.org>
if(NOT BUILD_TESTING OR NOT CMAKE_SYSTEM_NAME MATCHES "Linux")
return()
endif()
find_package(SeleniumWebDriverATSPI)
set_package_properties(SeleniumWebDriverATSPI PROPERTIES
DESCRIPTION "Server component for selenium tests using Linux accessibility infrastructure"
PURPOSE "Needed for GUI tests"
URL "https://invent.kde.org/sdk/selenium-webdriver-at-spi"
TYPE OPTIONAL
)
if(NOT SeleniumWebDriverATSPI_FOUND)
return()
endif()
add_test(
NAME logintest
COMMAND selenium-webdriver-at-spi-run ${CMAKE_CURRENT_SOURCE_DIR}/logintest.py
)
add_test(
NAME openuserdetailstest
COMMAND selenium-webdriver-at-spi-run ${CMAKE_CURRENT_SOURCE_DIR}/openuserdetailstest.py
)

56
appiumtests/createroomtest.py Executable file
View File

@@ -0,0 +1,56 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2024 Tobias Fella <tobias.fella@kde.org>
import os
import subprocess
import sys
import unittest
import time
from appium import webdriver
from appium.options.common.base import AppiumOptions
from appium.webdriver.common.appiumby import AppiumBy
class CreateRoomTest(unittest.TestCase):
mockServerProcess: subprocess.Popen
@classmethod
def setUpClass(cls):
cls.mockServerProcess = subprocess.Popen([sys.executable, os.path.join(os.path.dirname(__file__), "login-server.py")])
options = AppiumOptions()
options.set_capability("app", "neochat --ignore-ssl-errors --test")
cls.driver = webdriver.Remote(command_executor='http://127.0.0.1:4723', options=options)
def setUp(self):
pass
def tearDown(self):
if not self._outcome.result.wasSuccessful():
self.driver.get_screenshot_as_file("failed_test_shot_{}.png".format(self.id()))
@classmethod
def tearDownClass(self):
self.mockServerProcess.terminate()
self.driver.quit()
def test_create_room(self):
self.driver.find_element(by=AppiumBy.NAME, value="@user:localhost:1234").click()
self.driver.find_element(by=AppiumBy.NAME, value="Show Menu").click()
self.driver.find_element(by=AppiumBy.NAME, value="Create a Room").click()
self.driver.find_element(by=AppiumBy.NAME, value="Name:").send_keys("Super awesome room name")#
time.sleep(0.1) # without this, the second half of the text is sent to the topic field?!
self.driver.find_element(by=AppiumBy.NAME, value="Topic:").send_keys("There are not enough raccoons here")
time.sleep(0.1)
self.driver.find_element(by=AppiumBy.NAME, value="Create Room").click()
time.sleep(0.1)
self.driver.find_element(by=AppiumBy.NAME, value="Super awesome room name").click()
self.driver.find_element(by=AppiumBy.NAME, value="Show Room Information").click()
self.driver.find_element(by=AppiumBy.NAME, value="There are not enough raccoons here")
if __name__ == '__main__':
unittest.main()

View File

@@ -0,0 +1,78 @@
{
"next_batch": "batch1234",
"rooms": {
"join": {
"!newroom123321:localhost:1234": {
"state": {
"events": [
{
"type": "m.room.member",
"state_key": "@user:localhost:1234",
"sender": "@user:localhost:1234",
"origin_server_ts": 1432735824653,
"event_id": "$event_id_1234_0:localhost:1234",
"room_id": "!newroom123321:localhost:1234",
"content": {
"avatar_url": "",
"displayname": "A Display Name",
"membership": "join",
"reason": "Nothing"
},
"unsigned": {
"age": 1234
}
},
{
"type": "m.room.name",
"state_key": "",
"sender": "@user:localhost:1234",
"origin_server_ts": 1432735824653,
"event_id": "$event_id_1234_1:localhost:1234",
"room_id": "!newroom123321:localhost:1234",
"content": {
"name": "Super awesome room name"
},
"unsigned": {
"age": 1234
}
},
{
"type": "m.room.topic",
"state_key": "",
"sender": "@user:localhost:1234",
"origin_server_ts": 1432735824653,
"event_id": "$event_id_1234_2:localhost:1234",
"room_id": "!newroom123321:localhost:1234",
"content": {
"topic": "There are not enough raccoons here"
},
"unsigned": {
"age": 1234
}
}
]
},
"timeline": {
"events": [
{
"type": "m.room.message",
"sender": "@user:localhost:1234",
"origin_server_ts": 1432735824653,
"event_id": "$event_id_1234_1:localhost:1234",
"room_id": "!newroom123321:localhost:1234",
"content": {
"body": "This is a message",
"format": "org.matrix.custom.html",
"formatted_body": "<a href=\"https://matrix.to/#/@user:localhost:1234\">User</a>:",
"msgtype": "m.text"
},
"unsigned": {
"age": 1234
}
}
]
}
}
}
}
}

View File

@@ -0,0 +1,3 @@
{
"next_batch": "batch1234"
}

View File

@@ -0,0 +1,90 @@
{
"next_batch": "batch1234",
"rooms": {
"join": {
"!room_id_1234:localhost:1234": {
"state": {
"events": [
{
"content": {
"m.federate": true,
"predecessor": {
"event_id": "$something:example.org",
"room_id": "!oldroom:example.org"
},
"room_version": "11"
},
"event_id": "$143273582443PhrSn:example.org",
"origin_server_ts": 1432735824653,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"state_key": "",
"type": "m.room.create",
"unsigned": {
"age": 1234,
"membership": "join"
}
},
{
"type": "m.room.member",
"state_key": "@user:localhost:1234",
"sender": "@user:localhost:1234",
"origin_server_ts": 1432735824653,
"event_id": "$event_id_1234_0:localhost:1234",
"room_id": "!room_id_1234:localhost:1234",
"content": {
"avatar_url": "",
"displayname": "A Display Name",
"membership": "join",
"reason": "Nothing"
},
"unsigned": {
"age": 1234
}
}
]
},
"timeline": {
"events": [
{
"content": {
"m.federate": true,
"predecessor": {
"event_id": "$something:example.org",
"room_id": "!oldroom:example.org"
},
"room_version": "11"
},
"event_id": "$143273582443PhrSn:example.org",
"origin_server_ts": 1432735824653,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"state_key": "",
"type": "m.room.create",
"unsigned": {
"age": 1234,
"membership": "join"
}
},
{
"type": "m.room.message",
"sender": "@user:localhost:1234",
"origin_server_ts": 1432735824653,
"event_id": "$event_id_1234_1:localhost:1234",
"room_id": "!room_id_1234:localhost:1234",
"content": {
"body": "This is a message",
"format": "org.matrix.custom.html",
"formatted_body": "<a href=\"https://matrix.to/#/@user:localhost:1234\">User</a>:",
"msgtype": "m.text"
},
"unsigned": {
"age": 1234
}
}
]
}
}
}
}
}

View File

@@ -0,0 +1,98 @@
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2023 Tobias Fella <tobias.fella@kde.org>
import json
from flask import Flask, request, abort
import os
app = Flask(__name__)
next_sync_payload = ""
@app.route("/_matrix/client/v3/login", methods=["GET"])
def login_get():
result = dict()
result["flows"] = [dict()]
result["flows"][0]["type"] = "m.login.password"
return result
@app.route("/_matrix/client/v3/account/whoami", methods=["GET"])
def whoami():
result = dict()
result["device_id"] = "device_id_1234"
result["user_id"] = "@user:localhost:1234"
return result
@app.route("/_matrix/client/v3/login", methods=["POST"])
def login_post():
data = request.get_json()
if data["identifier"]["user"] != "user" or data["password"] != "1234":
abort(403)
print(data)
result = dict()
result["access_token"] = "token_login"
result["device_id"] = "device_1234"
result["user_id"] = "@user:localhost:1234"
return result
def load_json(name):
parts = __file__.split("/")
parts.pop()
datadir = "/".join(parts)
return json.loads(open(f"{datadir}/data/{name}.json").read())
@app.route("/_matrix/client/r0/sync")
def sync():
global next_sync_payload
result = dict()
if len(next_sync_payload) > 0:
result = load_json(next_sync_payload)
next_sync_payload = ""
else:
result = load_json("sync_response_no_rooms") if ("login" in request.headers.get("Authorization")) else load_json("sync_response_rooms")
return result
@app.route("/.well-known/matrix/client")
def well_known():
reply = dict()
reply["m.homeserver"] = dict()
reply["m.homeserver"]["base_url"] = "https://localhost:1234"
return reply
@app.route("/_matrix/client/v3/profile/<id>")
def profile(id):
reply = dict()
reply["avatar_url"] = "mxc://localhost:1234/asdf1234"
reply["displayname"] = "User123"
return reply
@app.route("/_matrix/client/v3/keys/upload", methods=["POST"])
def upload_keys():
reply = dict()
return reply
@app.route("/_matrix/client/v3/createRoom", methods=["POST"])
def create_room():
global next_sync_payload
data = request.get_json()
if data["name"] != "Super awesome room name" or data["topic"] != "There are not enough raccoons here":
return dict(), 400
response = dict()
response["room_id"] = "!newroom123321:localhost:1234"
next_sync_payload = "sync_response_new_room"
return response
@app.route("/_matrix/client/v3/publicRooms", methods=["POST"])
def public_rooms():
if request.get_json()["filter"]["generic_search_term"] == "forbidden":
data = dict()
data["errcode"] = "M_FORBIDDEN"
data["error"] = "You are not allowed to search for this. Go to https://wikipedia.org for more information"
return data, 403
return dict()
if __name__ == "__main__":
app.run(ssl_context='adhoc', port=1234)

51
appiumtests/logintest.py Executable file
View File

@@ -0,0 +1,51 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021-2022 Harald Sitter <sitter@kde.org>
# SPDX-FileCopyrightText: 2023 Tobias Fella <tobias.fella@kde.org>
import os
import subprocess
import sys
import unittest
from appium import webdriver
from appium.options.common.base import AppiumOptions
from appium.webdriver.common.appiumby import AppiumBy
class LoginTest(unittest.TestCase):
mockServerProcess: subprocess.Popen
@classmethod
def setUpClass(cls):
options = AppiumOptions()
options.set_capability("app", "neochat --ignore-ssl-errors")
cls.driver = webdriver.Remote(command_executor='http://127.0.0.1:4723', options=options)
cls.mockServerProcess = subprocess.Popen([sys.executable, os.path.join(os.path.dirname(__file__), "login-server.py")])
def setUp(self):
pass
def tearDown(self):
if not self._outcome.result.wasSuccessful():
self.driver.get_screenshot_as_file("failed_test_shot_{}.png".format(self.id()))
@classmethod
def tearDownClass(self):
self.mockServerProcess.terminate()
self.driver.quit()
def test_login(self):
self.driver.find_element(by=AppiumBy.NAME, value="Login").click()
self.driver.find_element(by=AppiumBy.NAME, value="Matrix ID").send_keys("@user:localhost:1234")
self.driver.find_element(by=AppiumBy.NAME, value="Continue").click()
self.driver.find_element(by=AppiumBy.NAME, value="Password").send_keys("1234")
self.driver.find_element(by=AppiumBy.NAME, value="Login").click()
self.driver.find_element(by=AppiumBy.NAME, value="Join some rooms to get started").click()
if __name__ == '__main__':
unittest.main()

View File

@@ -0,0 +1,52 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021-2022 Harald Sitter <sitter@kde.org>
# SPDX-FileCopyrightText: 2023 Tobias Fella <tobias.fella@kde.org>
import os
import subprocess
import sys
import unittest
from appium import webdriver
from appium.options.common.base import AppiumOptions
from appium.webdriver.common.appiumby import AppiumBy
class OpenUserDetailsTest(unittest.TestCase):
mockServerProcess: subprocess.Popen
@classmethod
def setUpClass(cls):
cls.mockServerProcess = subprocess.Popen([sys.executable, os.path.join(os.path.dirname(__file__), "login-server.py")])
options = AppiumOptions()
options.set_capability("app", "neochat --ignore-ssl-errors --test")
cls.driver = webdriver.Remote(command_executor='http://127.0.0.1:4723', options=options)
def setUp(self):
pass
def tearDown(self):
if not self._outcome.result.wasSuccessful():
self.driver.get_screenshot_as_file("failed_test_shot_{}.png".format(self.id()))
@classmethod
def tearDownClass(self):
self.mockServerProcess.terminate()
self.driver.quit()
def test_open_sheet(self):
self.driver.find_element(by=AppiumBy.NAME, value="@user:localhost:1234").click()
try:
self.driver.find_element(by=AppiumBy.NAME, value="Expand Normal").click()
except:
pass
self.driver.find_element(by=AppiumBy.NAME, value="Empty room (!room_id_1234:localhost:1234)").click()
self.driver.find_element(by=AppiumBy.NAME, value="A Display Name").click()
self.driver.find_element(by=AppiumBy.NAME, value="Account Details")
if __name__ == '__main__':
unittest.main()

148
autotests/CMakeLists.txt Normal file
View File

@@ -0,0 +1,148 @@
# SPDX-FileCopyrightText: 2022 Carl Schwan <carl@carlschwan.eu>
# SPDX-License-Identifier: BSD-2-Clause
enable_testing()
add_library(neochat_server STATIC server.cpp)
target_link_libraries(neochat_server PUBLIC Qt::HttpServer QuotientQt6)
add_definitions(-DDATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/data" )
ecm_add_test(
neochatroomtest.cpp
LINK_LIBRARIES neochat Qt::Test Qt::HttpServer neochat_server
TEST_NAME neochatroomtest
)
ecm_add_test(
texthandlertest.cpp
LINK_LIBRARIES neochat Qt::Test
TEST_NAME texthandlertest
)
ecm_add_test(
delegatesizehelpertest.cpp
LINK_LIBRARIES neochat Qt::Test
TEST_NAME delegatesizehelpertest
)
ecm_add_test(
mediasizehelpertest.cpp
LINK_LIBRARIES neochat Qt::Test
TEST_NAME mediasizehelpertest
)
ecm_add_test(
eventhandlertest.cpp
LINK_LIBRARIES neochat Qt::Test
TEST_NAME eventhandlertest
)
ecm_add_test(
chatbarcachetest.cpp
LINK_LIBRARIES neochat Qt::Test Qt::HttpServer neochat_server
TEST_NAME chatbarcachetest
)
ecm_add_test(
timelinemessagemodeltest.cpp
LINK_LIBRARIES neochat Qt::Test
TEST_NAME timelinemessagemodeltest
)
ecm_add_test(
windowcontrollertest.cpp
LINK_LIBRARIES neochat Qt::Test
TEST_NAME windowcontrollertest
)
ecm_add_test(
pollhandlertest.cpp
LINK_LIBRARIES neochat Qt::Test
TEST_NAME pollhandlertest
)
ecm_add_test(
reactionmodeltest.cpp
LINK_LIBRARIES neochat Qt::Test
TEST_NAME reactionmodeltest
)
ecm_add_test(
linkpreviewertest.cpp
LINK_LIBRARIES neochat Qt::Test
TEST_NAME linkpreviewertest
)
ecm_add_test(
messagecontentmodeltest.cpp
LINK_LIBRARIES neochat Qt::Test
TEST_NAME messagecontentmodeltest
)
ecm_add_test(
actionstest.cpp
LINK_LIBRARIES neochat Qt::Test neochat_server
TEST_NAME actionstest
)
ecm_add_test(
servernoticestest.cpp
LINK_LIBRARIES neochat Qt::Test neochat_server
TEST_NAME servernoticestest
)
ecm_add_test(
roommanagertest.cpp
LINK_LIBRARIES neochat Qt::Test neochat_server
TEST_NAME roommanagertest
)
ecm_add_test(
modeltest.cpp
LINK_LIBRARIES neochat Qt::Test neochat_server Devtools
TEST_NAME modeltest
)
ecm_add_test(
blockcachetest.cpp
LINK_LIBRARIES neochat Qt::Test
TEST_NAME blockcachetest
)
macro(add_qml_tests)
if (WIN32)
set(_extra_args -platform offscreen)
endif()
foreach(test ${ARGV})
add_test(NAME ${test}
COMMAND qmltest
${_extra_args}
-input ${test}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)
endforeach()
endmacro()
add_executable(qmltest qmltest.cpp
chatkeyhelpertesthelper.h
chatmarkdownhelpertestwrapper.h
chattextitemhelpertesthelper.h
)
qt_add_qml_module(qmltest URI NeoChatTestUtils)
target_link_libraries(qmltest
PRIVATE
Qt6::Qml
Qt6::QuickTest
LibNeoChat
LibNeoChatplugin
)
add_qml_tests(
chattextitemhelpertest.qml
chatmarkdownhelpertest.qml
chatkeyhelpertest.qml
)

153
autotests/actionstest.cpp Normal file
View File

@@ -0,0 +1,153 @@
// SPDX-FileCopyrightText: 2024 Tobias Fella <tobias.fella@kde.org>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QObject>
#include <QTest>
#include <QSignalSpy>
#include <QVariantList>
#include "accountmanager.h"
#include "blockcache.h"
#include "chatbarcache.h"
#include "enums/messagecomponenttype.h"
#include "models/actionsmodel.h"
#include "server.h"
#include "testutils.h"
using namespace Quotient;
//TODO: rainbow, rainbowme, plain, spoiler, me, join, knock, j, part, leave, nick, roomnick, myroomnick, ignore, unignore, react, ban, unban, kick
class ActionsTest : public QObject
{
Q_OBJECT
private:
Connection *connection = nullptr;
NeoChatRoom *room = nullptr;
void expectMessage(const QString &actionName, const QString &args, MessageType::Type type, const QString &message);
Server server;
private Q_SLOTS:
void initTestCase();
void testActions();
void testActions_data();
void testInvite();
};
void ActionsTest::initTestCase()
{
Connection::setRoomType<NeoChatRoom>();
server.start();
KLocalizedString::setApplicationDomain(QByteArrayLiteral("neochat"));
auto accountManager = new AccountManager(true);
QSignalSpy spy(accountManager, &AccountManager::connectionAdded);
connection = accountManager->accounts()->front();
auto roomId = server.createRoom(u"@user:localhost:1234"_s);
server.inviteUser(roomId, u"@invited:example.com"_s);
server.banUser(roomId, u"@banned:example.com"_s);
server.joinUser(roomId, u"@example:example.com"_s);
QSignalSpy syncSpy(connection, &Connection::syncDone);
// We need to wait for two syncs, as the next one won't have the changes yet
QVERIFY(syncSpy.wait());
QVERIFY(syncSpy.wait());
room = dynamic_cast<NeoChatRoom *>(connection->room(roomId));
QVERIFY(room);
}
void ActionsTest::testActions_data()
{
QTest::addColumn<QString>("command");
QTest::addColumn<std::optional<QString>>("resultText");
QTest::addColumn<std::optional<Quotient::RoomMessageEvent::MsgType>>("type");
QTest::newRow("shrug") << u"/shrug Hello"_s << std::make_optional(u"¯\\\\\\_(ツ)\\_/¯ Hello"_s)
<< std::make_optional(Quotient::RoomMessageEvent::MsgType::Text);
QTest::newRow("lenny") << u"/lenny Hello"_s << std::make_optional(u"( ͡° ͜ʖ ͡°) Hello"_s) << std::make_optional(Quotient::RoomMessageEvent::MsgType::Text);
QTest::newRow("tableflip") << u"/tableflip Hello"_s << std::make_optional(u"(╯°□°)╯︵ ┻━┻ Hello"_s)
<< std::make_optional(Quotient::RoomMessageEvent::MsgType::Text);
QTest::newRow("unflip") << u"/unflip Hello"_s << std::make_optional(u"┬──┬ ( ゜-゜ノ) Hello"_s)
<< std::make_optional(Quotient::RoomMessageEvent::MsgType::Text);
QTest::newRow("rainbow") << u"/rainbow Hello"_s << std::optional<QString>() << std::optional<Quotient::RoomMessageEvent::MsgType>();
QTest::newRow("rainbowme") << u"/rainbowme Hello"_s << std::optional<QString>() << std::optional<Quotient::RoomMessageEvent::MsgType>();
QTest::newRow("plain") << u"/plain <b>Hello</b>"_s << std::optional<QString>() << std::optional<Quotient::RoomMessageEvent::MsgType>();
QTest::newRow("spoiler") << u"/spoiler Hello"_s << std::optional<QString>() << std::optional<Quotient::RoomMessageEvent::MsgType>();
QTest::newRow("me") << u"/me Hello"_s << std::make_optional(u"Hello"_s) << std::make_optional(Quotient::RoomMessageEvent::MsgType::Emote);
QTest::newRow("notice") << u"/notice Hello"_s << std::make_optional(u"Hello"_s) << std::make_optional(Quotient::RoomMessageEvent::MsgType::Notice);
QTest::newRow("message") << u"Hello"_s << std::make_optional(u"Hello"_s) << std::make_optional(Quotient::RoomMessageEvent::MsgType::Text);
QTest::newRow("invite") << u"/invite @foo:example.com"_s << std::optional<QString>() << std::optional<Quotient::RoomMessageEvent::MsgType>();
//TODO: join, knock, j, part, leave, nick, roomnick, myroomnick, ignore, unignore, react, ban, unban, kick
}
void ActionsTest::testActions()
{
QFETCH(QString, command);
QFETCH(std::optional<QString>, resultText);
QFETCH(std::optional<Quotient::RoomMessageEvent::MsgType>, type);
auto cache = new ChatBarCache(room);
cache->cache() += Block::CacheItem{.type = MessageComponentType::Text, .content = QTextDocumentFragment::fromMarkdown(command)};
auto result = ActionsModel::handleAction(room, cache);
QCOMPARE(resultText, std::get<std::optional<QString>>(result));
QCOMPARE(type, std::get<std::optional<Quotient::RoomMessageEvent::MsgType>>(result));
}
static ActionsModel::Action findAction(const QString &name)
{
for (const auto &action : ActionsModel::allActions()) {
if (action.prefix == name) {
return action;
}
}
return {};
}
void ActionsTest::expectMessage(const QString &actionName, const QString &args, MessageType::Type type, const QString &message)
{
auto action = findAction(actionName);
QSignalSpy spy(room, &NeoChatRoom::showMessage);
auto result = action.handle(args, room, nullptr);
auto expected = QVariantList {type, message};
auto signal = spy.takeFirst();
QCOMPARE(signal, expected);
}
void ActionsTest::testInvite()
{
expectMessage(u"invite"_s, u"foo"_s, MessageType::Error, u"'foo' does not look like a matrix id."_s);
expectMessage(u"invite"_s, u"@invited:example.com"_s, MessageType::Information, u"@invited:example.com is already invited to this room."_s);
QCOMPARE(room->memberState(u"@invited:example.com"_s), Membership::Invite);
expectMessage(u"invite"_s, u"@banned:example.com"_s, MessageType::Information, u"@banned:example.com is banned from this room."_s);
QCOMPARE(room->memberState(u"@banned:example.com"_s), Membership::Ban);
expectMessage(u"invite"_s, connection->userId(), MessageType::Positive, u"You are already in this room."_s);
QCOMPARE(room->memberState(connection->userId()), Membership::Join);
expectMessage(u"invite"_s, u"@example:example.com"_s, MessageType::Information, u"@example:example.com is already in this room."_s);
QCOMPARE(room->memberState(u"@example:example.com"_s), Membership::Join);
QCOMPARE(room->memberState(u"@user:example.com"_s), Membership::Leave);
expectMessage(u"invite"_s, u"@user:example.com"_s, MessageType::Positive, u"@user:example.com was invited into this room."_s);
QSignalSpy spy(room, &NeoChatRoom::changed);
QVERIFY(spy.wait());
auto tries = 0;
while (room->memberState(u"@user:example.com"_s) != Membership::Invite) {
QVERIFY(spy.wait());
tries += 1;
if (tries > 3) {
QVERIFY(false);
}
}
QCOMPARE(room->memberState(u"@user:example.com"_s), Membership::Invite);
}
QTEST_MAIN(ActionsTest)
#include "actionstest.moc"

View File

@@ -0,0 +1,52 @@
// SPDX-FileCopyrightText: 2026 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QObject>
#include <QTest>
#include "blockcache.h"
#include "enums/messagecomponenttype.h"
using namespace Block;
class BlockCacheTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void toStringTest_data();
void toStringTest();
};
void BlockCacheTest::toStringTest_data()
{
QTest::addColumn<QString>("inputString");
QTest::addColumn<MessageComponentType::Type>("itemType");
QTest::addColumn<QString>("outputstring");
QTest::newRow("plainText") << u"test string"_s << MessageComponentType::Text << u"test string"_s;
QTest::newRow("list") << u"- list 1\n- list 2\n- list 3\n"_s << MessageComponentType::Text << u"- list 1\n- list 2\n- list 3"_s;
QTest::newRow("code") << u"for (some code) {\n\n do something\n\n}"_s << MessageComponentType::Code
<< u"```\nfor (some code) {\n do something\n}\n```"_s;
QTest::newRow("quote") << u"\"this is a quote\""_s << MessageComponentType::Quote << u"> this is a quote"_s;
QTest::newRow("heading") << u"# heading\n\nnext line"_s << MessageComponentType::Text << u"# heading\n\nnext line"_s;
}
void BlockCacheTest::toStringTest()
{
QFETCH(QString, inputString);
QFETCH(MessageComponentType::Type, itemType);
QFETCH(QString, outputstring);
Cache cache;
cache += CacheItem{
.type = itemType,
.content = QTextDocumentFragment::fromMarkdown(inputString),
};
QCOMPARE(cache.toString(), outputstring);
}
QTEST_MAIN(BlockCacheTest)
#include "blockcachetest.moc"

View File

@@ -0,0 +1,177 @@
// SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QJsonDocument>
#include <QJsonObject>
#include <QObject>
#include <QTest>
#include <QSignalSpy>
#include <Quotient/roommember.h>
#include <Quotient/syncdata.h>
#include <qtestcase.h>
#include <KLocalizedString>
#include "accountmanager.h"
#include "blockcache.h"
#include "chatbarcache.h"
#include "neochatroom.h"
#include "server.h"
#include "testutils.h"
using namespace Quotient;
class ChatBarCacheTest : public QObject
{
Q_OBJECT
private:
Connection *connection = nullptr;
NeoChatRoom *room = nullptr;
Server server;
QString eventId;
private Q_SLOTS:
void initTestCase();
void empty();
void reply();
void replyMissingUser();
void edit();
void attachment();
};
void ChatBarCacheTest::initTestCase()
{
Connection::setRoomType<NeoChatRoom>();
server.start();
KLocalizedString::setApplicationDomain(QByteArrayLiteral("neochat"));
auto accountManager = new AccountManager(true, this);
QSignalSpy spy(accountManager, &AccountManager::connectionAdded);
connection = dynamic_cast<NeoChatConnection *>(accountManager->accounts()->front());
const auto roomId = server.createRoom(u"@user:localhost:1234"_s);
eventId = server.sendEvent(roomId,
u"m.room.message"_s,
QJsonObject{
{u"body"_s, u"foo"_s},
{u"msgtype"_s, u"m.text"_s},
});
QSignalSpy syncSpy(connection, &Connection::syncDone);
// We need to wait for two syncs, as the next one won't have the changes yet
QVERIFY(syncSpy.wait());
QVERIFY(syncSpy.wait());
room = dynamic_cast<NeoChatRoom *>(connection->room(roomId));
QVERIFY(room);
server.joinUser(room->id(), u"@foo:server.com"_s);
QVERIFY(syncSpy.wait());
QVERIFY(syncSpy.wait());
}
void ChatBarCacheTest::empty()
{
QScopedPointer<ChatBarCache> chatBarCache(new ChatBarCache(room));
QCOMPARE(chatBarCache->cache().toString(), QString());
QCOMPARE(chatBarCache->isReplying(), false);
QCOMPARE(chatBarCache->replyId(), QString());
QCOMPARE(chatBarCache->isEditing(), false);
QCOMPARE(chatBarCache->editId(), QString());
QCOMPARE(chatBarCache->relationAuthor(), room->member(QString()));
QCOMPARE(chatBarCache->relationMessage(), QString());
QCOMPARE(chatBarCache->attachmentPath(), QString());
}
void ChatBarCacheTest::reply()
{
QScopedPointer<ChatBarCache> chatBarCache(new ChatBarCache(room));
chatBarCache->cache() += Block::CacheItem{.type = MessageComponentType::Text, .content = QTextDocumentFragment::fromMarkdown(u"some text"_s)};
chatBarCache->setAttachmentPath(u"some/path"_s);
chatBarCache->setReplyId(eventId);
QCOMPARE(chatBarCache->cache().toString(), u"some text"_s);
QCOMPARE(chatBarCache->isReplying(), true);
QCOMPARE(chatBarCache->replyId(), eventId);
QCOMPARE(chatBarCache->isEditing(), false);
QCOMPARE(chatBarCache->editId(), QString());
QCOMPARE(chatBarCache->relationAuthor(), room->member(u"@foo:server.com"_s));
QCOMPARE(chatBarCache->relationMessage(), u"foo"_s);
QCOMPARE(chatBarCache->attachmentPath(), QString());
QCOMPARE(chatBarCache->relationAuthorIsPresent(), true);
}
void ChatBarCacheTest::replyMissingUser()
{
QScopedPointer<ChatBarCache> chatBarCache(new ChatBarCache(room));
chatBarCache->cache() += Block::CacheItem{.type = MessageComponentType::Text, .content = QTextDocumentFragment::fromMarkdown(u"some text"_s)};
chatBarCache->setAttachmentPath(u"some/path"_s);
chatBarCache->setReplyId(eventId);
QCOMPARE(chatBarCache->cache().toString(), u"some text"_s);
QCOMPARE(chatBarCache->isReplying(), true);
QCOMPARE(chatBarCache->replyId(), eventId);
QCOMPARE(chatBarCache->isEditing(), false);
QCOMPARE(chatBarCache->editId(), QString());
QCOMPARE(chatBarCache->relationAuthor(), room->member(u"@foo:server.com"_s));
QCOMPARE(chatBarCache->relationMessage(), u"foo"_s);
QCOMPARE(chatBarCache->attachmentPath(), QString());
QCOMPARE(chatBarCache->relationAuthorIsPresent(), true);
QSignalSpy relationAuthorIsPresentSpy(chatBarCache.get(), &ChatBarCache::relationAuthorIsPresentChanged);
// sync again, which will simulate the reply user leaving the room
QSignalSpy syncSpy(connection, &Connection::syncDone);
server.sendStateEvent(room->id(), u"m.room.member"_s, u"@foo:server.com"_s, {{u"membership"_s, u"leave"_s}});
QVERIFY(syncSpy.wait());
QVERIFY(syncSpy.wait());
QTRY_COMPARE(relationAuthorIsPresentSpy.count(), 1);
QCOMPARE(chatBarCache->relationAuthorIsPresent(), false);
}
void ChatBarCacheTest::edit()
{
QScopedPointer<ChatBarCache> chatBarCache(new ChatBarCache(room));
chatBarCache->cache() += Block::CacheItem{.type = MessageComponentType::Text, .content = QTextDocumentFragment::fromMarkdown(u"some text"_s)};
chatBarCache->setAttachmentPath(u"some/path"_s);
connect(chatBarCache.get(), &ChatBarCache::relationIdChanged, this, [this](const QString &oldEventId, const QString &newEventId) {
QCOMPARE(oldEventId, QString());
QCOMPARE(newEventId, eventId);
});
chatBarCache->setEditId(eventId);
QCOMPARE(chatBarCache->cache().toString(), u"some text"_s);
QCOMPARE(chatBarCache->isReplying(), false);
QCOMPARE(chatBarCache->replyId(), QString());
QCOMPARE(chatBarCache->isEditing(), true);
QCOMPARE(chatBarCache->editId(), eventId);
QCOMPARE(chatBarCache->relationAuthor(), room->member(u"@foo:server.com"_s));
QCOMPARE(chatBarCache->relationMessage(), u"foo"_s);
QCOMPARE(chatBarCache->attachmentPath(), QString());
}
void ChatBarCacheTest::attachment()
{
QScopedPointer<ChatBarCache> chatBarCache(new ChatBarCache(room));
chatBarCache->cache() += Block::CacheItem{.type = MessageComponentType::Text, .content = QTextDocumentFragment::fromMarkdown(u"some text"_s)};
chatBarCache->setEditId(eventId);
chatBarCache->setAttachmentPath(u"some/path"_s);
QCOMPARE(chatBarCache->cache().toString(), u"some text"_s);
QCOMPARE(chatBarCache->isReplying(), false);
QCOMPARE(chatBarCache->replyId(), QString());
QCOMPARE(chatBarCache->isEditing(), false);
QCOMPARE(chatBarCache->editId(), QString());
QCOMPARE(chatBarCache->relationAuthor(), room->member(QString()));
QCOMPARE(chatBarCache->relationMessage(), QString());
QCOMPARE(chatBarCache->attachmentPath(), u"some/path"_s);
}
QTEST_MAIN(ChatBarCacheTest)
#include "chatbarcachetest.moc"

View File

@@ -0,0 +1,88 @@
// SPDX-FileCopyrightText: 2026 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
import QtQuick
import QtTest
import org.kde.neochat.libneochat
import NeoChatTestUtils
TestCase {
name: "ChatKeyHelperTest"
TextEdit {
id: textEdit
Keys.onPressed: (event) => {
event.accepted = testHelper.keyHelper.handleKey(event.key, event.modifiers);
}
}
ChatTextItemHelper {
id: textItemHelper
textItem: textEdit
}
ChatKeyHelperTestHelper {
id: testHelper
textItem: textItemHelper
}
SignalSpy {
id: spyUp
target: testHelper.keyHelper
signalName: "unhandledUp"
}
SignalSpy {
id: spyDown
target: testHelper.keyHelper
signalName: "unhandledDown"
}
SignalSpy {
id: spyDelete
target: testHelper.keyHelper
signalName: "unhandledDelete"
}
SignalSpy {
id: spyBackSpace
target: testHelper.keyHelper
signalName: "unhandledBackspace"
}
function init(): void {
textEdit.clear();
spyUp.clear();
spyDown.clear();
spyDelete.clear();
spyBackSpace.clear();
textEdit.forceActiveFocus();
}
function cleanupTestCase(): void {
testHelper.textItem = null;
textItemHelper.textItem = null;
}
function test_upDown(): void {
textEdit.insert(0, "line 1\nline 2\nline 3")
textEdit.cursorPosition = 0;
keyClick(Qt.Key_Up);
compare(spyUp.count, 1);
compare(spyDown.count, 0);
keyClick(Qt.Key_Down);
compare(spyUp.count, 1);
compare(spyDown.count, 0);
keyClick(Qt.Key_Down);
compare(spyUp.count, 1);
compare(spyDown.count, 0);
keyClick(Qt.Key_Down);
compare(spyUp.count, 1);
compare(spyDown.count, 1);
}
}

View File

@@ -0,0 +1,54 @@
// SPDX-FileCopyrightText: 2025 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#pragma once
#include <QObject>
#include <QQuickItem>
#include <QQuickTextDocument>
#include <QTextCursor>
#include <QTextDocumentFragment>
#include "chatkeyhelper.h"
#include "chattextitemhelper.h"
class ChatKeyHelperTestHelper : public QObject
{
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(ChatTextItemHelper *textItem READ textItem WRITE setTextItem NOTIFY textItemChanged)
Q_PROPERTY(ChatKeyHelper *keyHelper READ keyHelper CONSTANT)
public:
explicit ChatKeyHelperTestHelper(QObject *parent = nullptr)
: QObject(parent)
, m_keyHelper(new ChatKeyHelper(this))
{
}
ChatTextItemHelper *textItem() const
{
return m_keyHelper->textItem();
}
void setTextItem(ChatTextItemHelper *textItem)
{
if (textItem == m_keyHelper->textItem()) {
return;
}
m_keyHelper->setTextItem(textItem);
Q_EMIT textItemChanged();
}
ChatKeyHelper *keyHelper() const
{
return m_keyHelper;
}
Q_SIGNALS:
void textItemChanged();
private:
QPointer<ChatKeyHelper> m_keyHelper;
};

View File

@@ -0,0 +1,173 @@
// SPDX-FileCopyrightText: 2026 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
import QtQuick
import QtTest
import org.kde.neochat.libneochat
import NeoChatTestUtils
TestCase {
name: "ChatMarkdownHelperTest"
TextEdit {
id: textEdit
textFormat: TextEdit.RichText
}
TextEdit {
id: textEdit2
}
ChatMarkdownHelperTestWrapper {
id: chatMarkdownHelper
textItem: textEdit
}
SignalSpy {
id: spyItem
target: chatMarkdownHelper
signalName: "textItemChanged"
}
SignalSpy {
id: spyUnhandledFormat
target: chatMarkdownHelper
signalName: "unhandledBlockFormat"
}
function initTestCase(): void {
textEdit.forceActiveFocus();
}
function cleanup(): void {
chatMarkdownHelper.clear();
compare(chatMarkdownHelper.checkText(""), true);
compare(chatMarkdownHelper.checkFormats([]), true);
compare(textEdit.cursorPosition, 0);
}
function test_item(): void {
spyItem.clear();
compare(chatMarkdownHelper.textItem, textEdit);
chatMarkdownHelper.textItem = textEdit2;
compare(chatMarkdownHelper.textItem, textEdit2);
chatMarkdownHelper.textItem = textEdit;
compare(chatMarkdownHelper.textItem, textEdit);
}
function test_textFormat_data() {
return [
{tag: "bold", input: "**b** ", outText: ["*", "**", "b", "b*", "b**", "b "], outFormats: [[], [], [RichFormat.Bold], [RichFormat.Bold], [RichFormat.Bold], []], unhandled: 0},
{tag: "italic", input: "*i* ", outText: ["*", "i", "i*", "i "], outFormats: [[], [RichFormat.Italic], [RichFormat.Italic], []], unhandled: 0},
{tag: "heading 1", input: "# h", outText: ["#", "# ", "h"], outFormats: [[], [], [RichFormat.Bold, RichFormat.Heading1]], unhandled: 0},
{tag: "heading 2", input: "## h", outText: ["#", "##", "## ", "h"], outFormats: [[], [], [], [RichFormat.Bold, RichFormat.Heading2]], unhandled: 0},
{tag: "heading 3", input: "### h", outText: ["#", "##", "###", "### ", "h"], outFormats: [[], [], [], [], [RichFormat.Bold, RichFormat.Heading3]], unhandled: 0},
{tag: "heading 4", input: "#### h", outText: ["#", "##", "###", "####", "#### ", "h"], outFormats: [[], [], [], [], [], [RichFormat.Bold, RichFormat.Heading4]], unhandled: 0},
{tag: "heading 5", input: "##### h", outText: ["#", "##", "###", "####", "#####", "##### ", "h"], outFormats: [[], [], [], [], [], [], [RichFormat.Bold, RichFormat.Heading5]], unhandled: 0},
{tag: "heading 6", input: "###### h", outText: ["#", "##", "###", "####", "#####", "######", "###### ", "h"], outFormats: [[], [], [], [], [], [] ,[], [RichFormat.Bold, RichFormat.Heading6]], unhandled: 0},
{tag: "quote", input: "> q", outText: [">", "> ", "q"], outFormats: [[], [], []], unhandled: 1},
{tag: "quote - no space", input: ">q", outText: [">", "q"], outFormats: [[], [], []], unhandled: 1},
{tag: "unorderedlist 1", input: "* l", outText: ["*", "* ", "l"], outFormats: [[], [], [RichFormat.UnorderedList]], unhandled: 0},
{tag: "unorderedlist 2", input: "- l", outText: ["-", "- ", "l"], outFormats: [[], [], [RichFormat.UnorderedList]], unhandled: 0},
{tag: "orderedlist 1", input: "1. l", outText: ["1", "1.", "1. ", "l"], outFormats: [[], [], [], [RichFormat.OrderedList]], unhandled: 0},
{tag: "orderedlist 2", input: "1) l", outText: ["1", "1)", "1) ", "l"], outFormats: [[], [], [], [RichFormat.OrderedList]], unhandled: 0},
{tag: "inline code", input: "`c` ", outText: ["`", "c", "c`", "c "], outFormats: [[], [RichFormat.InlineCode], [RichFormat.InlineCode], []], unhandled: 0},
{tag: "code", input: "``` ", outText: ["`", "``", "```", " "], outFormats: [[], [], [], []], unhandled: 1},
{tag: "strikethrough", input: "~~s~~ ", outText: ["~", "~~", "s", "s~", "s~~", "s "], outFormats: [[], [], [RichFormat.Strikethrough], [RichFormat.Strikethrough], [RichFormat.Strikethrough], []], unhandled: 0},
{tag: "underline", input: "_u_ ", outText: ["_", "u", "u_", "u "], outFormats: [[], [RichFormat.Underline], [RichFormat.Underline], []], unhandled: 0},
{tag: "multiple closable", input: "***_~~t~~_*** ", outText: ["*", "**", "*", "_", "~", "~~", "t", "t~", "t~~", "t_", "t*", "t**", "t*", "t "], outFormats: [[], [], [RichFormat.Bold], [RichFormat.Bold, RichFormat.Italic], [RichFormat.Bold, RichFormat.Italic, RichFormat.Underline], [RichFormat.Bold, RichFormat.Italic, RichFormat.Underline], [RichFormat.Bold, RichFormat.Italic, RichFormat.Underline, RichFormat.Strikethrough], [RichFormat.Bold, RichFormat.Italic, RichFormat.Underline, RichFormat.Strikethrough], [RichFormat.Bold, RichFormat.Italic, RichFormat.Underline, RichFormat.Strikethrough], [RichFormat.Bold, RichFormat.Italic, RichFormat.Underline], [RichFormat.Bold, RichFormat.Italic], [RichFormat.Bold, RichFormat.Italic], [RichFormat.Italic], []], unhandled: 0},
{tag: "nonclosable closable", input: "* **b** ", outText: ["*", "* ", "*", "**", "b", "b*", "b**", "b "], outFormats: [[], [], [RichFormat.UnorderedList], [RichFormat.UnorderedList], [RichFormat.Bold, RichFormat.UnorderedList], [RichFormat.Bold, RichFormat.UnorderedList], [RichFormat.Bold, RichFormat.UnorderedList], [RichFormat.UnorderedList]], unhandled: 0},
{tag: "not at line start", input: " 1) ", outText: [" ", " 1", " 1)", " 1) "], outFormats: [[], [], [], []], unhandled: 0},
]
}
function test_textFormat(data): void {
spyUnhandledFormat.clear();
compare(spyUnhandledFormat.count, 0);
for (let i = 0; i < data.input.length; i++) {
keyClick(data.input[i]);
compare(chatMarkdownHelper.checkText(data.outText[i]), true);
compare(chatMarkdownHelper.checkFormats(data.outFormats[i]), true);
}
compare(spyUnhandledFormat.count, data.unhandled);
}
function test_backspace(): void {
keyClick("*");
compare(chatMarkdownHelper.checkText("*"), true);
compare(chatMarkdownHelper.checkFormats([]), true);
keyClick("*");
compare(chatMarkdownHelper.checkText("**"), true);
compare(chatMarkdownHelper.checkFormats([]), true);
keyClick("b");
compare(chatMarkdownHelper.checkText("b"), true);
compare(chatMarkdownHelper.checkFormats([RichFormat.Bold]), true);
keyClick("o");
compare(chatMarkdownHelper.checkText("bo"), true);
compare(chatMarkdownHelper.checkFormats([RichFormat.Bold]), true);
keyClick("l");
compare(chatMarkdownHelper.checkText("bol"), true);
compare(chatMarkdownHelper.checkFormats([RichFormat.Bold]), true);
keyClick("d");
compare(chatMarkdownHelper.checkText("bold"), true);
compare(chatMarkdownHelper.checkFormats([RichFormat.Bold]), true);
keyClick(Qt.Key_Backspace);
compare(chatMarkdownHelper.checkText("bol"), true);
compare(chatMarkdownHelper.checkFormats([RichFormat.Bold]), true);
keyClick(Qt.Key_Backspace);
compare(chatMarkdownHelper.checkText("bo"), true);
compare(chatMarkdownHelper.checkFormats([RichFormat.Bold]), true);
keyClick("*");
compare(chatMarkdownHelper.checkText("bo*"), true);
compare(chatMarkdownHelper.checkFormats([RichFormat.Bold]), true);
keyClick("*");
compare(chatMarkdownHelper.checkText("bo**"), true);
compare(chatMarkdownHelper.checkFormats([RichFormat.Bold]), true);
keyClick(" ");
compare(chatMarkdownHelper.checkText("bo "), true);
compare(chatMarkdownHelper.checkFormats([]), true);
}
function test_cursorMove(): void {
keyClick("t");
keyClick("e");
keyClick("s");
keyClick("t");
compare(chatMarkdownHelper.checkText("test"), true);
compare(chatMarkdownHelper.checkFormats([]), true);
keyClick("*");
keyClick("*");
keyClick("b");
compare(chatMarkdownHelper.checkText("testb"), true);
compare(chatMarkdownHelper.checkFormats([RichFormat.Bold]), true);
textEdit.cursorPosition = 2;
keyClick("*");
keyClick("*");
keyClick("b");
compare(chatMarkdownHelper.checkText("tebstb"), true);
compare(chatMarkdownHelper.checkFormats([]), true);
}
function test_insertText(): void {
textEdit.insert(0, "test");
compare(chatMarkdownHelper.checkText("test"), true);
compare(chatMarkdownHelper.checkFormats([]), true);
textEdit.insert(4, "**b");
compare(chatMarkdownHelper.checkText("test**b"), true);
compare(chatMarkdownHelper.checkFormats([]), true);
textEdit.clear();
textEdit.insert(0, "test");
compare(chatMarkdownHelper.checkText("test"), true);
compare(chatMarkdownHelper.checkFormats([]), true);
textEdit.insert(2, "**b");
compare(chatMarkdownHelper.checkText("te**bst"), true);
compare(chatMarkdownHelper.checkFormats([]), true);
}
}

View File

@@ -0,0 +1,82 @@
// SPDX-FileCopyrightText: 2025 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#pragma once
#include <QObject>
#include <QQuickItem>
#include <QTextCursor>
#include "chatmarkdownhelper.h"
#include "chattextitemhelper.h"
#include "enums/richformat.h"
class ChatMarkdownHelperTestWrapper : public QObject
{
Q_OBJECT
QML_ELEMENT
/**
* @brief The QML text Item the ChatMerkdownHelper is handling.
*/
Q_PROPERTY(QQuickItem *textItem READ textItem WRITE setTextItem NOTIFY textItemChanged)
public:
explicit ChatMarkdownHelperTestWrapper(QObject *parent = nullptr)
: QObject(parent)
, m_chatMarkdownHelper(new ChatMarkdownHelper(this))
, m_textItem(new ChatTextItemHelper(this))
{
m_chatMarkdownHelper->setTextItem(m_textItem);
connect(m_chatMarkdownHelper, &ChatMarkdownHelper::textItemChanged, this, &ChatMarkdownHelperTestWrapper::textItemChanged);
connect(m_chatMarkdownHelper, &ChatMarkdownHelper::unhandledBlockFormat, this, &ChatMarkdownHelperTestWrapper::unhandledBlockFormat);
}
QQuickItem *textItem() const
{
return m_textItem->textItem();
}
void setTextItem(QQuickItem *textItem)
{
m_textItem->setTextItem(textItem);
}
Q_INVOKABLE bool checkText(const QString &text)
{
const auto doc = m_textItem->document();
if (!doc) {
return false;
}
return text == doc->toPlainText();
}
Q_INVOKABLE bool checkFormats(QList<RichFormat::Format> formats)
{
const auto cursor = m_textItem->textCursor();
if (cursor.isNull()) {
return false;
}
return RichFormat::formatsAtCursor(cursor) == formats;
}
Q_INVOKABLE void clear()
{
auto cursor = m_textItem->textCursor();
if (cursor.isNull()) {
return;
}
cursor.select(QTextCursor::Document);
cursor.removeSelectedText();
cursor.setBlockCharFormat(RichFormat::charFormatForFormat(RichFormat::Paragraph));
cursor.setBlockFormat(RichFormat::blockFormatForFormat(RichFormat::Paragraph));
}
Q_SIGNALS:
void textItemChanged();
void unhandledBlockFormat(RichFormat::Format format);
private:
QPointer<ChatMarkdownHelper> m_chatMarkdownHelper;
QPointer<ChatTextItemHelper> m_textItem;
};

View File

@@ -0,0 +1,301 @@
// SPDX-FileCopyrightText: 2026 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
import QtQuick
import QtTest
import org.kde.neochat.libneochat
import NeoChatTestUtils
TestCase {
name: "ChatTextItemHelperTest"
TextEdit {
id: textEdit
}
TextEdit {
id: textEdit2
}
ChatTextItemHelper {
id: textItemHelper
textItem: textEdit
}
ChatTextItemHelperTestHelper {
id: testHelper
textItem: textItemHelper
}
SignalSpy {
id: spyItem
target: textItemHelper
signalName: "textItemChanged"
}
SignalSpy {
id: spyContentsChanged
target: textItemHelper
signalName: "contentsChanged"
}
SignalSpy {
id: spyContentsChange
target: textItemHelper
signalName: "contentsChange"
}
SignalSpy {
id: spyCursor
target: textItemHelper
signalName: "cursorPositionChanged"
}
function init(): void {
testHelper.setFixedChars("", "");
textEdit.clear();
textEdit2.clear();
spyItem.clear();
spyContentsChange.clear();
spyContentsChanged.clear();
spyCursor.clear();
}
function cleanupTestCase(): void {
testHelper.textItem = null;
textItemHelper.textItem = null;
}
function test_item(): void {
compare(textItemHelper.textItem, textEdit);
compare(spyItem.count, 0);
textItemHelper.textItem = textEdit2;
compare(textItemHelper.textItem, textEdit2);
compare(spyItem.count, 1);
textItemHelper.textItem = textEdit;
compare(textItemHelper.textItem, textEdit);
compare(spyItem.count, 2);
}
function test_fixedChars(): void {
textEdit.forceActiveFocus();
testHelper.setFixedChars("1", "2");
compare(textEdit.text, "12");
compare(textEdit.cursorPosition, 1);
compare(spyCursor.count, 0);
keyClick("b");
compare(textEdit.text, "1b2");
compare(textEdit.cursorPosition, 2);
compare(spyCursor.count, 1);
keyClick(Qt.Key_Left);
compare(textEdit.text, "1b2");
compare(textEdit.cursorPosition, 1);
compare(spyCursor.count, 2);
keyClick(Qt.Key_Left);
compare(textEdit.text, "1b2");
compare(textEdit.cursorPosition, 1);
compare(spyCursor.count, 3);
keyClick(Qt.Key_Right);
compare(textEdit.text, "1b2");
compare(textEdit.cursorPosition, 2);
compare(spyCursor.count, 4);
keyClick(Qt.Key_Right);
compare(textEdit.text, "1b2");
compare(textEdit.cursorPosition, 2);
compare(spyCursor.count, 5);
}
function test_document(): void {
// We can't get to the QTextDocument from QML so we have to use a helper function.
compare(testHelper.compareDocuments(textEdit.textDocument), true);
textEdit.insert(0, "test text");
compare(testHelper.lineCount(), 1);
textEdit.insert(textEdit.text.length, "\ntest text");
compare(testHelper.lineCount(), 2);
textEdit.clear()
compare(textEdit.text.length, 0);
}
function test_takeFirstBlock(): void {
textEdit.insert(0, "test text");
compare(testHelper.firstBlockText(), "test text");
compare(textEdit.text.length, 0);
textEdit.insert(0, "test text\nmore test text");
compare(testHelper.firstBlockText(), "test text");
compare(textEdit.text, "more test text");
compare(testHelper.firstBlockText(), "more test text");
compare(textEdit.text, "");
compare(textEdit.text.length, 0);
}
function test_fillFragments(): void {
textEdit.insert(0, "before fragment\nmid fragment\nafter fragment");
compare(testHelper.checkFragments("before fragment\nmid fragment", "after fragment", ""), true);
textEdit.clear();
textEdit.insert(0, "before fragment\nmid fragment\nafter fragment");
textEdit.cursorPosition = 16;
compare(testHelper.checkFragments("before fragment", "mid fragment", "after fragment"), true);
textEdit.clear();
textEdit.insert(0, "before fragment\nmid fragment\nafter fragment");
textEdit.cursorPosition = 29;
compare(testHelper.checkFragments("before fragment\nmid fragment", "after fragment", ""), true);
textEdit.clear();
}
function test_insertFragment(): void {
testHelper.insertFragment("test text");
compare(textEdit.text, "test text");
compare(textEdit.cursorPosition, 9);
testHelper.insertFragment("beginning ", 1);
compare(textEdit.text, "beginning test text");
compare(textEdit.cursorPosition, 10);
testHelper.insertFragment(" end", 2);
compare(textEdit.text, "beginning test text end");
compare(textEdit.cursorPosition, 23);
textEdit.clear();
testHelper.insertFragment("test text", 0, true);
compare(textEdit.text, "test text");
compare(textEdit.cursorPosition, 0);
}
function test_cursor(): void {
// We can't get to the QTextCursor from QML so we have to use a helper function.
compare(testHelper.compareCursor(textEdit.cursorPosition, textEdit.selectionStart, textEdit.selectionEnd), true);
compare(textEdit.cursorPosition, testHelper.cursorPosition());
// Check we get the appropriate content and cursor change signals when inserting text.
textEdit.insert(0, "test text")
compare(spyContentsChange.count, 1);
compare(spyContentsChange.signalArguments[0][0], 0);
compare(spyContentsChange.signalArguments[0][1], 0);
compare(spyContentsChange.signalArguments[0][2], 9);
compare(spyContentsChanged.count, 1);
compare(spyCursor.count, 1);
compare(spyCursor.signalArguments[0][0], true);
compare(testHelper.compareCursor(textEdit.cursorPosition, textEdit.selectionStart, textEdit.selectionEnd), true);
compare(textEdit.cursorPosition, testHelper.cursorPosition());
// Check we get only get a cursor change signal when moving the cursor.
textEdit.cursorPosition = 4;
compare(spyContentsChanged.count, 1);
compare(spyCursor.count, 2);
compare(spyCursor.signalArguments[1][0], false);
textEdit.selectAll();
compare(spyContentsChanged.count, 1);
compare(spyCursor.count, 2);
compare(testHelper.compareCursor(textEdit.cursorPosition, textEdit.selectionStart, textEdit.selectionEnd), true);
compare(textEdit.cursorPosition, testHelper.cursorPosition());
// Check we get the appropriate content and cursor change signals when removing text.
textEdit.clear();
compare(spyContentsChange.count, 2);
compare(spyContentsChange.signalArguments[1][0], 0);
compare(spyContentsChange.signalArguments[1][1], 9);
compare(spyContentsChange.signalArguments[1][2], 0);
compare(spyContentsChanged.count, 2);
compare(spyCursor.count, 3);
compare(spyCursor.signalArguments[2][0], true);
}
function test_setCursor(): void {
textEdit.insert(0, "test text");
compare(textEdit.cursorPosition, 9);
compare(spyCursor.count, 1);
testHelper.setCursorPosition(5);
compare(textEdit.cursorPosition, 5);
compare(spyCursor.count, 2);
testHelper.setCursorPosition(1);
compare(textEdit.cursorPosition, 1);
compare(spyCursor.count, 3);
textEdit.cursorVisible = false;
compare(textEdit.cursorVisible, false);
testHelper.setCursorVisible(true);
compare(textEdit.cursorVisible, true);
testHelper.setCursorVisible(false);
compare(textEdit.cursorVisible, false);
}
function test_setCursorFromTextItem(): void {
textEdit.insert(0, "line 1\nline 2");
textEdit2.insert(0, "line 1\nline 2");
testHelper.setCursorFromTextItem(textEdit2, false, 0);
compare(textEdit.cursorPosition, 7);
testHelper.setCursorFromTextItem(textEdit2, true, 7);
compare(textEdit.cursorPosition, 0);
testHelper.setCursorFromTextItem(textEdit2, false, 1);
compare(textEdit.cursorPosition, 8);
testHelper.setCursorFromTextItem(textEdit2, true, 8);
compare(textEdit.cursorPosition, 1);
testHelper.setFixedChars("1", "2");
testHelper.setCursorFromTextItem(textEdit2, false, 0);
compare(textEdit.cursorPosition, 8);
testHelper.setCursorFromTextItem(textEdit2, true, 7);
compare(textEdit.cursorPosition, 1);
}
function test_mergeFormat(): void {
textEdit.insert(0, "lots of text");
testHelper.setCursorPosition(0);
testHelper.mergeFormatOnCursor(RichFormat.Bold);
compare(testHelper.checkFormatsAtCursor([RichFormat.Bold]), true);
testHelper.mergeFormatOnCursor(RichFormat.Italic);
compare(testHelper.checkFormatsAtCursor([RichFormat.Bold, RichFormat.Italic]), true);
testHelper.setCursorPosition(6);
compare(testHelper.checkFormatsAtCursor([]), true);
testHelper.mergeFormatOnCursor(RichFormat.Underline);
compare(testHelper.checkFormatsAtCursor([RichFormat.Underline]), true);
testHelper.setCursorPosition(9);
compare(testHelper.checkFormatsAtCursor([]), true);
testHelper.mergeFormatOnCursor(RichFormat.Strikethrough);
compare(testHelper.checkFormatsAtCursor([RichFormat.Strikethrough]), true);
textEdit.clear();
textEdit.insert(0, "heading");
testHelper.mergeFormatOnCursor(RichFormat.Heading1);
compare(testHelper.checkFormatsAtCursor([RichFormat.Bold, RichFormat.Heading1]), true);
testHelper.mergeFormatOnCursor(RichFormat.Heading2);
compare(testHelper.checkFormatsAtCursor([RichFormat.Bold, RichFormat.Heading2]), true);
testHelper.mergeFormatOnCursor(RichFormat.Paragraph);
compare(testHelper.checkFormatsAtCursor([]), true);
textEdit.clear();
textEdit.insert(0, "text");
testHelper.mergeFormatOnCursor(RichFormat.UnorderedList);
compare(testHelper.checkFormatsAtCursor([RichFormat.UnorderedList]), true);
compare(testHelper.markdownText(), "- text");
testHelper.mergeFormatOnCursor(RichFormat.OrderedList);
compare(testHelper.checkFormatsAtCursor([RichFormat.OrderedList]), true);
compare(testHelper.markdownText(), "1. text");
textEdit.clear();
}
function test_list(): void {
compare(testHelper.canIndentListMoreAtCursor(), true);
testHelper.indentListMoreAtCursor();
compare(testHelper.canIndentListMoreAtCursor(), true);
testHelper.indentListMoreAtCursor();
compare(testHelper.canIndentListMoreAtCursor(), true);
testHelper.indentListMoreAtCursor();
compare(testHelper.canIndentListMoreAtCursor(), false);
compare(testHelper.canIndentListLessAtCursor(), true);
testHelper.indentListLessAtCursor();
compare(testHelper.canIndentListLessAtCursor(), true);
testHelper.indentListLessAtCursor();
compare(testHelper.canIndentListLessAtCursor(), true);
testHelper.indentListLessAtCursor();
compare(testHelper.canIndentListLessAtCursor(), false);
}
function test_forceActiveFocus(): void {
textEdit2.forceActiveFocus();
compare(textEdit.activeFocus, false);
testHelper.forceActiveFocus();
compare(textEdit.activeFocus, true);
}
}

View File

@@ -0,0 +1,218 @@
// SPDX-FileCopyrightText: 2025 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#pragma once
#include <QObject>
#include <QQuickItem>
#include <QQuickTextDocument>
#include <QTextCursor>
#include <QTextDocumentFragment>
#include "chattextitemhelper.h"
class ChatTextItemHelperTestHelper : public QObject
{
Q_OBJECT
QML_ELEMENT
/**
* @brief The QML text Item the TextItemHelper is handling.
*/
Q_PROPERTY(ChatTextItemHelper *textItem READ textItem WRITE setTextItem NOTIFY textItemChanged)
public:
explicit ChatTextItemHelperTestHelper(QObject *parent = nullptr)
: QObject(parent)
{
}
ChatTextItemHelper *textItem() const
{
return m_textItem;
}
void setTextItem(ChatTextItemHelper *textItem)
{
if (textItem == m_textItem) {
return;
}
m_textItem = textItem;
Q_EMIT textItemChanged();
}
Q_INVOKABLE void setFixedChars(const QString &startChars, const QString &endChars)
{
if (!m_textItem) {
return;
}
m_textItem->setFixedChars(startChars, endChars);
}
Q_INVOKABLE bool compareDocuments(QQuickTextDocument *document)
{
if (!m_textItem) {
return false;
}
return document->textDocument() == m_textItem->document();
}
Q_INVOKABLE int lineCount()
{
if (!m_textItem) {
return -1;
}
return m_textItem->lineCount();
}
Q_INVOKABLE QString firstBlockText()
{
if (!m_textItem) {
return {};
}
return m_textItem->takeFirstBlock().toPlainText();
}
Q_INVOKABLE bool checkFragments(const QString &before, const QString &mid, const QString &after)
{
if (!m_textItem) {
return false;
}
bool hasBefore = false;
QTextDocumentFragment midFragment;
std::optional<QTextDocumentFragment> afterFragment = std::nullopt;
m_textItem->fillFragments(hasBefore, midFragment, afterFragment);
return hasBefore && m_textItem->document()->toPlainText() == before && midFragment.toPlainText() == mid && after.isEmpty()
? !afterFragment
: afterFragment->toPlainText() == after;
}
Q_INVOKABLE void insertFragment(const QString &text, ChatTextItemHelper::InsertPosition position = ChatTextItemHelper::Cursor, bool keepPosition = false)
{
if (!m_textItem) {
return;
}
const auto fragment = QTextDocumentFragment::fromPlainText(text);
m_textItem->insertFragment(fragment, position, keepPosition);
}
Q_INVOKABLE bool compareCursor(int cursorPosition, int selectionStart, int selectionEnd)
{
if (!m_textItem) {
return false;
}
const auto cursor = m_textItem->textCursor();
if (cursor.isNull()) {
return false;
}
const auto posSame = cursor.position() == cursorPosition;
const auto startSame = cursor.selectionStart() == selectionStart;
const auto endSame = cursor.selectionEnd() == selectionEnd;
return posSame && startSame && endSame;
}
Q_INVOKABLE int cursorPosition() const
{
if (!m_textItem) {
return -1;
}
return *m_textItem->cursorPosition();
}
Q_INVOKABLE void setCursorPosition(int pos)
{
if (!m_textItem) {
return;
}
m_textItem->setCursorPosition(pos);
}
Q_INVOKABLE void setCursorVisible(bool visible)
{
if (!m_textItem) {
return;
}
m_textItem->setCursorVisible(visible);
}
Q_INVOKABLE void setCursorFromTextItem(QQuickItem *item, bool infront, int cursorPos)
{
if (!m_textItem) {
return;
}
const auto textItem = new ChatTextItemHelper(this);
textItem->setTextItem(item);
textItem->setCursorPosition(cursorPos);
m_textItem->setCursorFromTextItem(textItem, infront);
textItem->deleteLater();
}
Q_INVOKABLE void mergeFormatOnCursor(RichFormat::Format format)
{
if (!m_textItem) {
return;
}
m_textItem->mergeFormatOnCursor(format);
}
Q_INVOKABLE bool checkFormatsAtCursor(QList<RichFormat::Format> formats)
{
const auto cursor = m_textItem->textCursor();
if (cursor.isNull()) {
return false;
}
return RichFormat::formatsAtCursor(cursor) == formats;
}
Q_INVOKABLE bool canIndentListMoreAtCursor() const
{
if (!m_textItem) {
return false;
}
return m_textItem->canIndentListMoreAtCursor();
}
Q_INVOKABLE bool canIndentListLessAtCursor() const
{
if (!m_textItem) {
return false;
}
return m_textItem->canIndentListLessAtCursor();
}
Q_INVOKABLE void indentListMoreAtCursor()
{
if (!m_textItem) {
return;
}
m_textItem->indentListMoreAtCursor();
}
Q_INVOKABLE void indentListLessAtCursor()
{
if (!m_textItem) {
return;
}
m_textItem->indentListLessAtCursor();
}
Q_INVOKABLE void forceActiveFocus() const
{
if (!m_textItem) {
return;
}
m_textItem->forceActiveFocus();
}
Q_INVOKABLE QString markdownText() const
{
if (!m_textItem) {
return {};
}
return m_textItem->markdownText();
}
Q_SIGNALS:
void textItemChanged();
private:
QPointer<ChatTextItemHelper> m_textItem;
};

View File

@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDNTCCAh2gAwIBAgIUXbyWfTfcvVLrVB1qx36pW/7IkwMwDQYJKoZIhvcNAQEL
BQAwQjELMAkGA1UEBhMCWFgxFTATBgNVBAcMDERlZmF1bHQgQ2l0eTEcMBoGA1UE
CgwTRGVmYXVsdCBDb21wYW55IEx0ZDAgFw0yNDEyMjQxNTAxMDNaGA8yNTcyMDcy
NDE1MDEwM1owQjELMAkGA1UEBhMCWFgxFTATBgNVBAcMDERlZmF1bHQgQ2l0eTEc
MBoGA1UECgwTRGVmYXVsdCBDb21wYW55IEx0ZDCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBAKlxZ540TQ1uUDAR7ZJ9ue0PzcD2dPmblIIddyekvZS59V7X
drhamclXpHE2EelR87Sexst0BaHH/jmrHwxCtwbeXHZ8ueJHkGHJ5DLZCCiwfG+Q
gml7wlSXxXz37vie2tdlZh2yJSM8yvLAYceHb2zOskaGvul7ZITIS0JrPc3o6VZk
+MYGkYtA2JfUsv3jH4oQbxOf7RXqhWNAXbB+3hlwRBwMIdyoBNK6YS9QSrTeS9jj
UqgO5QmaQZOVvpaPf1Y/rHHLd2Qa6+a/cCJ1sr2biagb75AihpQFsK/oy6D1PP70
zTe7hPWn/efEpmtCV7CQ8ti4cRu0Kjy0T8grtCsCAwEAAaMhMB8wHQYDVR0OBBYE
FIFlylzwADNLfgTDNkhFeFelaEDxMA0GCSqGSIb3DQEBCwUAA4IBAQBQ2rw4GLIU
v+GY7Qru9LttkrQPd2bZXKxDMd/jT+wjmMVtqS4MAsCuDYwaYLjU1aWyqy0mN+lY
A17kD0VjBNBy45sYqkZveY0ks8mCScBemtrIDmjz2tiueecBIEASwEPBOZgv5/MV
cz864FiChF+2r8Zl8bhycGy9DEpRjzYKvIQWSDHQ3zpuh3iBnjfoieLHWX2kKCpk
ouS3V6485rHNCWsZT5IcCwfBFQkOuWRJpIazpz4AfwZh1TK9+bgiKA5EyZjSNrKw
xGQSpMSTRQMB0/FOCL/AixhN9unVFUViqUcdtSfoHE1VyBHv9kDT/cYms/Xl4B0t
/ZSQJ/D/Km1+
-----END CERTIFICATE-----

View File

@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCpcWeeNE0NblAw
Ee2SfbntD83A9nT5m5SCHXcnpL2UufVe13a4WpnJV6RxNhHpUfO0nsbLdAWhx/45
qx8MQrcG3lx2fLniR5BhyeQy2QgosHxvkIJpe8JUl8V89+74ntrXZWYdsiUjPMry
wGHHh29szrJGhr7pe2SEyEtCaz3N6OlWZPjGBpGLQNiX1LL94x+KEG8Tn+0V6oVj
QF2wft4ZcEQcDCHcqATSumEvUEq03kvY41KoDuUJmkGTlb6Wj39WP6xxy3dkGuvm
v3AidbK9m4moG++QIoaUBbCv6Mug9Tz+9M03u4T1p/3nxKZrQlewkPLYuHEbtCo8
tE/IK7QrAgMBAAECggEAH9qmeKrra2F4KLlOGNKS//qPGz4Z+ozhi95/NpA1Zb7Z
3pUSCBFcROo5i2D3WA4kiymoRLpQjrv60puVcCggoWVvK4VCKsR6Y6/hOx/q9T9M
fWrE4ZC3FVEc+uPfZJT0nja9TkrdyXSV0LITD8Ap1eI7yJ9vR5R/bqj64QcpLMrU
QeoQIy1oTMR+qdjj33duyRwBZU3Yf8FRB2iW6OILZ8hzFo1jngec7dph9a1RK4e0
mEPdc9ywsKlDM7P0Y7zdmjar5XtQn87GiwNhz23f1fzCC2axLtOW0Xm4e4Qumehb
WrIi6Vfq8IWMglU7QrBJ7iR0Ls+XoKA5GxomV2IJZQKBgQDoIkOl5YGPQ3iGR+WK
e5/2Ml4G/uURzYiOlzSsyfoPXyO4EI2BJd5HkH+EvfgRx4xKkxUZRJdzR7llYPl8
BFYcFitvhO8SbD0mNAB5YW7f+3v1pgEN2umzoKd389Zx5WqTZ7YB1VG5RN/Q1JJL
2JM0Xgamq2vNtx3roRPxDBeW7QKBgQC63R/bmACJbgIzfaVBX4Zie3NQG0/Hf+gF
LnBwUmQDZOR7MY+kSiIUVMn3NuZRiCSCFBVwApruyK8r535JCibTVm5PWjvhFddY
LgaPOCKGlm9TLScjoH1pErYgG3uJ4nXeRfXhg4mco6EkrC7RzQywrd0VDoqpuc1Y
EKfEsYk8dwKBgE+mSh3nNOBKX1V73+f3aTiZqaeu2DyWkG+UtE9BclrJ40Cp9VPG
AZH+o7KRWEgJdzqzYv7riSfWCWgesRv7hOxYMwktzLY+i3DLUQpVAy05ZhwwnJX7
ckrfKfc/pGoqNLplUI8qecMfPciy14vMwR2r0Y5orTHFzi9mcqg35PQ1AoGAW2LX
OLq+0HdHhk0Va8I+450CSRQCUUvhed87SANTPEG0Z/dWC3/h6NWKrGdh/k+5oxAV
Z+EuSkdFPBCLt0bKtCKZ8h7sF+lplotz08kdQXsC2MfFU2wiySdIgK1QHp/tCxZl
6LM+sqdnoJrAjwRcB3AQJkMlV1ox7ba/hbdZqYMCgYBS6+JUXSSASpm5ZHd32a8m
xwryEZ7H6Hek6lvMHdxmwoKat5dCavxw64nrtyeeGZpg1W3zLLyamF9x/8kMyr6y
KKvtBfJ5sCvAbt80o9Pbs6R3yDB3AKiD3s3PQK7lol1nhE/8IbsF2r8JEQVcYd/k
oBzkl7MrMyLhhaCqSxwqQQ==
-----END PRIVATE KEY-----

View File

@@ -0,0 +1,438 @@
{
"account_data": {
"events": [
{
"content": {
"tags": {
"u.work": {
"order": 0.9
}
}
},
"type": "m.tag"
},
{
"content": {
"custom_config_key": "custom_config_value"
},
"type": "org.example.custom.room.config"
}
]
},
"ephemeral": {
"events": [
{
"content": {
"user_ids": [
"@alice:matrix.org",
"@bob:kde.org"
]
},
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"type": "m.typing"
},
{
"content": {
"$153456789:example.org": {
"m.read": {
"@alice:example.org": {
"ts": 1436451550453
}
}
}
},
"type": "m.receipt"
},
{
"content": {
"$1532735824654:example.org": {
"m.read": {
"@bob:kde.org": {
"ts": 1436451550453
}
}
}
},
"type": "m.receipt"
},
{
"content": {
"$1532735824654:example.org": {
"m.read": {
"@tim:example.com": {
"ts": 1436451550454
}
}
}
},
"type": "m.receipt"
},
{
"content": {
"$1532735824654:example.org": {
"m.read": {
"@tim2:example.com": {
"ts": 1436451550454
}
}
}
},
"type": "m.receipt"
},
{
"content": {
"$1532735824654:example.org": {
"m.read": {
"@jeff:example.com": {
"ts": 1436451550455
}
}
}
},
"type": "m.receipt"
},
{
"content": {
"$1532735824654:example.org": {
"m.read": {
"@tina:example.com": {
"ts": 1436451550456
}
}
}
},
"type": "m.receipt"
},
{
"content": {
"$1532735824654:example.org": {
"m.read": {
"@sally:example.com": {
"ts": 1436451550457
}
}
}
},
"type": "m.receipt"
},
{
"content": {
"$1532735824654:example.org": {
"m.read": {
"@fred:example.com": {
"ts": 1436451550458
}
}
}
},
"type": "m.receipt"
}
]
},
"state": {
"events": [
{
"content": {
"avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname": "Alice Margatroid",
"membership": "join",
"reason": "Looking for support"
},
"event_id": "$143273582443PhrSn:example.org",
"origin_server_ts": 1432735824653,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"state_key": "@alice:example.org",
"type": "m.room.member",
"unsigned": {
"age": 1234
}
},
{
"content": {
"avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname": "Bob",
"membership": "join"
},
"event_id": "$143273582443PhrSn:example.org",
"origin_server_ts": 1432735824653,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "bob:kde.org",
"state_key": "@bob:kde.org",
"type": "m.room.member",
"unsigned": {
"age": 1234
}
},
{
"content": {
"displayname": "Look\nat\nme\nI\nput\nnewlines\nin\nmy\ndisplay name",
"membership": "join"
},
"event_id": "$143273582443PhrSh:example.org",
"origin_server_ts": 1432735824659,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@newline:example.org",
"state_key": "@newline:example.org",
"type": "m.room.member",
"unsigned": {
"age": 12345
}
}
]
},
"summary": {
"m.heroes": [
"@alice:example.com",
"@bob:kde.org"
],
"m.invited_member_count": 0,
"m.joined_member_count": 2
},
"timeline": {
"events": [
{
"content": {
"body": "This is an example\ntext message",
"format": "org.matrix.custom.html",
"formatted_body": "<b>This is an example<br>text message</b>",
"msgtype": "m.text"
},
"event_id": "$153456789:example.org",
"origin_server_ts": 1432735824654,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 1232
}
},
{
"content": {
"avatar_url": "mxc://kde.org/123456",
"displayname": "after",
"membership": "join"
},
"origin_server_ts": 1690651134736,
"sender": "@example:example.org",
"state_key": "@example:example.org",
"type": "m.room.member",
"unsigned": {
"replaces_state": "$1234567890:example.org",
"prev_content": {
"avatar_url": "mxc://kde.org/12345",
"displayname": "before",
"membership": "join"
},
"prev_sender": "@example:example.orgg",
"age": 1234
},
"event_id": "$143273583553PhrSn:example.org",
"room_id": "!jEsUZKDJdhlrceRyVU:example.org"
},
{
"content": {
"body": "This is a highlight @bob:kde.org and this is a link https://kde.org",
"format": "org.matrix.custom.html",
"msgtype": "m.text"
},
"event_id": "$1532735824654:example.org",
"origin_server_ts": 1532735824654,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 1233
}
},
{
"content": {
"m.relates_to": {
"event_id": "$153456789:example.org",
"key": "👍",
"rel_type": "m.annotation"
}
},
"origin_server_ts": 1690322545182,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@alice:matrix.org",
"type": "m.reaction",
"unsigned": {
"age": 390159120
},
"event_id": "$163456789:example.org",
"age": 390159120
},
{
"age": 4926305285,
"content": {
"body": "video caption",
"filename": "video.mp4",
"info": {
"duration": 10,
"h": 1080,
"mimetype": "video/mp4",
"size": 62650636,
"w": 1920,
"thumbnail_info": {
"h": 450,
"mimetype": "image/jpeg",
"size": 382249,
"w": 800
},
"thumbnail_url": "mxc://kde.org/2234567"
},
"msgtype": "m.video",
"url": "mxc://kde.org/1234567"
},
"event_id": "$263456789:example.org",
"origin_server_ts": 1685793783330,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 4926305285
},
"user_id": "@example:example.org"
},
{
"content": {
"body": "> <@example:example.org> This is an example\ntext message\n\nreply",
"format": "org.matrix.custom.html",
"formatted_body": "<mx-reply><blockquote><a href=\"https://matrix.to/#/!jEsUZKDJdhlrceRyVU:example.org/$153456789:example.org?via=kde.org&via=matrix.org\">In reply to</a> <a href=\"https://matrix.to/#/@example:example.org\">@example:example.org</a><br><b>This is an example<br>text message</b></blockquote></mx-reply>reply",
"m.relates_to": {
"m.in_reply_to": {
"event_id": "$153456789:example.org"
}
},
"msgtype": "m.text"
},
"origin_server_ts": 1690725965572,
"sender": "@alice:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 98
},
"event_id": "$154456789:example.org",
"room_id": "!jEsUZKDJdhlrceRyVU:example.org"
},
{
"content": {
"body": "> <@example:example.org> video caption\n\nreply",
"m.relates_to": {
"m.in_reply_to": {
"event_id": "$263456789:example.org"
}
},
"msgtype": "m.text"
},
"origin_server_ts": 1690725965573,
"sender": "@alice:matrix.org",
"type": "m.room.message",
"unsigned": {
"age": 98
},
"event_id": "$154456799:example.org",
"room_id": "!jEsUZKDJdhlrceRyVU:example.org"
},
{
"age": 96845207,
"content": {
"body": "Lat: 51.7035, Lon: -1.14394",
"geo_uri": "geo:51.7035,-1.14394",
"msgtype": "m.location",
"org.matrix.msc1767.text": "Lat: 51.7035, Lon: -1.14394",
"org.matrix.msc3488.asset": {
"type": "m.pin"
},
"org.matrix.msc3488.location": {
"uri": "geo:51.7035,-1.14394"
}
},
"event_id": "$1544567999:example.org",
"origin_server_ts": 1690821582876,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 96845207
}
},
{
"content": {
"body": "Thread root",
"format": "org.matrix.custom.html",
"msgtype": "m.text"
},
"event_id": "$threadroot:example.org",
"origin_server_ts": 1690821582879,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 1232
}
},
{
"content": {
"body": "Thread message 1",
"msgtype": "m.text",
"m.relates_to": {
"rel_type": "m.thread",
"event_id": "$threadroot:example.org",
"m.in_reply_to": {
"event_id": "$threadroot:example.org"
},
"is_falling_back": true
}
},
"event_id": "$threadmessage1:example.org",
"origin_server_ts": 1690821582890,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 1238
}
},
{
"content": {
"body": "Thread message 2",
"msgtype": "m.text",
"m.relates_to": {
"rel_type": "m.thread",
"event_id": "$threadroot:example.org",
"m.in_reply_to": {
"event_id": "$threadmessage1:example.org"
},
"is_falling_back": true
}
},
"event_id": "$threadmessage2:example.org",
"origin_server_ts": 1690821582890,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 1238
}
},
{
"content": {
"body": "A message from someone who thought it was a good idea to put newlines in their display name.",
"msgtype": "m.text"
},
"event_id": "$153456889:example.org",
"origin_server_ts": 14327358246589,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@newline:example.org",
"type": "m.room.message",
"unsigned": {
"age": 1230
}
}
],
"limited": true,
"prev_batch": "t34-23535_0_0"
}
}

View File

@@ -0,0 +1,24 @@
{
"timeline": {
"events": [
{
"content": {
"body": "https://kde.org",
"format": "org.matrix.custom.html",
"formatted_body": "https://kde.org",
"msgtype": "m.text"
},
"origin_server_ts": 1704648567967,
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 112
},
"event_id": "$validlink:example.org",
"room_id": "!test:example.org"
}
],
"limited": true,
"prev_batch": "t34-23535_0_0"
}
}

View File

@@ -0,0 +1,35 @@
{
"timeline": {
"events": [
{
"content": {
"body": "* ",
"format": "org.matrix.custom.html",
"formatted_body": "no link",
"m.new_content": {
"body": "",
"format": "org.matrix.custom.html",
"formatted_body": "no link",
"msgtype": "m.text"
},
"m.relates_to": {
"event_id": "$validlink:example.org",
"rel_type": "m.replace"
},
"msgtype": "m.text",
"type": "m.room.message"
},
"origin_server_ts": 1704648614969,
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 65
},
"event_id": "$nolink:example.org",
"room_id": "!test:example.org"
}
],
"limited": true,
"prev_batch": "t34-23535_0_0"
}
}

View File

@@ -0,0 +1,105 @@
{
"account_data": {
"events": [
{
"content": {
"tags": {
"u.work": {
"order": 0.9
}
}
},
"type": "m.tag"
},
{
"content": {
"custom_config_key": "custom_config_value"
},
"type": "org.example.custom.room.config"
}
]
},
"ephemeral": {
"events": [
{
"content": {
"user_ids": [
"@alice:matrix.org",
"@bob:example.com"
]
},
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"type": "m.typing"
}
]
},
"state": {
"events": [
{
"content": {
"displayname": "Example",
"membership": "join"
},
"event_id": "$exampleMember:example.org",
"origin_server_ts": 1432735824653,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"state_key": "@example:example.org",
"type": "m.room.member",
"unsigned": {
"age": 1234
}
}
]
},
"summary": {
"m.heroes": [
"@example:example.org"
],
"m.invited_member_count": 0,
"m.joined_member_count": 2
},
"timeline": {
"events": [
{
"content": {
"body": "This is an example\ntext message",
"format": "org.matrix.custom.html",
"formatted_body": "<b>This is an example<br>text message</b>",
"msgtype": "m.text"
},
"event_id": "$153456789:example.org",
"origin_server_ts": 1,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 1232
}
},
{
"content": {
"displayname": "Example Changed",
"membership": "join"
},
"event_id": "$exampleMemberChnage:example.org",
"origin_server_ts": 2,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"state_key": "@example:example.org",
"type": "m.room.member",
"unsigned": {
"replaces_state": "$exampleMember:example.org",
"prev_content": {
"displayname": "Example",
"membership": "join"
},
"prev_sender": "@example:example.org",
"age": 1234
}
}
],
"limited": true,
"prev_batch": "t34-23535_0_0"
}
}

View File

@@ -0,0 +1,130 @@
{
"account_data": {
"events": [
{
"content": {
"tags": {
"u.work": {
"order": 0.9
}
}
},
"type": "m.tag"
},
{
"content": {
"custom_config_key": "custom_config_value"
},
"type": "org.example.custom.room.config"
}
]
},
"ephemeral": {
"events": [
{
"content": {
"user_ids": [
"@alice:matrix.org",
"@bob:example.com"
]
},
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"type": "m.typing"
}
]
},
"state": {
"events": [
{
"content": {
"displayname": "Example",
"membership": "join"
},
"event_id": "$143273582443PhrSn:example.org",
"origin_server_ts": 1432735824653,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"state_key": "@example:example.org",
"type": "m.room.member",
"unsigned": {
"age": 1234
}
},
{
"content": {
"displayname": "Bob",
"membership": "join"
},
"event_id": "$143273blorb3PhrSn:example.org",
"origin_server_ts": 1432735824653,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@bob:kde.org",
"state_key": "@bob:kde.org",
"type": "m.room.member",
"unsigned": {
"age": 1234
}
},
{
"content": {
"displayname": "Invited",
"membership": "invite"
},
"event_id": "$asdfpj443PhrSn:example.org",
"origin_server_ts": 1432735824653,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"state_key": "@invited:example.com",
"type": "m.room.member",
"unsigned": {
"age": 1234
}
},
{
"content": {
"displayname": "Banned",
"membership": "ban"
},
"event_id": "$asdfpj443PhrSnasfd:example.org",
"origin_server_ts": 1432735824653,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@banned:example.com",
"state_key": "@banned:example.com",
"type": "m.room.member",
"unsigned": {
"age": 1234
}
}
]
},
"summary": {
"m.heroes": [
"@alice:example.com",
"@bob:example.com"
],
"m.invited_member_count": 1,
"m.joined_member_count": 2
},
"timeline": {
"events": [
{
"content": {
"body": "This is an example\ntext message",
"format": "org.matrix.custom.html",
"formatted_body": "<b>This is an example<br>text message</b>",
"msgtype": "m.text"
},
"event_id": "$153456789:example.org",
"origin_server_ts": 1432735824654,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 1232
}
}
],
"limited": true,
"prev_batch": "t34-23535_0_0"
}
}

View File

@@ -0,0 +1,14 @@
{
"content": {
"body": "www.example.org https://kde.org",
"msgtype": "m.text"
},
"event_id": "$validlink1:example.org",
"origin_server_ts": 1432735824654,
"room_id": "!test:example.org",
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 1234
}
}

View File

@@ -0,0 +1,22 @@
{
"timeline": {
"events": [
{
"content": {
"body": "New plain message",
"msgtype": "m.text"
},
"event_id": "$pendingmerge:example.org",
"origin_server_ts": 123456,
"room_id":"#myroom:kde.org",
"sender":"@bob:kde.org",
"type":"m.room.message",
"unsigned": {
"transaction_id": "17017181543521"
}
}
],
"limited": true,
"prev_batch": "t34-23535_0_0"
}
}

View File

@@ -0,0 +1,38 @@
{
"timeline": {
"events": [
{
"content": {
"org.matrix.msc1767.text": "test\n1. option1\n2. option 2",
"org.matrix.msc3381.poll.start": {
"answers": [
{
"id": "option1",
"org.matrix.msc1767.text": "option1text"
},
{
"id": "option2",
"org.matrix.msc1767.text": "option2text"
}
],
"kind": "org.matrix.msc3381.poll.undisclosed",
"max_selections": 1,
"question": {
"body": "test",
"msgtype": "m.text",
"org.matrix.msc1767.text": "test"
}
}
},
"event_id": "$153456789:example.org",
"origin_server_ts": 1432735824654,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"type": "org.matrix.msc3381.poll.start",
"unsigned": {
"age": 1232
}
}
]
}
}

View File

@@ -0,0 +1,44 @@
{
"timeline": {
"events": [
{
"content": {
"m.relates_to": {
"event_id": "$153456789:example.org",
"key": "👍",
"rel_type": "m.annotation"
}
},
"origin_server_ts": 1690322545183,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@bob:example.org",
"type": "m.reaction",
"unsigned": {
"age": 390159121
},
"event_id": "$163456790:example.org",
"age": 390159121
},
{
"content": {
"m.relates_to": {
"event_id": "$153456789:example.org",
"key": "😆",
"rel_type": "m.annotation"
}
},
"origin_server_ts": 1690322545184,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@bob:example.org",
"type": "m.reaction",
"unsigned": {
"age": 390159122
},
"event_id": "$163456791:example.org",
"age": 390159122
}
],
"limited": true,
"prev_batch": "t34-23535_0_0"
}
}

View File

@@ -0,0 +1,220 @@
{
"account_data": {
"events": [
{
"content": {
"tags": {
"u.work": {
"order": 0.9
}
}
},
"type": "m.tag"
},
{
"content": {
"custom_config_key": "custom_config_value"
},
"type": "org.example.custom.room.config"
}
]
},
"ephemeral": {
"events": [
{
"content": {
"user_ids": [
"@alice:matrix.org",
"@bob:example.com"
]
},
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"type": "m.typing"
},
{
"content": {
"$153456789:example.org": {
"m.read": {
"@alice:matrix.org": {
"ts": 1436451550453
}
}
}
},
"type": "m.receipt"
},
{
"content": {
"$1532735824654:example.org": {
"m.read": {
"@bob:example.com": {
"ts": 1436451550453
}
}
}
},
"type": "m.receipt"
},
{
"content": {
"$1532735824654:example.org": {
"m.read": {
"@tim:example.com": {
"ts": 1436451550454
}
}
}
},
"type": "m.receipt"
},
{
"content": {
"$1532735824654:example.org": {
"m.read": {
"@jeff:example.com": {
"ts": 1436451550455
}
}
}
},
"type": "m.receipt"
},
{
"content": {
"$1532735824654:example.org": {
"m.read": {
"@tina:example.com": {
"ts": 1436451550456
}
}
}
},
"type": "m.receipt"
},
{
"content": {
"$1532735824654:example.org": {
"m.read": {
"@sally:example.com": {
"ts": 1436451550457
}
}
}
},
"type": "m.receipt"
},
{
"content": {
"$1532735824654:example.org": {
"m.read": {
"@fred:example.com": {
"ts": 1436451550458
}
}
}
},
"type": "m.receipt"
}
]
},
"state": {
"events": [
{
"content": {
"avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname": "Alice Margatroid",
"membership": "join",
"reason": "Looking for support"
},
"event_id": "$143273582443PhrSn:example.org",
"origin_server_ts": 1432735824653,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"state_key": "@alice:matrix.org",
"type": "m.room.member",
"unsigned": {
"age": 1234
}
},
{
"content": {
"avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname": "Bob",
"membership": "join"
},
"event_id": "$143273582443PhrSn:example.org",
"origin_server_ts": 1432735824653,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "bob:example.org",
"state_key": "@bob:example.org",
"type": "m.room.member",
"unsigned": {
"age": 1234
}
},
{
"content": {
"displayname": "Look\nat\nme\nI\nput\nnewlines\nin\nmy\ndisplay name",
"membership": "join"
},
"event_id": "$143273582443PhrSh:example.org",
"origin_server_ts": 1432735824659,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@newline:example.org",
"state_key": "@newline:example.org",
"type": "m.room.member",
"unsigned": {
"age": 12345
}
}
]
},
"summary": {
"m.heroes": [
"@alice:example.com",
"@bob:example.com"
],
"m.invited_member_count": 0,
"m.joined_member_count": 2
},
"timeline": {
"events": [
{
"content": {
"body": "This is an example\ntext message",
"format": "org.matrix.custom.html",
"formatted_body": "<b>This is an example<br>text message</b>",
"msgtype": "m.text"
},
"event_id": "$153456789:example.org",
"origin_server_ts": 1432735824654,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 1232
}
},
{
"content": {
"m.relates_to": {
"event_id": "$153456789:example.org",
"key": "👍",
"rel_type": "m.annotation"
}
},
"origin_server_ts": 1690322545182,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@alice:matrix.org",
"type": "m.reaction",
"unsigned": {
"age": 390159120
},
"event_id": "$163456789:example.org",
"age": 390159120
}
],
"limited": true,
"prev_batch": "t34-23535_0_0"
}
}

View File

@@ -0,0 +1,139 @@
{
"account_data": {
"events": [
{
"content": {
"tags": {
"u.work": {
"order": 0.9
}
}
},
"type": "m.tag"
},
{
"content": {
"custom_config_key": "custom_config_value"
},
"type": "org.example.custom.room.config"
}
]
},
"ephemeral": {
"events": [
{
"content": {
"user_ids": [
"@alice:matrix.org",
"@bob:example.com"
]
},
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"type": "m.typing"
}
]
},
"state": {
"events": [
{
"content": {
"avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF",
"displayname": "Alice Margatroid",
"membership": "join",
"reason": "Looking for support"
},
"event_id": "$143273582443PhrSn:example.org",
"origin_server_ts": 1432735824653,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"state_key": "@alice:example.org",
"type": "m.room.member",
"unsigned": {
"age": 1234
}
},
{
"content": {
"displayname": "Example",
"membership": "join"
},
"event_id": "$143273582443PhrSn:example.org",
"origin_server_ts": 1432735824653,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"state_key": "@example:example.org",
"type": "m.room.member",
"unsigned": {
"age": 1234
}
}
]
},
"summary": {
"m.heroes": [
"@alice:example.com",
"@bob:example.com"
],
"m.invited_member_count": 0,
"m.joined_member_count": 2
},
"timeline": {
"events": [
{
"content": {
"body": "This is an **example** text message",
"format": "org.matrix.custom.html",
"formatted_body": "<b>This is an example text message</b>",
"msgtype": "m.text"
},
"event_id": "$143273582443PhrSn:example.org",
"origin_server_ts": 1432735824654,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 1232
}
},
{
"content": {
"body": "/me This is an emote.",
"format": "org.matrix.custom.html",
"formatted_body": "This is an emote.",
"msgtype": "m.emote"
},
"event_id": "$153273582443PhrSn:example.org",
"origin_server_ts": 1532735824654,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 1231
}
},
{
"content": {
"body": "tested",
"msgtype": "m.text"
},
"event_id": "$zrCiBxBnqqTn0Z5FY78qSZAszno_w8nJJXzfBULG-3E",
"origin_server_ts": 1680948575928,
"room_id": "!jEsUZKDJdhlrceRyVU:example.org",
"sender": "@example:example.org",
"type": "m.room.message",
"unsigned": {
"age": 1747776,
"m.relations": {
"m.replace": {
"event_id": "$UX0PlpyI7vYO32iHMuuYEP7ECMh4sX3XLGiB2SwM4mQ",
"origin_server_ts": 1680948580992,
"sender": "@example:example.org"
}
}
}
}
],
"limited": true,
"prev_batch": "t34-23535_0_0"
}
}

View File

@@ -0,0 +1,165 @@
// SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QObject>
#include <QQuickItem>
#include <QTest>
#include "delegatesizehelper.h"
class DelegateSizeHelperTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void risingPercentage_data();
void risingPercentage();
void fallingPercentage_data();
void fallingPercentage();
void equalPercentage_data();
void equalPercentage();
void equalBreakpoint_data();
void equalBreakpoint();
};
void DelegateSizeHelperTest::risingPercentage_data()
{
QTest::addColumn<qreal>("parentWidth");
QTest::addColumn<int>("currentPercentageWidth");
QTest::addColumn<qreal>("currentWidth");
QTest::newRow("zero") << qreal(0) << int(100) << qreal(0);
QTest::newRow("one hundred") << qreal(100) << int(0) << qreal(0);
QTest::newRow("one fifty") << qreal(150) << int(50) << qreal(75);
QTest::newRow("two hundred") << qreal(200) << int(100) << qreal(200);
QTest::newRow("three hundred") << qreal(300) << int(100) << qreal(300);
}
void DelegateSizeHelperTest::risingPercentage()
{
QFETCH(qreal, parentWidth);
QFETCH(int, currentPercentageWidth);
QFETCH(qreal, currentWidth);
auto item = QQuickItem();
item.setWidth(parentWidth);
DelegateSizeHelper delegateSizeHelper;
delegateSizeHelper.setParentItem(&item);
delegateSizeHelper.setStartBreakpoint(100);
delegateSizeHelper.setEndBreakpoint(200);
delegateSizeHelper.setStartPercentWidth(0);
delegateSizeHelper.setEndPercentWidth(100);
QCOMPARE(delegateSizeHelper.availablePercentageWidth(), currentPercentageWidth);
QCOMPARE(delegateSizeHelper.availableWidth(), currentWidth);
}
void DelegateSizeHelperTest::fallingPercentage_data()
{
QTest::addColumn<qreal>("parentWidth");
QTest::addColumn<int>("currentPercentageWidth");
QTest::addColumn<qreal>("currentWidth");
QTest::newRow("zero") << qreal(0) << int(100) << qreal(0);
QTest::newRow("one hundred") << qreal(100) << int(100) << qreal(100);
QTest::newRow("one fifty") << qreal(150) << int(50) << qreal(75);
QTest::newRow("two hundred") << qreal(200) << int(0) << qreal(0);
QTest::newRow("three hundred") << qreal(300) << int(0) << qreal(0);
}
void DelegateSizeHelperTest::fallingPercentage()
{
QFETCH(qreal, parentWidth);
QFETCH(int, currentPercentageWidth);
QFETCH(qreal, currentWidth);
auto item = QQuickItem();
item.setWidth(parentWidth);
DelegateSizeHelper delegateSizeHelper;
delegateSizeHelper.setParentItem(&item);
delegateSizeHelper.setStartBreakpoint(100);
delegateSizeHelper.setEndBreakpoint(200);
delegateSizeHelper.setStartPercentWidth(100);
delegateSizeHelper.setEndPercentWidth(0);
QCOMPARE(delegateSizeHelper.availablePercentageWidth(), currentPercentageWidth);
QCOMPARE(delegateSizeHelper.availableWidth(), currentWidth);
}
void DelegateSizeHelperTest::equalPercentage_data()
{
QTest::addColumn<qreal>("parentWidth");
QTest::addColumn<int>("currentPercentageWidth");
QTest::addColumn<qreal>("currentWidth");
QTest::newRow("zero") << qreal(0) << int(50) << qreal(0);
QTest::newRow("one hundred") << qreal(100) << int(50) << qreal(50);
QTest::newRow("one fifty") << qreal(150) << int(50) << qreal(75);
QTest::newRow("two hundred") << qreal(200) << int(50) << qreal(100);
QTest::newRow("three hundred") << qreal(300) << int(50) << qreal(150);
}
void DelegateSizeHelperTest::equalPercentage()
{
QFETCH(qreal, parentWidth);
QFETCH(int, currentPercentageWidth);
QFETCH(qreal, currentWidth);
auto item = QQuickItem();
item.setWidth(parentWidth);
DelegateSizeHelper delegateSizeHelper;
delegateSizeHelper.setParentItem(&item);
delegateSizeHelper.setStartBreakpoint(100);
delegateSizeHelper.setEndBreakpoint(200);
delegateSizeHelper.setStartPercentWidth(50);
delegateSizeHelper.setEndPercentWidth(50);
QCOMPARE(delegateSizeHelper.availablePercentageWidth(), currentPercentageWidth);
QCOMPARE(delegateSizeHelper.availableWidth(), currentWidth);
}
void DelegateSizeHelperTest::equalBreakpoint_data()
{
QTest::addColumn<int>("startPercentageWidth");
QTest::addColumn<int>("endPercentageWidth");
QTest::addColumn<int>("currentPercentageWidth");
QTest::addColumn<qreal>("currentWidth");
QTest::newRow("start higher") << int(100) << int(0) << int(100) << qreal(1000);
QTest::newRow("equal") << int(50) << int(50) << int(50) << qreal(500);
QTest::newRow("end higher") << int(0) << int(100) << int(100) << qreal(1000);
}
/**
* We expect a default return except in the case where the two percentages are
* equal as that case can be calculated without dividing by zero.
*/
void DelegateSizeHelperTest::equalBreakpoint()
{
QFETCH(int, startPercentageWidth);
QFETCH(int, endPercentageWidth);
QFETCH(int, currentPercentageWidth);
QFETCH(qreal, currentWidth);
auto item = QQuickItem();
item.setWidth(1000);
DelegateSizeHelper delegateSizeHelper;
delegateSizeHelper.setParentItem(&item);
delegateSizeHelper.setStartBreakpoint(100);
delegateSizeHelper.setEndBreakpoint(100);
delegateSizeHelper.setStartPercentWidth(startPercentageWidth);
delegateSizeHelper.setEndPercentWidth(endPercentageWidth);
QCOMPARE(delegateSizeHelper.availablePercentageWidth(), currentPercentageWidth);
QCOMPARE(delegateSizeHelper.availableWidth(), currentWidth);
}
QTEST_GUILESS_MAIN(DelegateSizeHelperTest)
#include "delegatesizehelpertest.moc"

View File

@@ -0,0 +1,307 @@
// SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QObject>
#include <QTest>
#include "eventhandler.h"
#include <KFormat>
#include <Quotient/connection.h>
#include <Quotient/quotient_common.h>
#include <Quotient/syncdata.h>
#include <qcbormap.h>
#include <qtestcase.h>
#include "linkpreviewer.h"
#include "models/reactionmodel.h"
#include "neochatroom.h"
#include "utils.h"
#include "testutils.h"
using namespace Quotient;
class EventHandlerTest : public QObject
{
Q_OBJECT
private:
Connection *connection = nullptr;
TestUtils::TestRoom *room = nullptr;
private Q_SLOTS:
void initTestCase();
void authorDisplayName();
void nullAuthorDisplayName();
void singleLineSidplayName();
void nullSingleLineDisplayName();
void time();
void nullTime();
void highlighted();
void nullHighlighted();
void hidden();
void nullHidden();
void body();
void nullBody();
void genericBody_data();
void genericBody();
void nullGenericBody();
void markdownBody();
void markdownBodyReply();
void subtitle();
void nullSubtitle();
void mediaInfo();
void nullMediaInfo();
void replyAuthor();
void nullReplyAuthor();
void location();
void nullLocation();
};
void EventHandlerTest::initTestCase()
{
connection = Connection::makeMockConnection(u"@bob:kde.org"_s);
room = new TestUtils::TestRoom(connection, u"#myroom:kde.org"_s, u"test-eventhandler-sync.json"_s);
}
void EventHandlerTest::authorDisplayName()
{
QCOMPARE(EventHandler::authorDisplayName(room, room->messageEvents().at(1).get()), u"before"_s);
}
void EventHandlerTest::nullAuthorDisplayName()
{
QTest::ignoreMessage(QtWarningMsg, "authorDisplayName called with room set to nullptr.");
QCOMPARE(EventHandler::authorDisplayName(nullptr, nullptr), QString());
QTest::ignoreMessage(QtWarningMsg, "authorDisplayName called with event set to nullptr.");
QCOMPARE(EventHandler::authorDisplayName(room, nullptr), QString());
}
void EventHandlerTest::singleLineSidplayName()
{
QCOMPARE(EventHandler::singleLineAuthorDisplayname(room, room->messageEvents().at(11).get()), "Look at me I put newlines in my display name"_L1);
}
void EventHandlerTest::nullSingleLineDisplayName()
{
QTest::ignoreMessage(QtWarningMsg, "singleLineAuthorDisplayname called with room set to nullptr.");
QCOMPARE(EventHandler::singleLineAuthorDisplayname(nullptr, nullptr), QString());
QTest::ignoreMessage(QtWarningMsg, "singleLineAuthorDisplayname called with event set to nullptr.");
QCOMPARE(EventHandler::singleLineAuthorDisplayname(room, nullptr), QString());
}
void EventHandlerTest::time()
{
const auto event = room->messageEvents().at(0).get();
QCOMPARE(EventHandler::dateTime(room, event), QDateTime::fromMSecsSinceEpoch(1432735824654, QTimeZone(QTimeZone::UTC)));
const auto txID = room->postJson("m.room.message"_L1, event->fullJson());
QCOMPARE(room->pendingEvents().size(), 1);
const auto pendingIt = room->findPendingEvent(txID);
QCOMPARE(EventHandler::dateTime(room, pendingIt->event(), true), pendingIt->lastUpdated());
room->discardMessage(txID);
QCOMPARE(room->pendingEvents().size(), 0);
}
void EventHandlerTest::nullTime()
{
QTest::ignoreMessage(QtWarningMsg, "time called with room set to nullptr.");
QCOMPARE(EventHandler::dateTime(nullptr, nullptr), QDateTime());
QTest::ignoreMessage(QtWarningMsg, "time called with event set to nullptr.");
QCOMPARE(EventHandler::dateTime(room, nullptr), QDateTime());
}
void EventHandlerTest::highlighted()
{
QCOMPARE(EventHandler::isHighlighted(room, room->messageEvents().at(2).get()), true);
QCOMPARE(EventHandler::isHighlighted(room, room->messageEvents().at(0).get()), false);
}
void EventHandlerTest::nullHighlighted()
{
QTest::ignoreMessage(QtWarningMsg, "isHighlighted called with room set to nullptr.");
QCOMPARE(EventHandler::isHighlighted(nullptr, nullptr), false);
QTest::ignoreMessage(QtWarningMsg, "isHighlighted called with event set to nullptr.");
QCOMPARE(EventHandler::isHighlighted(room, nullptr), false);
}
void EventHandlerTest::hidden()
{
QCOMPARE(EventHandler::isHidden(room, room->messageEvents().at(3).get()), true);
QCOMPARE(EventHandler::isHidden(room, room->messageEvents().at(0).get()), false);
}
void EventHandlerTest::nullHidden()
{
QTest::ignoreMessage(QtWarningMsg, "isHidden called with room set to nullptr.");
QCOMPARE(EventHandler::isHidden(nullptr, nullptr), false);
QTest::ignoreMessage(QtWarningMsg, "isHidden called with event set to nullptr.");
QCOMPARE(EventHandler::isHidden(room, nullptr), false);
}
void EventHandlerTest::body()
{
const auto event = room->messageEvents().at(0).get();
QCOMPARE(EventHandler::richBody(room, event), u"<b>This is an example<br>text message</b>"_s);
QCOMPARE(EventHandler::richBody(room, event, true), u"<b>This is an example text message</b>"_s);
QCOMPARE(EventHandler::plainBody(room, event), u"This is an example\ntext message"_s);
QCOMPARE(EventHandler::plainBody(room, event, true), u"This is an example text message"_s);
}
void EventHandlerTest::nullBody()
{
QTest::ignoreMessage(QtWarningMsg, "richBody called with room set to nullptr.");
QCOMPARE(EventHandler::richBody(nullptr, nullptr), QString());
QTest::ignoreMessage(QtWarningMsg, "richBody called with event set to nullptr.");
QCOMPARE(EventHandler::richBody(room, nullptr), QString());
QTest::ignoreMessage(QtWarningMsg, "plainBody called with room set to nullptr.");
QCOMPARE(EventHandler::plainBody(nullptr, nullptr), QString());
QTest::ignoreMessage(QtWarningMsg, "plainBody called with event set to nullptr.");
QCOMPARE(EventHandler::plainBody(room, nullptr), QString());
}
void EventHandlerTest::genericBody_data()
{
QTest::addColumn<int>("eventNum");
QTest::addColumn<QString>("output");
QTest::newRow("message") << 0 << u"<a href=\"https://matrix.to/#/@example:example.org\">after</a> sent a message"_s;
QTest::newRow("member") << 1 << u"<a href=\"https://matrix.to/#/@example:example.org\">after</a> changed their display name and updated their avatar"_s;
QTest::newRow("message 2") << 2 << u"<a href=\"https://matrix.to/#/@example:example.org\">after</a> sent a message"_s;
QTest::newRow("reaction") << 3 << u"Unknown event"_s;
QTest::newRow("video") << 4 << u"<a href=\"https://matrix.to/#/@example:example.org\">after</a> sent a message"_s;
}
void EventHandlerTest::genericBody()
{
QFETCH(int, eventNum);
QFETCH(QString, output);
QCOMPARE(EventHandler::genericBody(room, room->messageEvents().at(eventNum).get()), output);
}
void EventHandlerTest::nullGenericBody()
{
QTest::ignoreMessage(QtWarningMsg, "genericBody called with room set to nullptr.");
QCOMPARE(EventHandler::genericBody(nullptr, nullptr), QString());
QTest::ignoreMessage(QtWarningMsg, "genericBody called with event set to nullptr.");
QCOMPARE(EventHandler::genericBody(room, nullptr), QString());
}
void EventHandlerTest::markdownBody()
{
QCOMPARE(EventHandler::markdownBody(room->messageEvents().at(0).get()), u"This is an example\ntext message"_s);
}
void EventHandlerTest::markdownBodyReply()
{
QCOMPARE(EventHandler::markdownBody(room->messageEvents().at(5).get()), u"reply"_s);
}
void EventHandlerTest::subtitle()
{
QCOMPARE(EventHandler::subtitleText(room, room->messageEvents().at(0).get()), u"after: This is an example text message"_s);
QCOMPARE(EventHandler::subtitleText(room, room->messageEvents().at(2).get()),
u"after: This is a highlight @bob:kde.org and this is a link https://kde.org"_s);
}
void EventHandlerTest::nullSubtitle()
{
QTest::ignoreMessage(QtWarningMsg, "subtitleText called with room set to nullptr.");
QCOMPARE(EventHandler::subtitleText(nullptr, nullptr), QString());
QTest::ignoreMessage(QtWarningMsg, "subtitleText called with event set to nullptr.");
QCOMPARE(EventHandler::subtitleText(room, nullptr), QString());
}
void EventHandlerTest::mediaInfo()
{
auto event = room->messageEvents().at(4).get();
auto mediaInfo = EventHandler::mediaInfo(room, event);
auto thumbnailInfo = mediaInfo["tempInfo"_L1].toMap();
QCOMPARE(mediaInfo["source"_L1], room->makeMediaUrl(event->id(), QUrl("mxc://kde.org/1234567"_L1)));
QCOMPARE(mediaInfo["mimeType"_L1], u"video/mp4"_s);
QCOMPARE(mediaInfo["mimeIcon"_L1], u"video-mp4"_s);
QCOMPARE(mediaInfo["size"_L1], 62650636);
QCOMPARE(mediaInfo["duration"_L1], 10);
QCOMPARE(mediaInfo["width"_L1], 1920);
QCOMPARE(mediaInfo["height"_L1], 1080);
QCOMPARE(thumbnailInfo["source"_L1], room->makeMediaUrl(event->id(), QUrl("mxc://kde.org/2234567"_L1)));
QCOMPARE(thumbnailInfo["mimeType"_L1], u"image/jpeg"_s);
QCOMPARE(thumbnailInfo["mimeIcon"_L1], u"image-jpeg"_s);
QCOMPARE(thumbnailInfo["size"_L1], 382249);
QCOMPARE(thumbnailInfo["width"_L1], 800);
QCOMPARE(thumbnailInfo["height"_L1], 450);
}
void EventHandlerTest::nullMediaInfo()
{
QTest::ignoreMessage(QtWarningMsg, "mediaInfo called with room set to nullptr.");
QCOMPARE(EventHandler::mediaInfo(nullptr, nullptr), QVariantMap());
QTest::ignoreMessage(QtWarningMsg, "mediaInfo called with event set to nullptr.");
QCOMPARE(EventHandler::mediaInfo(room, nullptr), QVariantMap());
}
void EventHandlerTest::replyAuthor()
{
auto replyEvent = room->messageEvents().at(0).get();
auto replyAuthor = room->member(replyEvent->senderId());
auto eventHandlerReplyAuthor = EventHandler::replyAuthor(room, room->messageEvents().at(5).get());
QCOMPARE(eventHandlerReplyAuthor.isLocalMember(), replyAuthor.id() == room->localMember().id());
QCOMPARE(eventHandlerReplyAuthor.id(), replyAuthor.id());
QCOMPARE(eventHandlerReplyAuthor.displayName(), replyAuthor.displayName());
QCOMPARE(eventHandlerReplyAuthor.avatarUrl(), replyAuthor.avatarUrl());
QCOMPARE(eventHandlerReplyAuthor.avatarMediaId(), replyAuthor.avatarMediaId());
QCOMPARE(eventHandlerReplyAuthor.color(), replyAuthor.color());
QCOMPARE(EventHandler::replyAuthor(room, room->messageEvents().at(0).get()), RoomMember());
}
void EventHandlerTest::nullReplyAuthor()
{
QTest::ignoreMessage(QtWarningMsg, "replyAuthor called with room set to nullptr.");
QCOMPARE(EventHandler::replyAuthor(nullptr, nullptr), RoomMember());
QTest::ignoreMessage(QtWarningMsg, "replyAuthor called with event set to nullptr. Returning empty user.");
QCOMPARE(EventHandler::replyAuthor(room, nullptr), RoomMember());
}
void EventHandlerTest::location()
{
QCOMPARE(EventHandler::latitude(room->messageEvents().at(7).get()), u"51.7035"_s.toFloat());
QCOMPARE(EventHandler::longitude(room->messageEvents().at(7).get()), u"-1.14394"_s.toFloat());
QCOMPARE(EventHandler::locationAssetType(room->messageEvents().at(7).get()), u"m.pin"_s);
}
void EventHandlerTest::nullLocation()
{
QTest::ignoreMessage(QtWarningMsg, "latitude called with event set to nullptr.");
QCOMPARE(EventHandler::latitude(nullptr), -100.0);
QTest::ignoreMessage(QtWarningMsg, "longitude called with event set to nullptr.");
QCOMPARE(EventHandler::longitude(nullptr), -200.0);
QTest::ignoreMessage(QtWarningMsg, "locationAssetType called with event set to nullptr.");
QCOMPARE(EventHandler::locationAssetType(nullptr), QString());
}
QTEST_MAIN(EventHandlerTest)
#include "eventhandlertest.moc"

View File

@@ -0,0 +1,91 @@
// SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QObject>
#include <QTest>
#include "linkpreviewer.h"
#include "utils.h"
#include <Quotient/events/roommessageevent.h>
#include <Quotient/quotient_common.h>
#include <Quotient/syncdata.h>
#include "testutils.h"
using namespace Quotient;
class LinkPreviewerTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void linkPreviewsMatch_data();
void linkPreviewsMatch();
void multipleLinkPreviewsMatch_data();
void multipleLinkPreviewsMatch();
void linkPreviewsReject_data();
void linkPreviewsReject();
};
void LinkPreviewerTest::linkPreviewsMatch_data()
{
QTest::addColumn<QString>("inputString");
QTest::addColumn<QUrl>("testOutputLink");
QTest::newRow("plainHttps") << u"https://kde.org"_s << QUrl(u"https://kde.org"_s);
QTest::newRow("richHttps") << u"<a href=\"https://kde.org\">Rich Link</a>"_s << QUrl(u"https://kde.org"_s);
QTest::newRow("richHttpsLinkDescription") << u"<a href=\"https://kde.org\">https://kde.org</a>"_s << QUrl(u"https://kde.org"_s);
}
void LinkPreviewerTest::linkPreviewsMatch()
{
QFETCH(QString, inputString);
QFETCH(QUrl, testOutputLink);
auto link = LinkPreviewer::linkPreviews(inputString)[0];
QCOMPARE(link, testOutputLink);
}
void LinkPreviewerTest::multipleLinkPreviewsMatch_data()
{
QTest::addColumn<QString>("inputString");
QTest::addColumn<QList<QUrl>>("testOutputLinks");
QTest::newRow("multipleHttps") << u"www.example.org https://kde.org"_s << QList{QUrl(u"www.example.org"_s), QUrl(u"https://kde.org"_s)};
QTest::newRow("multipleHttps1Invalid") << u"www.example.org mxc://example.org/SEsfnsuifSDFSSEF"_s << QList{QUrl(u"www.example.org"_s)};
}
void LinkPreviewerTest::multipleLinkPreviewsMatch()
{
QFETCH(QString, inputString);
QFETCH(QList<QUrl>, testOutputLinks);
auto links = LinkPreviewer::linkPreviews(inputString);
QCOMPARE(links, testOutputLinks);
}
void LinkPreviewerTest::linkPreviewsReject_data()
{
QTest::addColumn<QString>("inputString");
QTest::newRow("mxc") << u"mxc://example.org/SEsfnsuifSDFSSEF"_s;
QTest::newRow("matrixTo") << u"https://matrix.to/#/@alice:example.org"_s;
QTest::newRow("noSpace") << u"testhttps://kde.org"_s;
}
void LinkPreviewerTest::linkPreviewsReject()
{
QFETCH(QString, inputString);
auto links = LinkPreviewer::linkPreviews(inputString);
QCOMPARE(links.empty(), true);
}
QTEST_MAIN(LinkPreviewerTest)
#include "linkpreviewertest.moc"

View File

@@ -0,0 +1,74 @@
// SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QObject>
#include <QTest>
#include <qglobal.h>
#include <qtestcase.h>
#include <cmath>
#include "mediasizehelper.h"
#include "neochatconfig.h"
class MediaSizeHelperTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void uninitialized();
void limits_data();
void limits();
};
void MediaSizeHelperTest::uninitialized()
{
MediaSizeHelper mediasizehelper;
mediasizehelper.setMaxSize(540, 540);
QCOMPARE(mediasizehelper.currentSize(), QSize(540, qRound(qreal(NeoChatConfig::self()->mediaMaxWidth()) / qreal(16.0) * qreal(9.0))));
}
void MediaSizeHelperTest::limits_data()
{
QTest::addColumn<qreal>("mediaWidth");
QTest::addColumn<qreal>("mediaHeight");
QTest::addColumn<qreal>("contentMaxWidth");
QTest::addColumn<qreal>("contentMaxHeight");
QTest::addColumn<QSize>("currentSize");
QTest::newRow("media smaller than content limits") << qreal(200) << qreal(150) << qreal(400) << qreal(900) << QSize(200, 150);
QTest::newRow("media smaller than max limits") << qreal(200) << qreal(150) << qreal(-1) << qreal(-1) << QSize(200, 150);
QTest::newRow("limit by max width") << qreal(600) << qreal(50) << qreal(-1) << qreal(-1) << QSize(540, qRound(qreal(540) / (qreal(600) / qreal(50))));
QTest::newRow("limit by max height") << qreal(50) << qreal(600) << qreal(-1) << qreal(-1) << QSize(qRound(qreal(540) * (qreal(50) / qreal(600))), 540);
QTest::newRow("limit by content width") << qreal(600) << qreal(50) << qreal(300) << qreal(-1) << QSize(300, qRound(qreal(300) / (qreal(600) / qreal(50))));
QTest::newRow("limit by content height") << qreal(50) << qreal(600) << qreal(-1) << qreal(300) << QSize(qRound(qreal(300) * (qreal(50) / qreal(600))), 300);
QTest::newRow("limit by content width tall media")
<< qreal(400) << qreal(600) << qreal(100) << qreal(400) << QSize(100, qRound(qreal(100) / (qreal(400) / qreal(600))));
QTest::newRow("limit by content height wide media")
<< qreal(1000) << qreal(600) << qreal(400) << qreal(100) << QSize(qRound(qreal(100) * (qreal(1000) / qreal(600))), 100);
}
void MediaSizeHelperTest::limits()
{
QFETCH(qreal, mediaWidth);
QFETCH(qreal, mediaHeight);
QFETCH(qreal, contentMaxWidth);
QFETCH(qreal, contentMaxHeight);
QFETCH(QSize, currentSize);
MediaSizeHelper mediasizehelper;
mediasizehelper.setMaxSize(540, 540);
mediasizehelper.setMediaWidth(mediaWidth);
mediasizehelper.setMediaHeight(mediaHeight);
mediasizehelper.setContentMaxWidth(contentMaxWidth);
mediasizehelper.setContentMaxHeight(contentMaxHeight);
QCOMPARE(mediasizehelper.currentSize(), currentSize);
}
QTEST_GUILESS_MAIN(MediaSizeHelperTest)
#include "mediasizehelpertest.moc"

View File

@@ -0,0 +1,62 @@
// SPDX-FileCopyrightText: 2024 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QObject>
#include <QSignalSpy>
#include <QTest>
#include <Quotient/connection.h>
#include <Quotient/quotient_common.h>
#include <Quotient/roommember.h>
#include <Quotient/syncdata.h>
#include "models/eventmessagecontentmodel.h"
#include "neochatconnection.h"
#include "testutils.h"
using namespace Quotient;
using namespace Qt::Literals::StringLiterals;
class MessageContentModelTest : public QObject
{
Q_OBJECT
private:
Connection *connection = nullptr;
private Q_SLOTS:
void initTestCase();
void missingEvent();
};
void MessageContentModelTest::initTestCase()
{
connection = new NeoChatConnection;
}
void MessageContentModelTest::missingEvent()
{
auto room = new TestUtils::TestRoom(connection, u"#firstRoom:kde.org"_s);
auto model1 = EventMessageContentModel(room, u"$153456789:example.org"_s);
QCOMPARE(model1.rowCount(), 1);
QCOMPARE(model1.data(model1.index(0), MessageContentModel::ComponentTypeRole), MessageComponentType::Loading);
QCOMPARE(model1.data(model1.index(0), MessageContentModel::DisplayRole), u"Loading…"_s);
auto model2 = EventMessageContentModel(room, u"$153456789:example.org"_s, true);
QCOMPARE(model2.rowCount(), 1);
QCOMPARE(model2.data(model2.index(0), MessageContentModel::ComponentTypeRole), MessageComponentType::Loading);
QCOMPARE(model2.data(model2.index(0), MessageContentModel::DisplayRole), u"Loading reply…"_s);
room->syncNewEvents(u"test-min-sync.json"_s);
QCOMPARE(model1.rowCount(), 2);
QCOMPARE(model1.data(model1.index(0), MessageContentModel::ComponentTypeRole), MessageComponentType::Author);
QCOMPARE(model1.data(model1.index(1), MessageContentModel::ComponentTypeRole), MessageComponentType::Text);
QCOMPARE(model1.data(model1.index(1), MessageContentModel::DisplayRole), u"<b>This is an example<br>text message</b>"_s);
}
QTEST_MAIN(MessageContentModelTest)
#include "messagecontentmodeltest.moc"

621
autotests/modeltest.cpp Normal file
View File

@@ -0,0 +1,621 @@
// SPDX-FileCopyrightText: 2025 Tobias Fella <tobias.fella@kde.org>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QAbstractItemModelTester>
#include <QObject>
#include <QSignalSpy>
#include <QTest>
#include <QVariantList>
#include <Quotient/connection.h>
#include "accountmanager.h"
#include "contentprovider.h"
#include "enums/powerlevel.h"
#include "enums/roomsortparameter.h"
#include "models/accountemoticonmodel.h"
#include "models/actionsmodel.h"
#include "models/commonroomsmodel.h"
#include "models/completionmodel.h"
#include "models/completionproxymodel.h"
#include "models/customemojimodel.h"
#include "models/devicesmodel.h"
#include "models/devicesproxymodel.h"
#include "models/emojimodel.h"
#include "models/emoticonfiltermodel.h"
#include "models/eventmessagecontentmodel.h"
#include "models/imagepacksmodel.h"
#include "models/linemodel.h"
#include "models/livelocationsmodel.h"
#include "models/locationsmodel.h"
#include "models/messagecontentfiltermodel.h"
#include "models/messagecontentmodel.h"
#include "models/notificationsmodel.h"
#include "models/permissionsmodel.h"
#include "models/pinnedmessagemodel.h"
#include "models/pollanswermodel.h"
#include "models/publicroomlistmodel.h"
#include "models/pushrulemodel.h"
#include "models/readmarkermodel.h"
#include "models/roomsortparametermodel.h"
#include "models/searchmodel.h"
#include "models/serverlistmodel.h"
#include "models/spacechildrenmodel.h"
#include "models/spacechildsortfiltermodel.h"
#include "models/statefiltermodel.h"
#include "models/statekeysmodel.h"
#include "models/statemodel.h"
#include "models/stickermodel.h"
#include "models/threadmodel.h"
#include "models/threepidmodel.h"
#include "models/userdirectorylistmodel.h"
#include "models/userfiltermodel.h"
#include "models/webshortcutmodel.h"
#include "neochatroom.h"
#include "pollhandler.h"
#include "roommanager.h"
#include "server.h"
using namespace Quotient;
// TODO: Add data to all models as relevant.
// Performs basic tests on all models in NeoChat
// When adding a new test, create the model first, then the tester, then initialize the model (e.g., setConnection and setRoom).
// That way, the models are also tested for whether they can handle having no connection etc.
class ModelTest : public QObject
{
Q_OBJECT
private:
NeoChatConnection *connection = nullptr;
NeoChatRoom *room = nullptr;
QString eventId;
Server server;
private Q_SLOTS:
void initTestCase();
void testRoomTreeModel();
void testMessageContentModel();
void testEventMessageContentModel();
void testThreadModel();
void testThreadFetchModel();
void testThreadChatBarModel();
void testReactionModel();
void testPollAnswerModel();
void testLineModel();
void testSpaceChildrenModel();
void testItineraryModel();
void testPublicRoomListModel();
void testMessageFilterModel();
void testThreePIdModel();
void testMediaMessageFilterModel();
void testWebshortcutModel();
void testTimelineMessageModel();
void testReadMarkerModel();
void testSearchModel();
void testStateModel();
void testTimelineModel();
void testStateKeysModel();
void testPinnedMessageModel();
void testUserListModel();
void testStickerModel();
void testPowerLevelModel();
void testImagePacksModel();
void testCompletionModel();
void testRoomListModel();
void testCommonRoomsModel();
void testNotificationsModel();
void testLocationsModel();
void testServerListModel();
void testEmojiModel();
void testCustomEmojiModel();
void testPushRuleModel();
void testActionsModel();
void testDevicesModel();
void testUserDirectoryListModel();
void testAccountEmoticonModel();
void testPermissionsModel();
void testLiveLocationsModel();
void testRoomSortParameterModel();
void testSortFilterRoomTreeModel();
void testSortFilterSpaceListModel();
void testSortFilterRoomListModel();
void testSpaceChildSortFilterModel();
void testStateFilterModel();
void testMessageContentFilterModel();
void testUserFilterModel();
void testEmoticonFilterModel();
void testDevicesProxyModel();
void testCompletionProxyModel();
};
void ModelTest::initTestCase()
{
Connection::setRoomType<NeoChatRoom>();
server.start();
KLocalizedString::setApplicationDomain(QByteArrayLiteral("neochat"));
auto accountManager = new AccountManager(true, this);
QSignalSpy spy(accountManager, &AccountManager::connectionAdded);
connection = dynamic_cast<NeoChatConnection *>(accountManager->accounts()->front());
const auto roomId = server.createRoom(u"@user:localhost:1234"_s);
eventId = server.sendEvent(roomId,
u"m.room.message"_s,
QJsonObject{
{u"body"_s, u"foo"_s},
{u"msgtype"_s, u"m.text"_s},
});
server.sendEvent(roomId,
u"m.room.message"_s,
QJsonObject{
{u"body"_s, u"asdf"_s},
{u"m.relates_to"_s,
QJsonObject{
{u"event_id"_s, u"$GEucSt3TfVl6DVpKEyeOlRsXzjLv2ZCVgSQuQclFg1o"_s},
{u"is_falling_back"_s, true},
{u"m.in_reply_to"_s, QJsonObject{{u"event_id"_s, u"$GEucSt3TfVl6DVpKEyeOlRsXzjLv2ZCVgSQuQclFg1o"_s}}},
{u"rel_type"_s, u"m.thread"_s},
}},
{u"msgtype"_s, u"m.text"_s},
});
QSignalSpy syncSpy(connection, &Connection::syncDone);
// We need to wait for two syncs, as the next one won't have the changes yet
QVERIFY(syncSpy.wait());
QVERIFY(syncSpy.wait());
room = dynamic_cast<NeoChatRoom *>(connection->room(roomId));
QVERIFY(room);
}
void ModelTest::testRoomTreeModel()
{
auto roomTreeModel = new RoomTreeModel(this);
auto tester = new QAbstractItemModelTester(roomTreeModel, roomTreeModel);
tester->setUseFetchMore(true);
roomTreeModel->setConnection(connection);
}
void ModelTest::testMessageContentModel()
{
auto contentModel = std::make_unique<MessageContentModel>(room, eventId);
auto tester = new QAbstractItemModelTester(contentModel.get(), contentModel.get());
tester->setUseFetchMore(true);
}
void ModelTest::testEventMessageContentModel()
{
auto model = std::make_unique<EventMessageContentModel>(room, eventId);
auto tester = new QAbstractItemModelTester(model.get(), model.get());
tester->setUseFetchMore(true);
}
void ModelTest::testThreadModel()
{
auto model = std::make_unique<ThreadModel>(eventId, room);
auto tester = new QAbstractItemModelTester(model.get(), model.get());
tester->setUseFetchMore(true);
}
void ModelTest::testThreadFetchModel()
{
auto threadModel = std::make_unique<ThreadModel>(eventId, room);
auto model = new ThreadFetchModel(threadModel.get());
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
}
void ModelTest::testThreadChatBarModel()
{
auto threadModel = std::make_unique<ThreadModel>(eventId, room);
auto model = new ThreadChatBarModel(threadModel.get(), room);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
}
void ModelTest::testReactionModel()
{
auto messageContentModel = std::make_unique<MessageContentModel>(room);
auto model = new ReactionModel(messageContentModel.get(), eventId, room);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
}
void ModelTest::testPollAnswerModel()
{
auto handler = std::make_unique<PollHandler>(room, eventId);
auto model = new PollAnswerModel(handler.get());
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
}
void ModelTest::testLineModel()
{
auto model = new LineModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
auto document = new QTextDocument(this);
model->setDocument(document);
document->setPlainText(u"foo\nbar\n\nbaz"_s);
}
void ModelTest::testSpaceChildrenModel()
{
auto model = new SpaceChildrenModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setSpace(room);
}
void ModelTest::testItineraryModel()
{
auto model = new ItineraryModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
}
void ModelTest::testPublicRoomListModel()
{
auto model = new PublicRoomListModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setConnection(connection);
}
void ModelTest::testMessageFilterModel()
{
auto timelineModel = new TimelineModel(this);
auto model = new MessageFilterModel(this, timelineModel);
auto tester = new QAbstractItemModelTester(model, model);
timelineModel->setRoom(room);
tester->setUseFetchMore(true);
}
void ModelTest::testThreePIdModel()
{
auto model = new ThreePIdModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setConnection(connection);
}
void ModelTest::testMediaMessageFilterModel()
{
auto timelineModel = new TimelineModel(this);
auto messageFilterModel = new MessageFilterModel(this, timelineModel);
auto model = new MediaMessageFilterModel(this, messageFilterModel);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
timelineModel->setRoom(room);
}
void ModelTest::testWebshortcutModel()
{
auto model = new WebShortcutModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setSelectedText(u"Foo"_s);
}
void ModelTest::testTimelineMessageModel()
{
auto model = new TimelineMessageModel();
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setRoom(room);
}
void ModelTest::testReadMarkerModel()
{
auto model = std::make_unique<ReadMarkerModel>(eventId, room);
auto tester = new QAbstractItemModelTester(model.get(), model.get());
tester->setUseFetchMore(true);
}
void ModelTest::testSearchModel()
{
auto model = new SearchModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setSearchText(u"foo"_s);
model->setRoom(room);
}
void ModelTest::testStateModel()
{
auto model = new StateModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setRoom(room);
}
void ModelTest::testTimelineModel()
{
auto model = new TimelineModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setRoom(room);
}
void ModelTest::testStateKeysModel()
{
auto model = new StateKeysModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setEventType(u"m.room.member"_s);
model->setRoom(room);
}
void ModelTest::testPinnedMessageModel()
{
auto model = new PinnedMessageModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setRoom(room);
}
void ModelTest::testUserListModel()
{
auto model = new UserListModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setRoom(room);
}
void ModelTest::testStickerModel()
{
auto model = new StickerModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setPackIndex(0);
model->setRoom(room);
auto imagePacksModel = new ImagePacksModel(this);
model->setModel(imagePacksModel);
imagePacksModel->setRoom(room);
imagePacksModel->setShowEmoticons(true);
imagePacksModel->setShowStickers(true);
}
void ModelTest::testPowerLevelModel()
{
auto model = new PowerLevelModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
}
void ModelTest::testImagePacksModel()
{
auto model = new ImagePacksModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setRoom(room);
model->setShowEmoticons(true);
model->setShowStickers(true);
}
void ModelTest::testCompletionModel()
{
auto model = new CompletionModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setAutoCompletionType(CompletionModel::Room);
auto roomListModel = new RoomListModel(this);
roomListModel->setConnection(connection);
model->setRoomListModel(roomListModel);
}
void ModelTest::testRoomListModel()
{
auto model = new RoomListModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setConnection(connection);
}
void ModelTest::testCommonRoomsModel()
{
auto model = new CommonRoomsModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setConnection(connection);
model->setUserId(u"@user:example.com"_s);
}
void ModelTest::testNotificationsModel()
{
auto model = new NotificationsModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setConnection(connection);
}
void ModelTest::testLocationsModel()
{
auto model = new LocationsModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setRoom(room);
}
void ModelTest::testServerListModel()
{
auto model = new ServerListModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setConnection(connection);
}
void ModelTest::testEmojiModel()
{
auto tester = new QAbstractItemModelTester(&EmojiModel::instance(), &EmojiModel::instance());
tester->setUseFetchMore(true);
}
void ModelTest::testCustomEmojiModel()
{
auto tester = new QAbstractItemModelTester(&CustomEmojiModel::instance(), &CustomEmojiModel::instance());
tester->setUseFetchMore(true);
CustomEmojiModel::instance().setConnection(connection);
}
void ModelTest::testPushRuleModel()
{
auto model = new PushRuleModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setConnection(connection);
}
void ModelTest::testActionsModel()
{
auto tester = new QAbstractItemModelTester(&ActionsModel::instance(), &ActionsModel::instance());
tester->setUseFetchMore(true);
}
void ModelTest::testDevicesModel()
{
auto model = new DevicesModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setConnection(connection);
}
void ModelTest::testUserDirectoryListModel()
{
auto model = new UserDirectoryListModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setConnection(connection);
model->setSearchText(u"foo"_s);
}
void ModelTest::testAccountEmoticonModel()
{
auto model = new AccountEmoticonModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setConnection(connection);
}
void ModelTest::testPermissionsModel()
{
auto model = new PermissionsModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setRoom(room);
}
void ModelTest::testLiveLocationsModel()
{
auto model = new LiveLocationsModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setRoom(room);
}
void ModelTest::testRoomSortParameterModel()
{
auto model = new RoomSortParameterModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
}
void ModelTest::testSortFilterRoomTreeModel()
{
auto sourceModel = new RoomTreeModel(this);
auto model = new SortFilterRoomTreeModel(sourceModel, sourceModel);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
sourceModel->setConnection(connection);
}
void ModelTest::testSortFilterSpaceListModel()
{
auto sourceModel = new RoomListModel(this);
auto model = new SortFilterSpaceListModel(sourceModel, sourceModel);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
sourceModel->setConnection(connection);
}
void ModelTest::testSortFilterRoomListModel()
{
auto sourceModel = new RoomListModel(this);
auto model = new SortFilterRoomListModel(sourceModel, sourceModel);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
sourceModel->setConnection(connection);
}
void ModelTest::testSpaceChildSortFilterModel()
{
auto model = new SpaceChildSortFilterModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
auto spaceChildrenModel = new SpaceChildrenModel(this);
model->setSourceModel(spaceChildrenModel);
spaceChildrenModel->setSpace(nullptr);
}
void ModelTest::testStateFilterModel()
{
auto model = new StateFilterModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
auto stateModel = new StateModel(this);
model->setSourceModel(stateModel);
stateModel->setRoom(room);
}
void ModelTest::testMessageContentFilterModel()
{
auto model = new MessageContentFilterModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setSourceModel(ContentProvider::self().contentModelForEvent(room, eventId));
}
void ModelTest::testUserFilterModel()
{
auto model = new UserFilterModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
auto userListModel = new UserListModel(this);
model->setSourceModel(userListModel);
userListModel->setRoom(room);
}
void ModelTest::testEmoticonFilterModel()
{
auto model = new EmoticonFilterModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
auto accountEmoticonModel = new AccountEmoticonModel(this);
model->setSourceModel(accountEmoticonModel);
model->setShowEmojis(true);
model->setShowStickers(true);
accountEmoticonModel->setConnection(connection);
}
void ModelTest::testDevicesProxyModel()
{
auto model = new DevicesProxyModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
auto devicesModel = new DevicesModel(this);
model->setSourceModel(devicesModel);
devicesModel->setConnection(dynamic_cast<NeoChatConnection *>(connection));
}
void ModelTest::testCompletionProxyModel()
{
auto model = new CompletionProxyModel(this);
auto tester = new QAbstractItemModelTester(model, model);
tester->setUseFetchMore(true);
model->setSourceModel(&EmojiModel::instance());
}
QTEST_MAIN(ModelTest)
#include "modeltest.moc"

View File

@@ -0,0 +1,64 @@
// SPDX-FileCopyrightText: 2022 Carl Schwan <carl@carlschwan.eu>
// SPDX-License-Identifier: GPL-3.0-or-later
#include <QObject>
#include <QSignalSpy>
#include <QTest>
#include <Quotient/connection.h>
#include <Quotient/quotient_common.h>
#include <Quotient/syncdata.h>
#include <KLocalizedString>
#include "accountmanager.h"
#include "server.h"
#include "testutils.h"
using namespace Quotient;
class NeoChatRoomTest : public QObject {
Q_OBJECT
private:
Connection *connection = nullptr;
NeoChatRoom *room = nullptr;
Server server;
private Q_SLOTS:
void initTestCase();
void eventTest();
};
void NeoChatRoomTest::initTestCase()
{
Connection::setRoomType<NeoChatRoom>();
server.start();
KLocalizedString::setApplicationDomain(QByteArrayLiteral("neochat"));
auto accountManager = new AccountManager(true, this);
QSignalSpy spy(accountManager, &AccountManager::connectionAdded);
connection = dynamic_cast<NeoChatConnection *>(accountManager->accounts()->front());
const auto roomId = server.createRoom(u"@user:localhost:1234"_s);
server.sendEvent(roomId,
u"m.room.message"_s,
QJsonObject{
{u"body"_s, u"foo"_s},
{u"msgtype"_s, u"m.text"_s},
});
QSignalSpy syncSpy(connection, &Connection::syncDone);
// We need to wait for two syncs, as the next one won't have the changes yet
QVERIFY(syncSpy.wait());
QVERIFY(syncSpy.wait());
room = dynamic_cast<NeoChatRoom *>(connection->room(roomId));
QVERIFY(room);
}
void NeoChatRoomTest::eventTest()
{
QCOMPARE(room->timelineSize(), 1);
}
QTEST_GUILESS_MAIN(NeoChatRoomTest)
#include "neochatroomtest.moc"

View File

@@ -0,0 +1,73 @@
// SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QObject>
#include <QSignalSpy>
#include <QTest>
#include <Quotient/connection.h>
#include <Quotient/quotient_common.h>
#include <Quotient/syncdata.h>
#include "events/pollevent.h"
#include "pollhandler.h"
#include "testutils.h"
using namespace Quotient;
class PollHandlerTest : public QObject
{
Q_OBJECT
private:
Connection *connection = nullptr;
TestUtils::TestRoom *room = nullptr;
private Q_SLOTS:
void initTestCase();
void nullObject();
void poll();
};
void PollHandlerTest::initTestCase()
{
connection = Connection::makeMockConnection(u"@bob:kde.org"_s);
room = new TestUtils::TestRoom(connection, u"#myroom:kde.org"_s, u"test-pollhandlerstart-sync.json"_s);
}
// Basically don't crash.
void PollHandlerTest::nullObject()
{
auto pollHandler = PollHandler();
QCOMPARE(pollHandler.hasEnded(), false);
QCOMPARE(pollHandler.numAnswers(), 0);
QCOMPARE(pollHandler.question(), QString());
QCOMPARE(pollHandler.kind(), PollKind::Disclosed);
}
void PollHandlerTest::poll()
{
auto startEvent = eventCast<const PollStartEvent>(room->messageEvents().at(0).get());
auto pollHandler = PollHandler(room, startEvent->id());
QList<Quotient::EventContent::Answer> options = {EventContent::Answer{"option1"_L1, "option1"_L1}, EventContent::Answer{"option2"_L1, "option2"_L1}};
const auto answer0 = pollHandler.answerAtRow(0);
const auto answer1 = pollHandler.answerAtRow(1);
QCOMPARE(pollHandler.hasEnded(), false);
QCOMPARE(pollHandler.numAnswers(), 2);
QCOMPARE(pollHandler.question(), u"test"_s);
QCOMPARE(answer0.id, "option1"_L1);
QCOMPARE(answer1.id, "option2"_L1);
QCOMPARE(answer0.text, "option1text"_L1);
QCOMPARE(answer1.text, "option2text"_L1);
QCOMPARE(pollHandler.answerCountAtId(answer0.id), 0);
QCOMPARE(pollHandler.answerCountAtId(answer1.id), 0);
QCOMPARE(pollHandler.checkMemberSelectedId(connection->userId(), answer0.id), false);
QCOMPARE(pollHandler.checkMemberSelectedId(connection->userId(), answer1.id), false);
QCOMPARE(pollHandler.kind(), PollKind::Undisclosed);
}
QTEST_GUILESS_MAIN(PollHandlerTest)
#include "pollhandlertest.moc"

9
autotests/qmltest.cpp Normal file
View File

@@ -0,0 +1,9 @@
/*
* SPDX-FileCopyrightText: 2020 Arjen Hiemstra <ahiemstra@heimr.nl>
*
* SPDX-License-Identifier: LGPL-2.0-or-later
*/
#include <quicktest.h>
QUICK_TEST_MAIN(NeoChat)

View File

@@ -0,0 +1,73 @@
// SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QObject>
#include <QSignalSpy>
#include <QTest>
#include "models/reactionmodel.h"
#include <Quotient/events/roommessageevent.h>
#include "models/eventmessagecontentmodel.h"
#include "testutils.h"
using namespace Quotient;
class ReactionModelTest : public QObject
{
Q_OBJECT
private:
Connection *connection = nullptr;
TestUtils::TestRoom *room = nullptr;
EventMessageContentModel *parentModel;
private Q_SLOTS:
void initTestCase();
void basicReaction();
void newReaction();
};
void ReactionModelTest::initTestCase()
{
connection = Connection::makeMockConnection(u"@bob:kde.org"_s);
room = new TestUtils::TestRoom(connection, u"#myroom:kde.org"_s, u"test-reactionmodel-sync.json"_s);
parentModel = new EventMessageContentModel(room, "123456"_L1);
}
void ReactionModelTest::basicReaction()
{
auto event = eventCast<const RoomMessageEvent>(room->messageEvents().at(0).get());
auto model = ReactionModel(parentModel, event->id(), room);
QCOMPARE(model.rowCount(), 1);
QCOMPARE(model.data(model.index(0), ReactionModel::TextContentRole), u"<span style=\"font-family: 'emoji';\">👍</span>"_s);
QCOMPARE(model.data(model.index(0), ReactionModel::ReactionRole), u"👍"_s);
QCOMPARE(model.data(model.index(0), ReactionModel::ToolTipRole), u"Alice Margatroid reacted with <span style=\"font-family: 'emoji';\">👍</span>"_s);
QCOMPARE(model.data(model.index(0), ReactionModel::HasLocalMember), false);
}
void ReactionModelTest::newReaction()
{
auto event = eventCast<const RoomMessageEvent>(room->messageEvents().at(0).get());
auto model = new ReactionModel(parentModel, event->id(), room);
QCOMPARE(model->rowCount(), 1);
QCOMPARE(model->data(model->index(0), ReactionModel::ToolTipRole), u"Alice Margatroid reacted with <span style=\"font-family: 'emoji';\">👍</span>"_s);
QSignalSpy spy(model, SIGNAL(modelReset()));
room->syncNewEvents(u"test-reactionmodel-extra-sync.json"_s);
QCOMPARE(model->rowCount(), 2);
QCOMPARE(spy.count(), 2); // Once for each of the 2 new reactions.
QCOMPARE(model->data(model->index(1), ReactionModel::ReactionRole), u"😆"_s);
QCOMPARE(model->data(model->index(0), ReactionModel::ToolTipRole),
u"Alice Margatroid and Bob reacted with <span style=\"font-family: 'emoji';\">👍</span>"_s);
delete model;
}
QTEST_MAIN(ReactionModelTest)
#include "reactionmodeltest.moc"

View File

@@ -0,0 +1,141 @@
// SPDX-FileCopyrightText: 2024 Tobias Fella <tobias.fella@kde.org>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QObject>
#include <QSignalSpy>
#include <QTest>
#include <QVariantList>
#include "accountmanager.h"
#include "models/actionsmodel.h"
#include "roommanager.h"
#include "server.h"
#include "testutils.h"
using namespace Quotient;
class RoomManagerTest : public QObject
{
Q_OBJECT
private:
NeoChatConnection *connection = nullptr;
NeoChatRoom *room = nullptr;
Server server;
private Q_SLOTS:
void initTestCase();
void testMaximizeMedia();
void testResolveMatrixLinks();
};
void RoomManagerTest::initTestCase()
{
Connection::setRoomType<NeoChatRoom>();
server.start();
KLocalizedString::setApplicationDomain(QByteArrayLiteral("neochat"));
auto accountManager = new AccountManager(true);
QSignalSpy spy(accountManager, &AccountManager::connectionAdded);
connection = dynamic_cast<NeoChatConnection *>(accountManager->accounts()->front());
QVERIFY(connection);
auto roomId = server.createRoom(u"@user:localhost:1234"_s);
QSignalSpy syncSpy(connection, &Connection::syncDone);
// We need to wait for two syncs, as the next one won't have the changes yet
QVERIFY(syncSpy.wait());
QVERIFY(syncSpy.wait());
room = dynamic_cast<NeoChatRoom *>(connection->room(roomId));
QVERIFY(room);
RoomManager::instance().setConnection(connection);
QSignalSpy roomSpy(&RoomManager::instance(), &RoomManager::currentRoomChanged);
RoomManager::instance().resolveResource(room->id());
QVERIFY(roomSpy.size() > 0);
}
void RoomManagerTest::testMaximizeMedia()
{
QSignalSpy spy(&RoomManager::instance(), &RoomManager::showMaximizedMedia);
QSignalSpy syncSpy(connection, &Connection::syncDone);
QTest::ignoreMessage(QtMsgType::QtWarningMsg, "Tried to open media for empty event id");
RoomManager::instance().maximizeMedia(QString());
QVERIFY(!spy.wait(10));
QTest::ignoreMessage(QtMsgType::QtWarningMsg, "Tried to open media for unknown event id \"Doesn't exist\"");
RoomManager::instance().maximizeMedia(u"Doesn't exist"_s);
QVERIFY(!spy.wait(10));
const auto eventWithoutMedia = server.sendEvent(room->id(),
u"m.room.message"_s,
QJsonObject({
{u"body"_s, u"Foo"_s},
{u"format"_s, u"org.matrix.custom.html"_s},
{u"formatted_body"_s, u"Foo"_s},
{u"msgtype"_s, u"m.text"_s},
}));
QVERIFY(syncSpy.wait());
QVERIFY(syncSpy.wait());
QTest::ignoreMessage(QtMsgType::QtWarningMsg, u"Tried to open media for unknown event id \"%1\""_s.arg(eventWithoutMedia).toLatin1().data());
RoomManager::instance().maximizeMedia(eventWithoutMedia);
QVERIFY(!spy.wait(10));
// NOTE: This is supposed to test that maximizing pending media works correctly. This probably doesn't work in the UI yet, but at least the backend supports
// it. If the server ever learns how to process events, this becomes pointless and we need to find a way of preventing *these* events from arriving
auto pendingEventWithoutMedia = room->postText(u"Hello"_s);
QTest::ignoreMessage(QtMsgType::QtWarningMsg, u"Tried to open media for unknown event id \"%1\""_s.arg(pendingEventWithoutMedia).toLatin1().data());
RoomManager::instance().maximizeMedia(pendingEventWithoutMedia);
QVERIFY(!spy.wait(10));
const auto eventWithMedia = server.sendEvent(room->id(),
u"m.room.message"_s,
QJsonObject({
{u"body"_s, u"Foo"_s},
{u"filename"_s, u"foo.jpg"_s},
{u"info"_s,
QJsonObject{
{u"h"_s, 1000},
{u"w"_s, 2000},
{u"size"_s, 10000},
{u"mimetype"_s, u"image/png"_s},
}},
{u"msgtype"_s, u"m.image"_s},
{u"url"_s, u"mxc://foo.bar/asdf"_s},
}));
QVERIFY(syncSpy.wait());
QVERIFY(syncSpy.wait());
QVERIFY(syncSpy.wait());
RoomManager::instance().maximizeMedia(eventWithMedia);
QVERIFY(spy.size() == 1);
QVERIFY(spy[0][0] == 0);
auto pendingEventWithMedia = room->postJson(u"m.room.message"_s,
QJsonObject({
{u"body"_s, u"Foo"_s},
{u"filename"_s, u"foo.jpg"_s},
{u"info"_s,
QJsonObject{
{u"h"_s, 1000},
{u"w"_s, 2000},
{u"size"_s, 10000},
{u"mimetype"_s, u"image/png"_s},
}},
{u"msgtype"_s, u"m.image"_s},
{u"url"_s, u"mxc://foo.bar/asdf"_s},
}));
RoomManager::instance().maximizeMedia(pendingEventWithMedia);
QVERIFY(spy.size() == 2);
QVERIFY(spy[1][0] == 0);
}
void RoomManagerTest::testResolveMatrixLinks()
{
// Test if resolving a non-joined room will bring up the confirmation dialog.
const QSignalSpy askToJoinSpy(&RoomManager::instance(), &RoomManager::askJoinRoom);
RoomManager::instance().resolveResource(QStringLiteral("matrix:r/testbuild:matrix.org"), QStringLiteral("join"));
QTRY_COMPARE(askToJoinSpy.size(), 1);
}
QTEST_MAIN(RoomManagerTest)
#include "roommanagertest.moc"

402
autotests/server.cpp Normal file
View File

@@ -0,0 +1,402 @@
// SPDX-FileCopyrightText: 2025 Tobias Fella <tobias.fella@kde.org>
// SPDX-License-Identifier: LGPL-2.0-or-later
#include "server.h"
#include <QFile>
#include <QHttpServerResponder>
#include <QJsonArray>
#include <QJsonDocument>
#include <QNetworkReply>
#include <QSslCertificate>
#include <QSslKey>
#include <QUuid>
#include <Quotient/networkaccessmanager.h>
using namespace Qt::Literals::StringLiterals;
QString generateEventId()
{
return u"$"_s + QString::fromLatin1(QCryptographicHash::hash(QUuid::createUuid().toString().toLatin1(), QCryptographicHash::Sha1).toBase64());
}
QString generateRoomId()
{
return u"!%1:localhost:1234"_s
.arg(QString::fromLatin1(QCryptographicHash::hash(QUuid::createUuid().toString().toLatin1(), QCryptographicHash::Sha1).toBase64()))
.replace(u'/', QChar());
}
Server::Server()
{
}
void Server::start()
{
QObject::connect(Quotient::NetworkAccessManager::instance(),
&QNetworkAccessManager::sslErrors,
Quotient::NetworkAccessManager::instance(),
[](QNetworkReply *reply) {
reply->ignoreSslErrors();
});
m_server.route(u"/.well-known/matrix/client"_s, QHttpServerRequest::Method::Get, [](QHttpServerResponder &responder) {
responder.write(QJsonDocument(QJsonObject{
{u"m.homeserver"_s, QJsonObject{{u"base_url"_s, u"https://localhost:1234"_s}}},
}),
QHttpServerResponder::StatusCode::Ok);
});
m_server.route(u"/_matrix/client/versions"_s, QHttpServerRequest::Method::Get, [](QHttpServerResponder &responder) {
responder.write(QJsonDocument(QJsonObject{
{u"versions"_s,
QJsonArray{
u"v1.0"_s,
u"v1.1"_s,
u"v1.2"_s,
u"v1.3"_s,
u"v1.4"_s,
u"v1.5"_s,
u"v1.6"_s,
u"v1.7"_s,
u"v1.8"_s,
u"v1.9"_s,
u"v1.10"_s,
u"v1.11"_s,
u"v1.12"_s,
u"v1.13"_s,
}},
}),
QHttpServerResponder::StatusCode::Ok);
});
m_server.route(u"/_matrix/client/v3/capabilities"_s, QHttpServerRequest::Method::Get, [](QHttpServerResponder &responder) {
responder.write(
QJsonDocument(QJsonObject{{u"capabilities"_s,
QJsonObject{
{u"m.room_versions"_s, QJsonObject{{u"m.available"_s, QJsonObject{{u"1"_s, u"stable"_s}}}, {u"default"_s, u"1"_s}}},
}}}),
QHttpServerResponder::StatusCode::Ok);
});
m_server.route(u"/_matrix/client/v3/account/whoami"_s, QHttpServerRequest::Method::Get, [](QHttpServerResponder &responder) {
responder.write(QJsonDocument(QJsonObject{
{u"device_id"_s, u"device_id_1234"_s},
{u"user_id"_s, u"@user:localhost:1234"_s},
}),
QHttpServerResponder::StatusCode::Ok);
});
m_server.route(u"/_matrix/client/v3/login"_s, QHttpServerRequest::Method::Post, [](QHttpServerResponder &responder) {
// TODO
// if data["identifier"]["user"] != "user" or data["password"] != "1234":
// abort(403)
responder.write(QJsonDocument(QJsonObject{
{u"access_token"_s, u"token_login"_s},
{u"device_id"_s, u"device_1234"_s},
{u"user_id"_s, u"@user:localhost:1234"_s},
}),
QHttpServerResponder::StatusCode::Ok);
});
m_server.route(u"/_matrix/client/v3/login"_s, QHttpServerRequest::Method::Get, [](QHttpServerResponder &responder) {
responder.write(QJsonDocument(QJsonObject{
{u"flows"_s, QJsonArray{QJsonObject{{u"type"_s, u"m.login.password"_s}}}},
}),
QHttpServerResponder::StatusCode::Ok);
});
m_server.route(u"/_matrix/client/v3/rooms/<arg>/invite"_s,
QHttpServerRequest::Method::Post,
[this](const QString &roomId, QHttpServerResponder &responder, const QHttpServerRequest &request) {
Changes changes;
changes.invitations += Changes::InviteUser{
.userId = QJsonDocument::fromJson(request.body()).object()[u"user_id"_s].toString(),
.roomId = roomId,
};
m_state += changes;
responder.write(QJsonDocument(QJsonObject{}), QHttpServerResponder::StatusCode::Ok);
});
m_server.route(u"/_matrix/client/r0/sync"_s, QHttpServerRequest::Method::Get, this, &Server::sync);
QSslConfiguration config;
QFile key(QStringLiteral(DATA_DIR) + u"/localhost.key"_s);
void(key.open(QFile::ReadOnly));
config.setPrivateKey(QSslKey(&key, QSsl::Rsa));
config.setLocalCertificate(QSslCertificate::fromPath(QStringLiteral(DATA_DIR) + u"/localhost.crt"_s).constFirst());
m_sslServer.setSslConfiguration(config);
if (!m_sslServer.listen(QHostAddress::LocalHost, 1234) || !m_server.bind(&m_sslServer)) {
qFatal() << "Server failed to listen on a port.";
return;
} else {
qInfo() << "Server listening";
}
}
QString Server::createRoom(const QString &matrixId)
{
const auto roomId = generateRoomId();
Changes changes;
changes.newRooms += Changes::NewRoom{
.initialMembers = {matrixId},
.roomId = {roomId},
.tags = {},
};
m_state += changes;
return roomId;
}
void Server::inviteUser(const QString &roomId, const QString &matrixId)
{
Changes changes;
changes.invitations += Changes::InviteUser{
.userId = matrixId,
.roomId = roomId,
};
m_state += changes;
}
void Server::banUser(const QString &roomId, const QString &matrixId)
{
Changes changes;
changes.bans += Changes::BanUser{
.userId = matrixId,
.roomId = roomId,
};
m_state += changes;
}
void Server::joinUser(const QString &roomId, const QString &matrixId)
{
Changes changes;
changes.joins += Changes::JoinUser{
.userId = matrixId,
.roomId = roomId,
};
m_state += changes;
}
QString Server::createServerNoticesRoom(const QString &matrixId)
{
const auto roomId = generateRoomId();
Changes changes;
changes.newRooms += Changes::NewRoom{
.initialMembers = {matrixId},
.roomId = {roomId},
.tags = {u"m.server_notice"_s},
};
m_state += changes;
return roomId;
}
QString Server::sendEvent(const QString &roomId, const QString &eventType, const QJsonObject &content)
{
Changes changes;
const auto eventId = generateEventId();
changes.events += Changes::Event{
.fullJson = QJsonObject{{u"type"_s, eventType},
{u"content"_s, content},
{u"sender"_s, u"@foo:server.com"_s},
{u"event_id"_s, eventId},
{u"origin_server_ts"_s, QDateTime::currentMSecsSinceEpoch()},
{u"room_id"_s, roomId}},
};
m_state += changes;
return eventId;
}
QString Server::sendStateEvent(const QString &roomId, const QString &eventType, const QString &stateKey, const QJsonObject &content)
{
Changes changes;
const auto eventId = generateEventId();
const auto json = QJsonObject{{u"type"_s, eventType},
{u"content"_s, content},
{u"sender"_s, u"@foo:server.com"_s},
{u"event_id"_s, eventId},
{u"origin_server_ts"_s, QDateTime::currentMSecsSinceEpoch()},
{u"room_id"_s, roomId},
{u"state_key"_s, stateKey}};
changes.events += Changes::Event{
.fullJson = json,
};
changes.stateEvents += Changes::Event{.fullJson = json};
m_state += changes;
return eventId;
}
void Server::sync(const QHttpServerRequest &request, QHttpServerResponder &responder)
{
QJsonObject joinRooms;
auto token = request.query().queryItemValue(u"since"_s).toInt();
const auto changes = m_state.mid(token);
for (const auto &change : changes) {
for (const auto &newRoom : change.newRooms) {
QJsonArray stateEvents;
stateEvents += QJsonObject{
{u"content"_s, QJsonObject{{u"room_version"_s, u"11"_s}}},
{u"event_id"_s, generateEventId()},
{u"origin_server_ts"_s, QDateTime::currentMSecsSinceEpoch()},
{u"room_id"_s, newRoom.roomId},
{u"sender"_s, newRoom.initialMembers[0]},
{u"state_key"_s, QString()},
{u"type"_s, u"m.room.create"_s},
{u"unsigned"_s, QJsonObject{{u"age"_s, 1234}}},
};
for (const auto &member : newRoom.initialMembers) {
stateEvents += QJsonObject{
{u"content"_s, QJsonObject{{u"displayname"_s, u"User"_s}, {u"membership"_s, u"join"_s}}},
{u"event_id"_s, generateEventId()},
{u"origin_server_ts"_s, QDateTime::currentMSecsSinceEpoch()},
{u"room_id"_s, newRoom.roomId},
{u"sender"_s, member},
{u"state_key"_s, member},
{u"type"_s, u"m.room.member"_s},
{u"unsigned"_s, QJsonObject{{u"age"_s, 1234}}},
};
}
auto room = QJsonObject{{u"state"_s, QJsonObject{{u"events"_s, stateEvents}}}};
QJsonArray roomAccountData;
QJsonObject tags;
for (const auto &tag : newRoom.tags) {
tags[tag] = QJsonObject();
}
if (!tags.empty()) {
roomAccountData += QJsonObject{{u"type"_s, u"m.tag"_s}, {u"content"_s, QJsonObject{{u"tags"_s, tags}}}};
}
if (roomAccountData.size() > 0) {
room[u"account_data"] = QJsonObject{{u"events"_s, roomAccountData}};
}
joinRooms[newRoom.roomId] = room;
}
}
for (const auto &change : changes) {
for (const auto &invitation : change.invitations) {
// TODO: The invitation could be for a room we haven't joined yet. Shouldn't be necessary for now, though.
auto stateEvents = joinRooms[invitation.roomId][u"state"_s][u"events"_s].toArray();
stateEvents += QJsonObject{
{u"content"_s, QJsonObject{{u"displayname"_s, u"User"_s}, {u"membership"_s, u"invite"_s}}},
{u"event_id"_s, generateEventId()},
{u"origin_server_ts"_s, QDateTime::currentMSecsSinceEpoch()},
{u"room_id"_s, invitation.roomId},
{u"sender"_s, u"@user:localhost:1234"_s},
{u"state_key"_s, invitation.userId},
{u"type"_s, u"m.room.member"_s},
{u"unsigned"_s, QJsonObject{{u"age"_s, 1234}}},
};
if (joinRooms.contains(invitation.roomId)) {
auto room = joinRooms[invitation.roomId].toObject();
room[u"state"_s] = QJsonObject{{u"events"_s, stateEvents}};
joinRooms[invitation.roomId] = room;
} else {
joinRooms[invitation.roomId] = QJsonObject{{u"state"_s,
QJsonObject{
{u"events"_s, stateEvents},
}}};
}
}
}
for (const auto &change : changes) {
for (const auto &ban : change.bans) {
// TODO: The ban could be for a room we haven't joined yet. Shouldn't be necessary for now, though.
auto stateEvents = joinRooms[ban.roomId][u"state"_s][u"events"_s].toArray();
stateEvents += QJsonObject{
{u"content"_s, QJsonObject{{u"displayname"_s, u"User"_s}, {u"membership"_s, u"ban"_s}}},
{u"event_id"_s, generateEventId()},
{u"origin_server_ts"_s, QDateTime::currentMSecsSinceEpoch()},
{u"room_id"_s, ban.roomId},
{u"sender"_s, u"@user:localhost:1234"_s},
{u"state_key"_s, ban.userId},
{u"type"_s, u"m.room.member"_s},
{u"unsigned"_s, QJsonObject{{u"age"_s, 1234}}},
};
if (joinRooms.contains(ban.roomId)) {
auto room = joinRooms[ban.roomId].toObject();
room[u"state"_s] = QJsonObject{{u"events"_s, stateEvents}};
joinRooms[ban.roomId] = room;
} else {
joinRooms[ban.roomId] = QJsonObject{{u"state"_s,
QJsonObject{
{u"events"_s, stateEvents},
}}};
}
}
}
for (const auto &change : changes) {
for (const auto &join : change.joins) {
// TODO: The join could be for a room we haven't joined yet. Shouldn't be necessary for now, though.
auto stateEvents = joinRooms[join.roomId][u"state"_s][u"events"_s].toArray();
stateEvents += QJsonObject{
{u"content"_s, QJsonObject{{u"displayname"_s, u"User"_s}, {u"membership"_s, u"join"_s}}},
{u"event_id"_s, generateEventId()},
{u"origin_server_ts"_s, QDateTime::currentMSecsSinceEpoch()},
{u"room_id"_s, join.roomId},
{u"sender"_s, u"@user:localhost:1234"_s},
{u"state_key"_s, join.userId},
{u"type"_s, u"m.room.member"_s},
{u"unsigned"_s, QJsonObject{{u"age"_s, 1234}}},
};
if (joinRooms.contains(join.roomId)) {
auto room = joinRooms[join.roomId].toObject();
room[u"state"_s] = QJsonObject{{u"events"_s, stateEvents}};
joinRooms[join.roomId] = room;
} else {
joinRooms[join.roomId] = QJsonObject{{u"state"_s,
QJsonObject{
{u"events"_s, stateEvents},
}}};
}
}
}
for (const auto &change : changes) {
for (const auto &state : change.stateEvents) {
const auto &roomId = state.fullJson[u"room_id"_s].toString();
// TODO: The join could be for a room we haven't joined yet. Shouldn't be necessary for now, though.
auto stateEvents = joinRooms[roomId][u"state"_s][u"events"_s].toArray();
stateEvents.append(state.fullJson);
auto room = joinRooms[roomId].toObject();
room[u"state"_s] = QJsonObject{{u"events"_s, stateEvents}};
joinRooms[roomId] = room;
}
}
for (const auto &change : changes) {
for (const auto &event : change.events) {
// TODO the room might be in a different join state.
auto timeline = joinRooms[event.fullJson[u"room_id"_s].toString()][u"timeline"_s][u"events"_s].toArray();
timeline += event.fullJson;
if (joinRooms.contains(event.fullJson[u"room_id"_s].toString())) {
auto room = joinRooms[event.fullJson[u"room_id"_s].toString()].toObject();
room[u"timeline"_s] = QJsonObject{{u"events"_s, timeline}};
joinRooms[event.fullJson[u"room_id"_s].toString()] = room;
} else {
joinRooms[event.fullJson[u"room_id"_s].toString()] = QJsonObject{
{u"timeline"_s, QJsonObject{{u"events"_s, timeline}}},
};
}
}
}
QJsonObject syncData = {
// {u"account_data"_s, QJsonObject {}},
// {u"presence"_s, QJsonObject {}},
{u"next_batch"_s, QString::number(m_state.size())},
};
QJsonObject rooms;
if (!joinRooms.isEmpty()) {
rooms[u"join"_s] = joinRooms;
}
if (!rooms.empty()) {
syncData[u"rooms"_s] = rooms;
}
responder.write(QJsonDocument(syncData), QHttpServerResponder::StatusCode::Ok);
}

80
autotests/server.h Normal file
View File

@@ -0,0 +1,80 @@
// SPDX-FileCopyrightText: 2025 Tobias Fella <tobias.fella@kde.org>
// SPDX-License-Identifier: LGPL-2.0-or-later
#include <QHttpServer>
#include <QJsonObject>
#include <QSslServer>
struct Changes {
struct NewRoom {
QStringList initialMembers;
QString roomId;
QStringList tags;
};
QList<NewRoom> newRooms;
struct InviteUser {
QString userId;
QString roomId;
};
QList<InviteUser> invitations;
struct BanUser {
QString userId;
QString roomId;
};
QList<BanUser> bans;
struct JoinUser {
QString userId;
QString roomId;
};
QList<JoinUser> joins;
struct Event {
QJsonObject fullJson;
};
QList<Event> events;
QList<Event> stateEvents;
};
struct RoomData {
QStringList members;
QString id;
QStringList tags;
};
class Server : public QObject
{
Q_OBJECT
public:
Server();
void start();
/**
* Create a room and place the user with id matrixId in it.
* Returns the room's id
*/
QString createRoom(const QString &matrixId);
void inviteUser(const QString &roomId, const QString &matrixId);
void banUser(const QString &roomId, const QString &matrixId);
void joinUser(const QString &roomId, const QString &matrixId);
/**
* Create a server notices room.
*/
QString createServerNoticesRoom(const QString &matrixId);
QString sendEvent(const QString &roomId, const QString &eventType, const QJsonObject &content);
QString sendStateEvent(const QString &roomId, const QString &eventType, const QString &stateKey, const QJsonObject &content);
private:
QHttpServer m_server;
QSslServer m_sslServer;
void sync(const QHttpServerRequest &request, QHttpServerResponder &responder);
QList<Changes> m_state;
};

View File

@@ -0,0 +1,87 @@
// SPDX-FileCopyrightText: 2025 Tobias Fella <tobias.fella@kde.org>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QObject>
#include <QSignalSpy>
#include <QTest>
#include <KLocalizedString>
#include <Quotient/connection.h>
#include <Quotient/eventstats.h>
#include <Quotient/quotient_common.h>
#include <Quotient/syncdata.h>
#include "accountmanager.h"
#include "neochatroom.h"
#include "roommanager.h"
#include "server.h"
#include "testutils.h"
using namespace Quotient;
class ServerNoticesTest : public QObject
{
Q_OBJECT
private:
NeoChatConnection *connection = nullptr;
Server server;
private Q_SLOTS:
void initTestCase();
void test();
};
void ServerNoticesTest::initTestCase()
{
Connection::setRoomType<NeoChatRoom>();
server.start();
KLocalizedString::setApplicationDomain(QByteArrayLiteral("neochat"));
auto accountManager = new AccountManager(true);
QSignalSpy spy(accountManager, &AccountManager::connectionAdded);
connection = dynamic_cast<NeoChatConnection *>(accountManager->accounts()->front());
QVERIFY(connection);
auto roomId = server.createRoom(u"@user:localhost:1234"_s);
RoomManager::instance().setConnection(connection);
QSignalSpy syncSpy(connection, &Connection::syncDone);
// We need to wait for two syncs, as the next one won't have the changes yet
QVERIFY(syncSpy.wait());
QVERIFY(syncSpy.wait());
auto room = dynamic_cast<NeoChatRoom *>(connection->room(roomId));
QVERIFY(room);
}
void ServerNoticesTest::test()
{
auto roomTreeModel = RoomManager::instance().roomTreeModel();
QCOMPARE(roomTreeModel->rowCount(roomTreeModel->index(NeoChatRoomType::ServerNotice, 0)), 0);
auto sortFilterRoomTreeModel = RoomManager::instance().sortFilterRoomTreeModel();
const auto roomId = server.createServerNoticesRoom(u"@user:localhost:1234"_s);
QSignalSpy syncSpy(connection, &Connection::syncDone);
QVERIFY(syncSpy.wait());
QVERIFY(syncSpy.wait());
const auto room = dynamic_cast<NeoChatRoom *>(connection->room(roomId));
QVERIFY(connection->room(roomId)->isServerNoticeRoom());
QCOMPARE(roomTreeModel->rowCount(roomTreeModel->index(NeoChatRoomType::ServerNotice, 0)), 1);
QCOMPARE(sortFilterRoomTreeModel->mapFromSource(roomTreeModel->indexForRoom(room)).parent().row(), 1 /* Below the normal room */);
server.sendEvent(roomId,
u"m.room.message"_s,
QJsonObject{
{u"body"_s, u"Foo"_s},
{u"format"_s, u"org.matrix.custom.html"_s},
{u"formatted_body"_s, u"Foo"_s},
{u"msgtype"_s, u"m.text"_s},
});
QVERIFY(syncSpy.wait());
QVERIFY(syncSpy.wait());
sortFilterRoomTreeModel->invalidate();
QCOMPARE(sortFilterRoomTreeModel->mapFromSource(roomTreeModel->indexForRoom(room)).parent().row(), 0);
room->markAllMessagesAsRead();
QCOMPARE(sortFilterRoomTreeModel->mapFromSource(roomTreeModel->indexForRoom(room)).parent().row(), 1 /* Below the normal room */);
}
QTEST_GUILESS_MAIN(ServerNoticesTest)
#include "servernoticestest.moc"

56
autotests/testutils.h Normal file
View File

@@ -0,0 +1,56 @@
// SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QTest>
#include <Quotient/events/event.h>
#include <Quotient/syncdata.h>
#include "neochatroom.h"
namespace Quotient
{
class Connection;
}
namespace TestUtils
{
class TestRoom : public NeoChatRoom
{
public:
TestRoom(Quotient::Connection *connection, const QString &roomName, const QString &syncFileName = {})
: NeoChatRoom(connection, roomName, Quotient::JoinState::Join)
{
syncNewEvents(syncFileName);
}
void update(Quotient::SyncRoomData &&data, bool fromCache = false)
{
Room::updateData(std::move(data), fromCache);
}
void syncNewEvents(const QString &syncFileName)
{
if (!syncFileName.isEmpty()) {
QFile testSyncFile;
testSyncFile.setFileName(QStringLiteral(DATA_DIR) + u'/' + syncFileName);
Q_UNUSED(testSyncFile.open(QIODevice::ReadOnly));
const auto testSyncJson = QJsonDocument::fromJson(testSyncFile.readAll());
Quotient::SyncRoomData roomData(id(), Quotient::JoinState::Join, testSyncJson.object());
update(std::move(roomData));
}
}
};
template<Quotient::EventClass EventT>
inline Quotient::event_ptr_tt<EventT> loadEventFromFile(const QString &eventFileName)
{
if (!eventFileName.isEmpty()) {
QFile testEventFile;
testEventFile.setFileName(QStringLiteral(DATA_DIR) + u'/' + eventFileName);
Q_UNUSED(testEventFile.open(QIODevice::ReadOnly));
auto testSyncJson = QJsonDocument::fromJson(testEventFile.readAll()).object();
return Quotient::loadEvent<EventT>(testSyncJson);
}
return nullptr;
}
}

View File

@@ -0,0 +1,695 @@
// SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QObject>
#include <QTest>
#include "texthandler.h"
#include <Quotient/quotient_common.h>
#include <Quotient/syncdata.h>
#include <Kirigami/Platform/PlatformTheme>
#include "enums/messagecomponenttype.h"
#include "models/customemojimodel.h"
#include "neochatconnection.h"
#include "testutils.h"
using namespace Quotient;
class TextHandlerTest : public QObject
{
Q_OBJECT
private:
Connection *connection = nullptr;
TestUtils::TestRoom *room = nullptr;
private Q_SLOTS:
void initTestCase();
void allowedAttributes();
void stripDisallowedTags();
void stripDisallowedAttributes();
void emptyCodeTags();
void addStyle_data();
void addStyle();
void dontAddStyle_data();
void dontAddStyle();
void sendSimpleStringCase();
void sendSingleParaMarkup();
void sendMultipleSectionMarkup();
void sendBadLinks();
void sendEscapeCode();
void sendCodeClass();
void sendCustomEmoji();
void sendCustomEmojiCode_data();
void sendCustomEmojiCode();
void sendCustomTags_data();
void sendCustomTags();
void receiveSpacelessSelfClosingTag();
void receiveStripReply();
void receivePlainTextIn();
void receiveRichInPlainOut_data();
void receiveRichInPlainOut();
void receivePlainStripHtml();
void receivePlainStripMarkup();
void receiveStripNewlines();
void receiveRichUserPill();
void receiveRichStrikethrough();
void receiveRichtextIn();
void receiveRichMxcUrl();
void receiveRichPlainUrl_data();
void receiveRichPlainUrl();
void receiveRichEdited_data();
void receiveRichEdited();
void receiveLineSeparator();
void receiveRichCodeUrl();
void receiveRichColor();
void componentOutput_data();
void componentOutput();
void updateSpoiler_data();
void updateSpoiler();
};
void TextHandlerTest::initTestCase()
{
connection = Connection::makeMockConnection(u"@bob:kde.org"_s);
connection->setAccountData(u"im.ponies.user_emotes"_s,
QJsonObject{{"images"_L1,
QJsonObject{{"test"_L1,
QJsonObject{{"body"_L1, "Test custom emoji"_L1},
{"url"_L1, "mxc://example.org/test"_L1},
{"usage"_L1, QJsonArray{"emoticon"_L1}}}}}}});
CustomEmojiModel::instance().setConnection(static_cast<NeoChatConnection *>(connection));
room = new TestUtils::TestRoom(connection, u"#myroom:kde.org"_s, u"test-texthandler-sync.json"_s);
}
void TextHandlerTest::allowedAttributes()
{
auto theme = static_cast<Kirigami::Platform::PlatformTheme *>(qmlAttachedPropertiesObject<Kirigami::Platform::PlatformTheme>(this, true));
const QString testInputString1 = u"<span data-mx-spoiler><font color=#FFFFFF>Test</font><span>"_s;
const QString testOutputString1S = u"<span data-mx-spoiler><font color=#FFFFFF>Test</font><span>"_s;
const QString testOutputString1R = u"<span data-mx-spoiler style=\"color: transparent; background: %1;\"><font color=#FFFFFF>Test</font><span>"_s.arg(
theme->alternateBackgroundColor().name());
// Handle urls where the href has either single (') or double (") quotes.
const QString testInputString2 = u"<a href=\"https://kde.org\">link</a><a href='https://kde.org'>link</a>"_s;
const QString testOutputString2S = u"<a href=\"https://kde.org\">link</a><a href='https://kde.org'>link</a>"_s;
const QString testOutputString2R =
u"<a href=\"https://kde.org\" style=\"text-decoration: none;\">link</a><a href='https://kde.org' style=\"text-decoration: none;\">link</a>"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString1);
QCOMPARE(testTextHandler.handleSendText(), testOutputString1S);
QCOMPARE(testTextHandler.handleRecieveRichText(), testOutputString1R);
testTextHandler.setData(testInputString2);
QCOMPARE(testTextHandler.handleSendText(), testOutputString2S);
QCOMPARE(testTextHandler.handleRecieveRichText(), testOutputString2R);
}
void TextHandlerTest::stripDisallowedTags()
{
const QString testInputString = u"<p>Allowed</p> <span>Allowed</span> <body>Disallowed</body>"_s;
const QString testOutputString = u"<p>Allowed</p> <span>Allowed</span> Disallowed"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleSendText(), testOutputString);
QCOMPARE(testTextHandler.handleRecieveRichText(), testOutputString);
}
void TextHandlerTest::stripDisallowedAttributes()
{
const QString testInputString = u"<p style=\"font-size:50px;\" color=#FFFFFF>Test</p>"_s;
const QString testOutputString = u"Test"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleSendText(), testOutputString);
QCOMPARE(testTextHandler.handleRecieveRichText(), testOutputString);
}
/**
* Make sure that empty code tags are handled.
* (this was a bug during development hence the test)
*/
void TextHandlerTest::emptyCodeTags()
{
const QString testInputString = u"<pre><code></code></pre>"_s;
const QString testOutputString = u"<pre><code></code></pre>"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleSendText(), testOutputString);
QCOMPARE(testTextHandler.handleRecieveRichText(), testOutputString);
}
void TextHandlerTest::addStyle_data()
{
QTest::addColumn<QString>("testInputString");
QTest::addColumn<QString>("testOutputString");
QTest::newRow("link") << u"<a href=\"https://kde.org\">link</a>"_s << u"<a href=\"https://kde.org\" style=\"text-decoration: none;\">link</a>"_s;
QTest::newRow("table")
<< u"<table><tr><th>Company</th><th>Contact</th><th>Country</th></tr><tr><td>Alfreds Futterkiste</td><td>Maria Anders</td><td>Germany</td></tr><tr><td>Centro comercial Moctezuma</td><td>Francisco Chang</td><td>Mexico</td></tr></table>"_s
<< u"<table style=\"width: 100%; border-collapse: collapse; border: 1px; border-style: solid;\"><tr><th style=\"border: 1px solid black; padding: 3px;\">Company</th><th style=\"border: 1px solid black; padding: 3px;\">Contact</th><th style=\"border: 1px solid black; padding: 3px;\">Country</th></tr><tr><td style=\"border: 1px solid black; padding: 3px;\">Alfreds Futterkiste</td><td style=\"border: 1px solid black; padding: 3px;\">Maria Anders</td><td style=\"border: 1px solid black; padding: 3px;\">Germany</td></tr><tr><td style=\"border: 1px solid black; padding: 3px;\">Centro comercial Moctezuma</td><td style=\"border: 1px solid black; padding: 3px;\">Francisco Chang</td><td style=\"border: 1px solid black; padding: 3px;\">Mexico</td></tr></table>"_s;
auto theme = static_cast<Kirigami::Platform::PlatformTheme *>(qmlAttachedPropertiesObject<Kirigami::Platform::PlatformTheme>(this, true));
QTest::newRow("spoiler") << u"<span data-mx-spoiler><font color=#FFFFFF>Test</font><span>"_s
<< u"<span data-mx-spoiler style=\"color: transparent; background: %1;\"><font color=#FFFFFF>Test</font><span>"_s.arg(
theme->alternateBackgroundColor().name());
}
void TextHandlerTest::addStyle()
{
QFETCH(QString, testInputString);
QFETCH(QString, testOutputString);
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleRecieveRichText(), testOutputString);
}
void TextHandlerTest::dontAddStyle_data()
{
QTest::addColumn<QString>("testInputString");
QTest::addColumn<QString>("testOutputString");
QTest::newRow("link") << u"<a href=\"https://kde.org\">link</a>"_s << u"<a href=\"https://kde.org\">link</a>"_s;
QTest::newRow("table")
<< u"<table><tr><th>Company</th><th>Contact</th><th>Country</th></tr><tr><td>Alfreds Futterkiste</td><td>Maria Anders</td><td>Germany</td></tr><tr><td>Centro comercial Moctezuma</td><td>Francisco Chang</td><td>Mexico</td></tr></table>"_s
<< u"<table><tr><th>Company</th><th>Contact</th><th>Country</th></tr><tr><td>Alfreds Futterkiste</td><td>Maria Anders</td><td>Germany</td></tr><tr><td>Centro comercial Moctezuma</td><td>Francisco Chang</td><td>Mexico</td></tr></table>"_s;
QTest::newRow("spoiler") << u"<span data-mx-spoiler><font color=#FFFFFF>Test</font><span>"_s
<< u"<span data-mx-spoiler><font color=#FFFFFF>Test</font><span>"_s;
}
void TextHandlerTest::dontAddStyle()
{
QFETCH(QString, testInputString);
QFETCH(QString, testOutputString);
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleSendText(), testOutputString);
}
void TextHandlerTest::sendSimpleStringCase()
{
const QString testInputString = u"This data should just be left alone."_s;
const QString testOutputString = u"This data should just be left alone."_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleSendText(), testOutputString);
}
void TextHandlerTest::sendSingleParaMarkup()
{
const QString testInputString =
u"Text para with **bold**, *italic*, [link](https://kde.org), ![image](mxc://kde.org/aebd3ffd40503e1ef0525bf8f0d60282fec6183e), `inline code`."_s;
const QString testOutputString =
u"Text para with <strong>bold</strong>, <em>italic</em>, <a href=\"https://kde.org\">link</a>, <img src=\"mxc://kde.org/aebd3ffd40503e1ef0525bf8f0d60282fec6183e\" alt=\"image\">, <code>inline code</code>."_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleSendText(), testOutputString);
}
void TextHandlerTest::sendMultipleSectionMarkup()
{
const QString testInputString =
u"Text para\n> blockquote\n* List 1\n* List 2\n1. one\n2. two\n# Heading 1\n## Heading 2\nhorizontal rule\n\n---\n```\ncodeblock\n```"_s;
const QString testOutputString =
u"<p>Text para</p>\n<blockquote>\n<p>blockquote</p>\n</blockquote>\n<ul>\n<li>List 1</li>\n<li>List 2</li>\n</ul>\n<ol>\n<li>one</li>\n<li>two</li>\n</ol>\n<h1>Heading 1</h1>\n<h2>Heading 2</h2>\n<p>horizontal rule</p>\n<hr>\n<pre><code>codeblock\n</code></pre>"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleSendText(), testOutputString);
}
void TextHandlerTest::sendBadLinks()
{
const QString testInputString = u"[link](kde.org), ![image](https://kde.org/aebd3ffd40503e1ef0525bf8f0d60282fec6183e)"_s;
const QString testOutputString = u"<a>link</a>, <img alt=\"image\">"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleSendText(), testOutputString);
}
/**
* All text between code tags is treated as plain so it should get escaped.
*/
void TextHandlerTest::sendEscapeCode()
{
const QString testInputString = u"```\n<p>Test <span style=\"font-size:50px;\">some</span> code</p>\n```"_s;
const QString testOutputString =
u"<pre><code>&lt;p&gt;Test &lt;span style=&quot;font-size:50px;&quot;&gt;some&lt;/span&gt; code&lt;/p&gt;\n</code></pre>"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleSendText(), testOutputString);
}
void TextHandlerTest::sendCodeClass()
{
const QString testInputString = u"```html\nsome code\n```\n<pre><code class=\"code-underline\">some more code</code></pre>"_s;
const QString testOutputString = u"<pre><code class=\"language-html\">some code\n</code></pre>\n<pre><code>some more code</code></pre>"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleSendText(), testOutputString);
}
void TextHandlerTest::sendCustomEmoji()
{
const QString testInputString = u":test:"_s;
const QString testOutputString =
u"<img data-mx-emoticon=\"\" src=\"mxc://example.org/test\" alt=\":test:\" title=\":test:\" height=\"32\" vertical-align=\"middle\" />"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleSendText(), testOutputString);
}
void TextHandlerTest::sendCustomEmojiCode_data()
{
QTest::addColumn<QString>("testInputString");
QTest::addColumn<QString>("testOutputString");
QTest::newRow("inline") << u"`:test:`"_s << u"<code>:test:</code>"_s;
QTest::newRow("block") << u"```\n:test:\n```"_s << u"<pre><code>:test:\n</code></pre>"_s;
}
// Custom emojis in code blocks should be left alone.
void TextHandlerTest::sendCustomEmojiCode()
{
QFETCH(QString, testInputString);
QFETCH(QString, testOutputString);
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleSendText(), testOutputString);
}
void TextHandlerTest::sendCustomTags_data()
{
QTest::addColumn<QString>("testInputString");
QTest::addColumn<QString>("testOutputString");
// spoiler
QTest::newRow("incomplete spoiler") << u"||test"_s << u"||test"_s;
QTest::newRow("complete spoiler") << u"||test||"_s << u"<span data-mx-spoiler>test</span>"_s;
QTest::newRow("multiple spoiler") << u"||apple||banana||pear||"_s << u"<span data-mx-spoiler>apple</span>banana<span data-mx-spoiler>pear</span>"_s;
QTest::newRow("inside code block spoiler") << u"```||apple||```"_s << u"<code>||apple||</code>"_s;
QTest::newRow("outside code block spoiler") << u"||apple|| ```||banana||``` ||pear||"_s
<< u"<span data-mx-spoiler>apple</span> <code>||banana||</code> <span data-mx-spoiler>pear</span>"_s;
QTest::newRow("complex spoiler") << u"Between `formFactor == Horizontal||Vertical` and `location == top||left||bottom||right`"_s
<< u"Between <code>formFactor == Horizontal||Vertical</code> and <code>location == top||left||bottom||right</code>"_s;
// strikethrough
QTest::newRow("incomplete strikethrough") << u"~~test"_s << u"~~test"_s;
QTest::newRow("complete strikethrough") << u"~~test~~"_s << u"<del>test</del>"_s;
QTest::newRow("inside code block strikethrough") << u"```~~apple~~```"_s << u"<code>~~apple~~</code>"_s;
QTest::newRow("outside code block strikethrough") << u"~~apple~~ ```~~banana~~``` ~~pear~~"_s
<< u"<del>apple</del> <code>~~banana~~</code> <del>pear</del>"_s;
}
void TextHandlerTest::sendCustomTags()
{
QFETCH(QString, testInputString);
QFETCH(QString, testOutputString);
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleSendText(), testOutputString);
}
void TextHandlerTest::receiveSpacelessSelfClosingTag()
{
const QString testInputString = u"Test...<br/>...ing"_s;
const QString testRichOutputString = u"Test...<br/>...ing"_s;
const QString testPlainOutputString = u"Test...\n...ing"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleRecieveRichText(), testRichOutputString);
QCOMPARE(testTextHandler.handleRecievePlainText(Qt::RichText), testPlainOutputString);
}
void TextHandlerTest::receiveStripReply()
{
const QString testInputString =
u"<mx-reply><blockquote><a href=\"https://matrix.to/#/!somewhere:example.org/$event:example.org\">In reply to</a><a href=\"https://matrix.to/#/@alice:example.org\">@alice:example.org</a><br />Message replied to.</blockquote></mx-reply>Reply message."_s;
const QString testOutputString = u"Reply message."_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleRecieveRichText(), testOutputString);
QCOMPARE(testTextHandler.handleRecievePlainText(), testOutputString);
}
void TextHandlerTest::receiveRichInPlainOut_data()
{
QTest::addColumn<QString>("testInputString");
QTest::addColumn<QString>("testOutputString");
QTest::newRow("ampersand") << u"a &amp; b"_s << u"a & b"_s;
QTest::newRow("quote") << u"&quot;a and b&quot;"_s << u"\"a and b\""_s;
QTest::newRow("new line") << u"new<br>line"_s << u"new\nline"_s;
QTest::newRow("unescape") << u"can&#x27;t"_s << u"can't"_s;
}
void TextHandlerTest::receiveRichInPlainOut()
{
QFETCH(QString, testInputString);
QFETCH(QString, testOutputString);
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleRecievePlainText(Qt::RichText), testOutputString);
}
void TextHandlerTest::receivePlainTextIn()
{
const QString testInputString = u"<plain text in tag bracket>\nTest link https://kde.org."_s;
const QString testOutputStringRich =
u"&lt;plain text in tag bracket&gt;<br>Test link <a href=\"https://kde.org\" style=\"text-decoration: none;\">https://kde.org</a>."_s;
QString testOutputStringPlain = u"<plain text in tag bracket>\nTest link https://kde.org."_s;
// Make sure quotes are maintained in a plain string.
const QString testInputString2 = u"last line is \"Time to switch to a new topic.\""_s;
const QString testOutputString2 = u"last line is \"Time to switch to a new topic.\""_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleRecieveRichText(Qt::PlainText), testOutputStringRich);
QCOMPARE(testTextHandler.handleRecievePlainText(), testOutputStringPlain);
testTextHandler.setData(testInputString2);
QCOMPARE(testTextHandler.handleRecieveRichText(Qt::PlainText), testOutputString2);
QCOMPARE(testTextHandler.handleRecievePlainText(), testOutputString2);
}
void TextHandlerTest::receiveStripNewlines()
{
const QString testInputStringPlain = u"Test\nmany\nnew\nlines."_s;
const QString testInputStringRich = u"Test<br>many<br />new<br>lines."_s;
const QString testOutputString = u"Test many new lines."_s;
const QString testInputStringPlain2 = u"* List\n* Items"_s;
const QString testOutputString2 = u"List Items"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputStringPlain);
QCOMPARE(testTextHandler.handleRecievePlainText(Qt::PlainText, true), testOutputString);
QCOMPARE(testTextHandler.handleRecieveRichText(Qt::PlainText, nullptr, nullptr, true), testOutputString);
testTextHandler.setData(testInputStringRich);
QCOMPARE(testTextHandler.handleRecievePlainText(Qt::RichText, true), testOutputString);
QCOMPARE(testTextHandler.handleRecieveRichText(Qt::RichText, nullptr, nullptr, true), testOutputString);
testTextHandler.setData(testInputStringPlain2);
QCOMPARE(testTextHandler.handleRecievePlainText(Qt::RichText, true), testOutputString2);
}
/**
* For a plain text output of a received string all html is stripped except for
* code which is unescaped if it's html.
*/
void TextHandlerTest::receivePlainStripHtml()
{
const QString testInputString = u"<p>Test</p> <pre><code>Some code <strong>with tags</strong></code></pre>"_s;
const QString testOutputString = u"Test Some code <strong>with tags</strong>"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleRecievePlainText(Qt::RichText), testOutputString);
}
void TextHandlerTest::receivePlainStripMarkup()
{
const QString testInputString = u"**bold** `<p>inline code</p>` *italic*"_s;
const QString testOutputString = u"bold <p>inline code</p> italic"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleRecievePlainText(), testOutputString);
}
void TextHandlerTest::receiveRichUserPill()
{
const QString testInputString = u"<p><a href=\"https://matrix.to/#/@alice:example.org\">@alice:example.org</a></p>"_s;
const QString testOutputString = u"<b><a href=\"https://matrix.to/#/@alice:example.org\" style=\"text-decoration: none;\">@alice:example.org</a></b>"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleRecieveRichText(), testOutputString);
}
void TextHandlerTest::receiveRichStrikethrough()
{
const QString testInputString = u"<p><del>Test</del></p>"_s;
const QString testOutputString = u"<s>Test</s>"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleRecieveRichText(), testOutputString);
}
void TextHandlerTest::receiveRichtextIn()
{
const QString testInputString = u"<p>Test</p> <pre><code>Some code <strong>with tags</strong></code></pre>"_s;
const QString testOutputString = u"<p>Test</p> <pre><code>Some code &lt;strong&gt;with tags&lt;/strong&gt;</code></pre>"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleRecieveRichText(), testOutputString);
}
void TextHandlerTest::receiveRichMxcUrl()
{
const QString testInputString =
u"<img src=\"mxc://kde.org/aebd3ffd40503e1ef0525bf8f0d60282fec6183e\" alt=\"image\"><img src=\"mxc://kde.org/34c3464b3a1bd7f55af2d559e07d2c773c430e73\" alt=\"image\">"_s;
const QString testOutputString =
u"<img src=\"mxc://kde.org/aebd3ffd40503e1ef0525bf8f0d60282fec6183e?user_id=@bob:kde.org&room_id=%23myroom:kde.org&event_id=$143273582443PhrSn:example.org\" alt=\"image\"><img src=\"mxc://kde.org/34c3464b3a1bd7f55af2d559e07d2c773c430e73?user_id=@bob:kde.org&room_id=%23myroom:kde.org&event_id=$143273582443PhrSn:example.org\" alt=\"image\">"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleRecieveRichText(Qt::RichText, room, room->messageEvents().at(0).get()), testOutputString);
}
void TextHandlerTest::receiveRichPlainUrl_data()
{
QTest::addColumn<QString>("input");
QTest::addColumn<QString>("output");
// This is an actual link that caused trouble which is why it's so long. Keeping
// so we can confirm consistent behaviour for complex urls.
QTest::addRow("link 1")
<< u"https://matrix.to/#/!RvzunyTWZGfNxJVQqv:matrix.org/$-9TJVTh5PvW6MvIhFDwteiyLBVGriinueO5eeIazQS8?via=libera.chat&amp;via=matrix.org&amp;via=fedora.im <a href=\"https://matrix.to/#/!RvzunyTWZGfNxJVQqv:matrix.org/$-9TJVTh5PvW6MvIhFDwteiyLBVGriinueO5eeIazQS8?via=libera.chat&amp;via=matrix.org&amp;via=fedora.im\">Link already rich</a>"_s
<< u"<a href=\"https://matrix.to/#/!RvzunyTWZGfNxJVQqv:matrix.org/$-9TJVTh5PvW6MvIhFDwteiyLBVGriinueO5eeIazQS8?via=libera.chat&amp;via=matrix.org&amp;via=fedora.im\" style=\"text-decoration: none;\">https://matrix.to/#/!RvzunyTWZGfNxJVQqv:matrix.org/$-9TJVTh5PvW6MvIhFDwteiyLBVGriinueO5eeIazQS8?via=libera.chat&amp;via=matrix.org&amp;via=fedora.im</a> <a href=\"https://matrix.to/#/!RvzunyTWZGfNxJVQqv:matrix.org/$-9TJVTh5PvW6MvIhFDwteiyLBVGriinueO5eeIazQS8?via=libera.chat&amp;via=matrix.org&amp;via=fedora.im\" style=\"text-decoration: none;\">Link already rich</a>"_s;
// Another real case. The linkification wasn't handling it when a single link
// contains what looks like and email. It was broken into 3 but needs to
// be just single link.
QTest::addRow("link 2")
<< u"https://lore.kernel.org/lkml/CAHk-=wio46vC4t6xXD-sFqjoPwFm_u515jm3suzmkGxQTeA1_A@mail.gmail.com/"_s
<< u"<a href=\"https://lore.kernel.org/lkml/CAHk-=wio46vC4t6xXD-sFqjoPwFm_u515jm3suzmkGxQTeA1_A@mail.gmail.com/\" style=\"text-decoration: none;\">https://lore.kernel.org/lkml/CAHk-=wio46vC4t6xXD-sFqjoPwFm_u515jm3suzmkGxQTeA1_A@mail.gmail.com/</a>"_s;
QTest::addRow("email")
<< uR"(email@example.com <a href="mailto:email@example.com">Link already rich</a>)"_s
<< uR"(<a href="mailto:email@example.com" style="text-decoration: none;">email@example.com</a> <a href="mailto:email@example.com" style="text-decoration: none;">Link already rich</a>)"_s;
QTest::addRow("mxid")
<< u"@user:kde.org <a href=\"https://matrix.to/#/@user:kde.org\">Link already rich</a>"_s
<< u"<b><a href=\"https://matrix.to/#/@user:kde.org\" style=\"text-decoration: none;\">@user:kde.org</a></b> <b><a href=\"https://matrix.to/#/@user:kde.org\" style=\"text-decoration: none;\">Link already rich</a></b>"_s;
QTest::addRow("mxid with prefix") << u"a @user:kde.org b"_s
<< u"a <b><a href=\"https://matrix.to/#/@user:kde.org\" style=\"text-decoration: none;\">@user:kde.org</a></b> b"_s;
}
/**
* For when your rich input string has a plain text url left in.
*
* This test is to show that a url that is already rich will be left alone but a
* plain one will be linkified.
*/
void TextHandlerTest::receiveRichPlainUrl()
{
QFETCH(QString, input);
QFETCH(QString, output);
TextHandler testTextHandler;
testTextHandler.setData(input);
QCOMPARE(testTextHandler.handleRecieveRichText(Qt::RichText), output);
}
void TextHandlerTest::receiveRichEdited_data()
{
QTest::addColumn<QString>("testInputString");
QTest::addColumn<QString>("testOutputString");
auto theme = static_cast<Kirigami::Platform::PlatformTheme *>(qmlAttachedPropertiesObject<Kirigami::Platform::PlatformTheme>(this, true));
QTest::newRow("basic") << u"Edited"_s << u"Edited <span style=\"color:%1\">(edited)</span>"_s.arg(theme ? theme->disabledTextColor().name() : u"#000000"_s);
QTest::newRow("multiple paragraphs") << u"<p>Edited</p>\n<p>Edited</p>"_s
<< u"<p>Edited</p>\n<p>Edited <span style=\"color:%1\">(edited)</span></p>"_s.arg(
theme ? theme->disabledTextColor().name() : u"#000000"_s);
}
void TextHandlerTest::receiveRichEdited()
{
QFETCH(QString, testInputString);
QFETCH(QString, testOutputString);
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
const auto event = eventCast<const Quotient::RoomMessageEvent>(room->messageEvents().at(2).get());
QCOMPARE(testTextHandler.handleRecieveRichText(Qt::RichText, room, event, false, event->isReplaced()), testOutputString);
}
void TextHandlerTest::receiveLineSeparator()
{
auto text = u"foo\u2028bar"_s;
TextHandler textHandler;
textHandler.setData(text);
QCOMPARE(textHandler.handleRecievePlainText(Qt::PlainText, true), u"foo bar"_s);
}
void TextHandlerTest::receiveRichCodeUrl()
{
auto input = u"<code>https://kde.org</code>"_s;
TextHandler testTextHandler;
testTextHandler.setData(input);
QCOMPARE(testTextHandler.handleRecieveRichText(), input);
}
void TextHandlerTest::receiveRichColor()
{
const QString testInputString =
u"<span data-mx-color=\"#ff00be\">¯</span><span data-mx-color=\"#ff3b1d\">\\</span><span data-mx-color=\"#ffa600\">_</span><span data-mx-color=\"#64d200\">(</span><span data-mx-color=\"#00e261\">ツ</span><span data-mx-color=\"#00e7ff\">)</span><span data-mx-color=\"#00e1ff\">_</span><span data-mx-color=\"#00bdff\">/</span><span data-mx-color=\"#ff60ff\">¯</span>"_s;
const QString testOutputString =
u"<span style=\"color: #ff00be;\">¯</span><span style=\"color: #ff3b1d;\">\\</span><span style=\"color: #ffa600;\">_</span><span style=\"color: #64d200;\">(</span><span style=\"color: #00e261;\">ツ</span><span style=\"color: #00e7ff;\">)</span><span style=\"color: #00e1ff;\">_</span><span style=\"color: #00bdff;\">/</span><span style=\"color: #ff60ff;\">¯</span>"_s;
TextHandler testTextHandler;
testTextHandler.setData(testInputString);
QCOMPARE(testTextHandler.handleRecieveRichText(), testOutputString);
}
void TextHandlerTest::componentOutput_data()
{
QTest::addColumn<QString>("testInputString");
QTest::addColumn<QList<MessageComponent>>("testOutputComponents");
QTest::newRow("multiple paragraphs") << u"<p>Text</p>\n<p>Text</p>"_s
<< QList<MessageComponent>{MessageComponent{MessageComponentType::Text, u"Text"_s, {}},
MessageComponent{MessageComponentType::Text, u"Text"_s, {}}};
QTest::newRow("code") << u"<p>Text</p>\n<pre><code class=\"language-html\">Some code\n</code></pre>"_s
<< QList<MessageComponent>{MessageComponent{MessageComponentType::Text, u"Text"_s, {}},
MessageComponent{MessageComponentType::Code, u"Some code"_s, QVariantMap{{u"class"_s, u"html"_s}}}};
QTest::newRow("quote") << u"<p>Text</p>\n<blockquote>\n<p>blockquote</p>\n</blockquote>"_s
<< QList<MessageComponent>{MessageComponent{MessageComponentType::Text, u"Text"_s, {}},
MessageComponent{MessageComponentType::Quote, u"“blockquote”"_s, {}}};
QTest::newRow("multiple paragraph quote") << u"<blockquote>\n<p>blockquote</p>\n<p>next paragraph</p>\n</blockquote>"_s
<< QList<MessageComponent>{
MessageComponent{MessageComponentType::Quote, u"<p>“blockquote</p>\n<p>next paragraph”</p>"_s, {}}};
QTest::newRow("no tag first paragraph") << u"Text\n<p>Text</p>"_s
<< QList<MessageComponent>{MessageComponent{MessageComponentType::Text, u"Text"_s, {}},
MessageComponent{MessageComponentType::Text, u"Text"_s, {}}};
QTest::newRow("no tag last paragraph") << u"<p>Text</p>\nText"_s
<< QList<MessageComponent>{MessageComponent{MessageComponentType::Text, u"Text"_s, {}},
MessageComponent{MessageComponentType::Text, u"Text"_s, {}}};
QTest::newRow("inline code") << u"<p><code>https://kde.org</code></p>\n<p>Text</p>"_s
<< QList<MessageComponent>{MessageComponent{MessageComponentType::Text, u"<code>https://kde.org</code>"_s, {}},
MessageComponent{MessageComponentType::Text, u"Text"_s, {}}};
QTest::newRow("inline code single block") << u"<code>https://kde.org</code>"_s
<< QList<MessageComponent>{MessageComponent{MessageComponentType::Text, u"<code>https://kde.org</code>"_s, {}}};
QTest::newRow("long start tag")
<< u"Ah, you mean something like<br/><pre data-md=\"```\"><code class=\"language-qml\"># main.qml\nimport CustomQml\n...\nControls.TextField { id: someField }\nCustomQml {\n someTextProperty: someField.text\n}\n</code></pre>Sure you can, it's still local to the same file where you defined the id"_s
<< QList<MessageComponent>{
MessageComponent{MessageComponentType::Text, u"Ah, you mean something like<br/>"_s, {}},
MessageComponent{
MessageComponentType::Code,
u"# main.qml\nimport CustomQml\n...\nControls.TextField { id: someField }\nCustomQml {\n someTextProperty: someField.text\n}"_s,
QVariantMap{{u"class"_s, u"qml"_s}}},
MessageComponent{MessageComponentType::Text, u"Sure you can, it's still local to the same file where you defined the id"_s, {}}};
}
void TextHandlerTest::componentOutput()
{
QFETCH(QString, testInputString);
QFETCH(QList<MessageComponent>, testOutputComponents);
TextHandler testTextHandler;
QCOMPARE(testTextHandler.textComponents(testInputString), testOutputComponents);
}
void TextHandlerTest::updateSpoiler_data()
{
QTest::addColumn<QString>("testInputString");
QTest::addColumn<QString>("testOutputString");
QTest::addColumn<bool>("spoilerRevealed");
auto theme = static_cast<Kirigami::Platform::PlatformTheme *>(qmlAttachedPropertiesObject<Kirigami::Platform::PlatformTheme>(this, true));
QTest::newRow("same length") << u"<span data-mx-spoiler style=\"color: #123456; background: #123456;\">Test<span>"_s
<< u"<span data-mx-spoiler style=\"color: transparent; background: %1;\">Test<span>"_s.arg(
theme->alternateBackgroundColor().name())
<< false;
QTest::newRow("different length") << u"<span data-mx-spoiler style=\"color: short; background: looooooooooong;\">Test<span>"_s
<< u"<span data-mx-spoiler style=\"color: transparent; background: %1;\">Test<span>"_s.arg(
theme->alternateBackgroundColor().name())
<< false;
QTest::newRow("spoiler revealed")
<< u"<span data-mx-spoiler style=\"color: transparent; background: %1;\">Test<span>"_s.arg(theme->alternateBackgroundColor().name())
<< u"<span data-mx-spoiler style=\"color: %1; background: %2;\">Test<span>"_s.arg(theme->textColor().name(), theme->alternateBackgroundColor().name())
<< true;
}
void TextHandlerTest::updateSpoiler()
{
QFETCH(QString, testInputString);
QFETCH(QString, testOutputString);
QFETCH(bool, spoilerRevealed);
QCOMPARE(TextHandler::updateSpoilerText(this, testInputString, spoilerRevealed), testOutputString);
}
QTEST_MAIN(TextHandlerTest)
#include "texthandlertest.moc"

View File

@@ -0,0 +1,222 @@
// SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QObject>
#include <QSignalSpy>
#include <QTest>
#include <Quotient/connection.h>
#include <Quotient/quotient_common.h>
#include <Quotient/syncdata.h>
#include "enums/delegatetype.h"
#include "models/timelinemessagemodel.h"
#include "neochatroom.h"
#include "testutils.h"
using namespace Quotient;
class TimelineMessageModelTest : public QObject
{
Q_OBJECT
private:
Connection *connection = nullptr;
TimelineMessageModel *model = nullptr;
private Q_SLOTS:
void initTestCase();
void init();
void switchEmptyRoom();
void switchSyncedRoom();
void simpleTimeline();
void syncNewEvents();
void pendingEvent();
void disconnect();
void idToRow();
void cleanup();
};
void TimelineMessageModelTest::initTestCase()
{
connection = Connection::makeMockConnection(u"@bob:kde.org"_s);
}
void TimelineMessageModelTest::init()
{
QCOMPARE(model, nullptr);
model = new TimelineMessageModel;
}
// Make sure that basic empty rooms can be switched without crashing.
void TimelineMessageModelTest::switchEmptyRoom()
{
auto firstRoom = new TestUtils::TestRoom(connection, u"#firstRoom:kde.org"_s);
auto secondRoom = new TestUtils::TestRoom(connection, u"#secondRoom:kde.org"_s);
QSignalSpy spy(model, SIGNAL(roomChanged(NeoChatRoom *, NeoChatRoom *)));
QCOMPARE(model->room(), nullptr);
model->setRoom(firstRoom);
QCOMPARE(spy.count(), 1);
QCOMPARE(model->room()->id(), u"#firstRoom:kde.org"_s);
model->setRoom(secondRoom);
QCOMPARE(spy.count(), 2);
QCOMPARE(model->room()->id(), u"#secondRoom:kde.org"_s);
model->setRoom(nullptr);
QCOMPARE(spy.count(), 3);
QCOMPARE(model->room(), nullptr);
}
// Make sure that rooms with some events can be switched without crashing
void TimelineMessageModelTest::switchSyncedRoom()
{
auto firstRoom = new TestUtils::TestRoom(connection, u"#firstRoom:kde.org"_s, u"test-messageventmodel-sync.json"_s);
auto secondRoom = new TestUtils::TestRoom(connection, u"#secondRoom:kde.org"_s, u"test-messageventmodel-sync.json"_s);
QSignalSpy spy(model, SIGNAL(roomChanged(NeoChatRoom *, NeoChatRoom *)));
QCOMPARE(model->room(), nullptr);
model->setRoom(firstRoom);
QCOMPARE(spy.count(), 1);
QCOMPARE(model->room()->id(), u"#firstRoom:kde.org"_s);
model->setRoom(secondRoom);
QCOMPARE(spy.count(), 2);
QCOMPARE(model->room()->id(), u"#secondRoom:kde.org"_s);
model->setRoom(nullptr);
QCOMPARE(spy.count(), 3);
QCOMPARE(model->room(), nullptr);
}
void TimelineMessageModelTest::simpleTimeline()
{
auto room = new TestUtils::TestRoom(connection, u"#myroom:kde.org"_s, u"test-messageventmodel-sync.json"_s);
model->setRoom(room);
QCOMPARE(model->rowCount(), 2);
QCOMPARE(model->data(model->index(0), TimelineMessageModel::DelegateTypeRole), DelegateType::State);
QCOMPARE(model->data(model->index(0)), u"changed their display name to Example Changed"_s);
QCOMPARE(model->data(model->index(1)), u"<b>This is an example<br>text message</b>"_s);
QCOMPARE(model->data(model->index(1), TimelineMessageModel::DelegateTypeRole), DelegateType::Message);
QCOMPARE(model->data(model->index(1), TimelineMessageModel::EventIdRole), u"$153456789:example.org"_s);
QTest::ignoreMessage(QtWarningMsg, "Index QModelIndex(-1,-1,0x0,QObject(0x0)) is not valid (expected valid)");
QCOMPARE(model->data(model->index(-1)), QVariant());
QTest::ignoreMessage(QtWarningMsg, "Index QModelIndex(-1,-1,0x0,QObject(0x0)) is not valid (expected valid)");
QCOMPARE(model->data(model->index(model->rowCount())), QVariant());
}
// Sync some events into the TimelineMessageModel's current room and don't crash.
void TimelineMessageModelTest::syncNewEvents()
{
auto room = new TestUtils::TestRoom(connection, u"#myroom:kde.org"_s);
QSignalSpy spy(room, SIGNAL(aboutToAddNewMessages(Quotient::RoomEventsRange)));
model->setRoom(room);
QCOMPARE(model->rowCount(), 0);
room->syncNewEvents(u"test-messageventmodel-sync.json"_s);
QCOMPARE(model->rowCount(), 2);
QCOMPARE(spy.count(), 1);
}
// Check the adding of pending events to the room doesn't cause any issues in the model.
void TimelineMessageModelTest::pendingEvent()
{
QSignalSpy spyInsert(model, SIGNAL(rowsInserted(const QModelIndex &, int, int)));
QSignalSpy spyRemove(model, SIGNAL(rowsRemoved(const QModelIndex &, int, int)));
QSignalSpy spyChanged(model, SIGNAL(dataChanged(const QModelIndex, const QModelIndex, const QList<int> &)));
auto room = new TestUtils::TestRoom(connection, u"#myroom:kde.org"_s);
model->setRoom(room);
QCOMPARE(model->rowCount(), 0);
#if Quotient_VERSION_MINOR > 9
auto txnId = room->postText("New plain message"_L1);
#else
auto txnId = room->postPlainText("New plain message"_L1);
#endif
QCOMPARE(model->rowCount(), 1);
QCOMPARE(spyInsert.count(), 1);
room->discardMessage(txnId);
QCOMPARE(model->rowCount(), 0);
QCOMPARE(spyRemove.count(), 1);
#if Quotient_VERSION_MINOR > 9
txnId = room->postText("New plain message"_L1);
#else
txnId = room->postPlainText("New plain message"_L1);
#endif
QCOMPARE(model->rowCount(), 1);
QCOMPARE(spyInsert.count(), 2);
// We need to manually set the transaction ID of the new message as it will be
// different every time.
QFile testSyncFile;
testSyncFile.setFileName(QStringLiteral(DATA_DIR) + u'/' + u"test-pending-sync.json"_s);
QVERIFY(testSyncFile.open(QIODevice::ReadOnly));
auto testSyncJson = QJsonDocument::fromJson(testSyncFile.readAll());
auto root = testSyncJson.object();
auto timeline = root["timeline"_L1].toObject();
auto events = timeline["events"_L1].toArray();
auto firstEvent = events[0].toObject();
firstEvent.insert("unsigned"_L1, QJsonObject{{"transaction_id"_L1, txnId}});
events[0] = firstEvent;
timeline.insert("events"_L1, events);
root.insert("timeline"_L1, timeline);
testSyncJson.setObject(root);
SyncRoomData roomData(u"@bob:kde.org"_s, JoinState::Join, testSyncJson.object());
room->update(std::move(roomData));
QCOMPARE(model->rowCount(), 1);
// The model will throw multiple data changed signals we need the one that refreshes
// the IsPendingRole.
QCOMPARE(spyChanged.count() > 0, true);
auto isPendingChanged = false;
for (auto signal : spyChanged) {
auto roles = signal.at(2).toList();
if (roles.contains(TimelineMessageModel::IsPendingRole)) {
isPendingChanged = true;
}
}
QCOMPARE(isPendingChanged, true);
}
// Make sure that the signals are disconnecting correctly when a room is switched.
void TimelineMessageModelTest::disconnect()
{
auto room = new TestUtils::TestRoom(connection, u"#myroom:kde.org"_s);
model->setRoom(room);
QSignalSpy spy(model, SIGNAL(rowsInserted(const QModelIndex &, int, int)));
model->setRoom(nullptr);
room->syncNewEvents(u"test-messageventmodel-sync.json"_s);
QCOMPARE(spy.count(), 0);
}
void TimelineMessageModelTest::idToRow()
{
auto room = new TestUtils::TestRoom(connection, u"#myroom:kde.org"_s, u"test-min-sync.json"_s);
model->setRoom(room);
QCOMPARE(model->indexForEventId(u"$153456789:example.org"_s).row(), 0);
}
void TimelineMessageModelTest::cleanup()
{
delete model;
model = nullptr;
QCOMPARE(model, nullptr);
}
QTEST_MAIN(TimelineMessageModelTest)
#include "timelinemessagemodeltest.moc"

View File

@@ -0,0 +1,89 @@
// SPDX-FileCopyrightText: 2023 James Graham <james.h.graham@protonmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <QQmlApplicationEngine>
#include <QTest>
#include <QWindow>
#include <KConfig>
#include <KSharedConfig>
#include <KWindowConfig>
#include "windowcontroller.h"
class WindowControllerTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void nullWindow();
void showAndRaise();
void toggle();
void cleanup();
};
// Basically don't crash when no window is set.
void WindowControllerTest::nullWindow()
{
auto &instance = WindowController::instance();
QCOMPARE(instance.window(), nullptr);
instance.showAndRaiseWindow({});
instance.toggleWindow();
}
void WindowControllerTest::showAndRaise()
{
auto &instance = WindowController::instance();
QWindow window;
instance.setWindow(&window);
QCOMPARE(window.isVisible(), false);
instance.showAndRaiseWindow({});
QCOMPARE(window.isVisible(), true);
}
void WindowControllerTest::cleanup()
{
auto &instance = WindowController::instance();
instance.setWindow(nullptr);
QCOMPARE(instance.window(), nullptr);
}
void WindowControllerTest::toggle()
{
auto &instance = WindowController::instance();
QWindow window;
instance.setWindow(&window);
QCOMPARE(window.isVisible(), false);
instance.toggleWindow();
QCOMPARE(window.isVisible(), true);
instance.toggleWindow();
QCOMPARE(window.isVisible(), false);
// A window is classed as visible by qt when minimized but to the user this is not visible.
// So in this case we expect to show it even though visibility is technically true.
window.setVisibility(QWindow::Minimized);
QCOMPARE(window.windowState(), Qt::WindowMinimized);
QCOMPARE(window.isVisible(), true);
instance.toggleWindow();
QCOMPARE(window.windowState(), Qt::WindowNoState);
QCOMPARE(window.isVisible(), true);
instance.toggleWindow();
QCOMPARE(window.windowState(), Qt::WindowNoState);
QCOMPARE(window.isVisible(), false);
// make sure we restore maximized state when toggling
instance.toggleWindow();
window.setVisibility(QWindow::Maximized);
QCOMPARE(window.windowState(), Qt::WindowMaximized);
instance.toggleWindow();
QCOMPARE(window.isVisible(), false);
instance.toggleWindow();
QCOMPARE(window.windowState(), Qt::WindowMaximized);
QCOMPARE(window.isVisible(), true);
}
QTEST_MAIN(WindowControllerTest)
#include "windowcontrollertest.moc"

View File

@@ -1,14 +0,0 @@
# SPDX-FileCopyrightText: 2020 Carl Schwan <carl@carlschwan.eu>
# SPDX-License-Identifier: BSD-2-Clause
include(GNUInstallDirs)
# Include FontConfig config which uses the Emoji One font from the
# KDE Flatpak SDK.
install(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Flatpak/99-noto-mono-color-emoji.conf
DESTINATION
${CMAKE_INSTALL_SYSCONFDIR}/fonts/conf.d/
)

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>Noto Color Emoji</family>
</prefer>
</alias>
<alias>
<family>sans-serif</family>
<prefer>
<family>Noto Color Emoji</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>Noto Color Emoji</family>
</prefer>
</alias>
</fontconfig>

5
doc/CMakeLists.txt Normal file
View File

@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: 2022 Carl Schwan <carl@carlschwan.eu>
#
# SPDX-License-Identifier: GPL-3.0-or-later
kdoctools_create_manpage(man-neochat.1.docbook 1 INSTALL_DESTINATION ${KDE_INSTALL_MANDIR})

85
doc/man-neochat.1.docbook Normal file
View File

@@ -0,0 +1,85 @@
<?xml version="1.0" ?>
<!DOCTYPE refentry PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN" "dtd/kdedbx45.dtd" [
<!ENTITY % English "INCLUDE">
]>
<!--
SPDX-FileCopyrightText: 2022 Carl Schwan <carl@carlschwan.eu>
SPDX-License-Identifier: CC-BY-SA-4.0
-->
<refentry lang="&language;">
<refentryinfo>
<title>NeoChat User's Manual</title>
<author><firstname>Carl</firstname><surname>Schwan</surname>
<contrib>NeoChat man page.</contrib>
<email>carl@carlschwan.eu</email></author>
<date>2022-11-01</date>
<releaseinfo>22.09</releaseinfo>
<productname>NeoChat</productname>
</refentryinfo>
<refmeta>
<refentrytitle>
<command>neochat</command>
</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>neochat</refname>
<refpurpose>Client for interacting with the matrix messaging protocol</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
<command>neochat</command>
<arg choice="opt"><replaceable>URI</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1 id="description">
<title>Description</title>
<para>
<command>neochat</command> is a chat application for the matrix protocol
that work on both desktop and mobile.
</para>
</refsect1>
<refsect1 id="options"><title>Options</title>
<variablelist>
<varlistentry>
<term><option>URI</option></term>
<listitem>
<para>
The matrix uri for an user or a room. e.g matrix:u/user:example.org and
matrix:r/root:example.org. This will makes NeoChat try to open the given
room or conversation.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 id="bug">
<title>Reporting bugs</title>
<para>You can report bugs and feature requests at <ulink url="https://bugs.kde.org/enter_bug.cgi?product=NeoChat&amp;component=General">https://bugs.kde.org/enter_bug.cgi?product=NeoChat&amp;component=General</ulink></para>
</refsect1>
<refsect1>
<title>See Also</title>
<simplelist>
<member>
A list of frequently asked questions about Matrix <ulink url="https://matrix.org/faq/">https://matrix.org/faq/</ulink>
</member>
<member>kf5options(7)</member>
<member>qt5options(7)</member>
</simplelist>
</refsect1>
<refsect1 id="copyright"><title>Copyright</title>
<para>Copyright &copy; 2020-2022 Tobias Fella </para>
<para>Copyright &copy; 2020-2022 Carl Schwan </para>
<para>License: GNU General Public Version 3 or later &lt;<ulink url="https://www.gnu.org/licenses/gpl-3.0.html">https://www.gnu.org/licenses/gpl-3.0.html</ulink>&gt;</para>
</refsect1>
</refentry>

BIN
icons/150-apps-neochat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
icons/300-apps-neochat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
icons/44-apps-neochat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -1,197 +0,0 @@
// SPDX-FileCopyrightText: 2020 Carl Schwan <carl@carlschwan.de>
// SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0
import NeoChat.Page 1.0
Loader {
id: root
property var attachmentMimetype: FileType.mimeTypeForUrl(ChatBoxHelper.attachmentPath)
readonly property bool hasImage: attachmentMimetype.valid && FileType.supportedImageFormats.includes(attachmentMimetype.preferredSuffix)
active: visible
sourceComponent: Component {
Pane {
id: attachmentPane
property string baseFileName: ChatBoxHelper.attachmentPath.toString().substring(ChatBoxHelper.attachmentPath.toString().lastIndexOf('/') + 1, ChatBoxHelper.attachmentPath.length)
Kirigami.Theme.colorSet: Kirigami.Theme.View
contentItem: Item {
property real spacing: attachmentPane.spacing > 0 ? attachmentPane.spacing : toolBar.spacing
implicitWidth: Math.max(image.implicitWidth, imageBusyIndicator.implicitWidth, fileInfoLayout.implicitWidth, toolBar.implicitWidth)
implicitHeight: Math.max(
(hasImage ? Math.max(image.preferredHeight, imageBusyIndicator.implicitHeight) + spacing : 0)
+ fileInfoLayout.implicitHeight,
toolBar.implicitHeight
)
Image {
id: image
property real preferredHeight: Math.min(implicitHeight, Kirigami.Units.gridUnit * 8)
height: preferredHeight
anchors {
horizontalCenter: parent.horizontalCenter
bottom: fileInfoLayout.top
bottomMargin: parent.spacing
}
width: Math.min(implicitWidth, attachmentPane.availableWidth)
asynchronous: true
cache: false // Cache is not needed. Images will rarely be shown repeatedly.
smooth: height == preferredHeight && parent.height == parent.implicitHeight // Don't smooth until height animation stops
source: hasImage ? ChatBoxHelper.attachmentPath : ""
visible: hasImage
fillMode: Image.PreserveAspectFit
onSourceChanged: {
// Reset source size height, which affect implicitHeight
sourceSize.height = -1
}
onSourceSizeChanged: {
if (implicitHeight > Kirigami.Units.gridUnit * 8) {
// This can save a lot of RAM when loading large images.
// It also improves visual quality for large images.
sourceSize.height = Kirigami.Units.gridUnit * 8
}
}
Behavior on height {
NumberAnimation {
property: "height"
duration: Kirigami.Units.shortDuration
easing.type: Easing.OutCubic
}
}
}
BusyIndicator {
id: imageBusyIndicator
anchors {
horizontalCenter: parent.horizontalCenter
top: parent.top
bottom: fileInfoLayout.top
bottomMargin: parent.spacing
}
visible: running
running: image.visible && image.progress < 1
}
RowLayout {
id: fileInfoLayout
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: undefined
anchors.bottom: parent.bottom
spacing: parent.spacing
Kirigami.Icon {
id: mimetypeIcon
implicitHeight: Kirigami.Units.fontMetrics.roundedIconSize(fileLabel.implicitHeight)
implicitWidth: implicitHeight
source: attachmentMimetype.iconName
}
Label {
id: fileLabel
text: baseFileName
}
states: State {
when: !hasImage
AnchorChanges {
target: fileInfoLayout
anchors.bottom: undefined
anchors.verticalCenter: parent.verticalCenter
}
}
}
// Using a toolbar to get a button spacing consistent with what the QQC2 style normally has
// Also has some accessibility info
ToolBar {
id: toolBar
width: parent.width
anchors.top: parent.top
leftPadding: 0
rightPadding: 0
topPadding: 0
bottomPadding: 0
Kirigami.Theme.inherit: true
Kirigami.Theme.colorSet: Kirigami.Theme.View
contentItem: RowLayout {
spacing: parent.spacing
Label {
Layout.leftMargin: -attachmentPane.leftPadding
Layout.topMargin: -attachmentPane.topPadding
leftPadding: cancelAttachmentButton.leftPadding + 1 + attachmentPane.leftPadding
rightPadding: cancelAttachmentButton.rightPadding + 1
topPadding: cancelAttachmentButton.topPadding + attachmentPane.topPadding
bottomPadding: cancelAttachmentButton.bottomPadding
text: i18n("Attachment:")
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
background: Kirigami.ShadowedRectangle {
property real cornerRadius: cancelAttachmentButton.background.hasOwnProperty("radius") ?
Math.min(cancelAttachmentButton.background.radius, height/2) : 0
corners.bottomLeftRadius: toolBar.mirrored ? cornerRadius : 0
corners.bottomRightRadius: toolBar.mirrored ? 0 : cornerRadius
color: Kirigami.Theme.backgroundColor
opacity: 0.75
}
}
Item {
Layout.fillWidth: true
}
Button {
id: editImageButton
visible: hasImage
icon.name: "document-edit"
text: i18n("Edit")
display: AbstractButton.IconOnly
Component {
id: imageEditorPage
ImageEditorPage {
imagePath: ChatBoxHelper.attachmentPath
}
}
onClicked: {
let imageEditor = applicationWindow().pageStack.layers.push(imageEditorPage);
imageEditor.newPathChanged.connect(function(newPath) {
applicationWindow().pageStack.layers.pop();
ChatBoxHelper.attachmentPath = newPath;
});
}
ToolTip.text: text
ToolTip.visible: hovered
}
Button {
id: cancelAttachmentButton
icon.name: "dialog-cancel"
text: i18n("Cancel")
display: AbstractButton.IconOnly
onClicked: ChatBoxHelper.clearAttachment();
ToolTip.text: text
ToolTip.visible: hovered
}
}
background: null
}
}
background: Rectangle {
color: Kirigami.Theme.backgroundColor
}
}
}
}

View File

@@ -1,435 +0,0 @@
// SPDX-FileCopyrightText: 2020 Carl Schwan <carl@carlschwan.de>
// SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import QtQuick.Templates 2.15 as T
import Qt.labs.platform 1.1 as Platform
import QtQuick.Window 2.15
import org.kde.kirigami 2.18 as Kirigami
import org.kde.neochat 1.0
ToolBar {
id: chatBar
property string replyEventId: ""
property string editEventId: ""
property alias inputFieldText: inputField.text
property alias textField: inputField
property alias emojiPaneOpened: emojiButton.checked
// store each user we autoComplete here, this will be helpful later to generate
// the matrix.to links.
// This use an hack to define: https://doc.qt.io/qt-5/qml-var.html#property-value-initialization-semantics
property var userAutocompleted: ({})
signal closeAllTriggered()
signal inputFieldForceActiveFocusTriggered()
signal messageSent()
signal pasteImageTriggered()
signal editLastUserMessage()
signal replyPreviousUserMessage()
property alias isCompleting: completionMenu.visible
onInputFieldForceActiveFocusTriggered: {
inputField.forceActiveFocus();
// set the cursor to the end of the text
inputField.cursorPosition = inputField.length;
}
position: ToolBar.Footer
Kirigami.Theme.colorSet: Kirigami.Theme.View
// Using a custom background because some styles like Material
// or Fusion might have ugly colors for a TextArea placed inside
// of a toolbar. ToolBar is otherwise the closest QQC2 component
// to what we want because of the padding and spacing values.
background: Rectangle {
color: Kirigami.Theme.backgroundColor
}
contentItem: RowLayout {
spacing: chatBar.spacing
ScrollView {
Layout.fillHeight: true
Layout.fillWidth: true
Layout.minimumHeight: inputField.implicitHeight
// lineSpacing is height+leading, so subtract leading once since leading only exists between lines.
Layout.maximumHeight: fontMetrics.lineSpacing * 8 - fontMetrics.leading
+ inputField.topPadding + inputField.bottomPadding
FontMetrics {
id: fontMetrics
font: inputField.font
}
TextArea {
id: inputField
focus: true
/* Some QQC2 styles will have their own predefined backgrounds for TextAreas.
* Make sure there is no background since we are using the ToolBar background.
*
* This could cause a problem if the QQC2 style was designed around TextArea
* background colors being very different from the QPalette::Base color.
* Luckily, none of the Qt QQC2 styles do that and neither do KDE's QQC2 styles.
*/
background: MouseArea {
acceptedButtons: Qt.NoButton
cursorShape: Qt.IBeamCursor
z: 1
}
leftPadding: mirrored ? 0 : Kirigami.Units.largeSpacing
rightPadding: !mirrored ? 0 : Kirigami.Units.largeSpacing
topPadding: 0
bottomPadding: 0
property real progress: 0
property bool autoAppeared: false
//property int lineHeight: contentHeight / lineCount
text: inputFieldText
placeholderText: currentRoom.usesEncryption ? i18n("This room is encrypted. Sending encrypted messages is not yet supported.") : editEventId.length > 0 ? i18n("Edit Message") : i18n("Write your message...")
verticalAlignment: TextEdit.AlignVCenter
horizontalAlignment: TextEdit.AlignLeft
wrapMode: Text.Wrap
readOnly: currentRoom.usesEncryption
Kirigami.Theme.colorSet: Kirigami.Theme.View
Kirigami.Theme.inherit: false
Kirigami.SpellChecking.enabled: true
color: Kirigami.Theme.textColor
selectionColor: Kirigami.Theme.highlightColor
selectedTextColor: Kirigami.Theme.highlightedTextColor
hoverEnabled: !Kirigami.Settings.tabletMode
selectByMouse: !Kirigami.Settings.tabletMode
ChatDocumentHandler {
id: documentHandler
document: inputField.textDocument
cursorPosition: inputField.cursorPosition
selectionStart: inputField.selectionStart
selectionEnd: inputField.selectionEnd
room: currentRoom ?? null
}
Timer {
id: timeoutTimer
repeat: false
interval: 2000
onTriggered: {
repeatTimer.stop()
currentRoom.sendTypingNotification(false)
}
}
Timer {
id: repeatTimer
repeat: true
interval: 5000
triggeredOnStart: true
onTriggered: currentRoom.sendTypingNotification(true)
}
function sendMessage(event) {
if (isCompleting) {
chatBar.complete();
isCompleting = false;
return;
}
if (event.modifiers & Qt.ShiftModifier) {
inputField.insert(cursorPosition, "\n")
} else {
chatBar.postMessage()
}
}
Keys.onReturnPressed: { sendMessage(event) }
Keys.onEnterPressed: { sendMessage(event) }
Keys.onEscapePressed: {
closeAllTriggered()
}
Keys.onPressed: {
if (event.key === Qt.Key_PageDown) {
switchRoomDown();
} else if (event.key === Qt.Key_PageUp) {
switchRoomUp();
} else if (event.key === Qt.Key_V && event.modifiers & Qt.ControlModifier) {
chatBar.pasteImage();
} else if (event.key === Qt.Key_Up && event.modifiers & Qt.ControlModifier) {
replyPreviousUserMessage();
} else if (event.key === Qt.Key_Up && inputField.text.length === 0) {
editLastUserMessage();
}
}
Keys.onBacktabPressed: {
if (event.modifiers & Qt.ControlModifier) {
switchRoomUp();
return;
}
if (!isCompleting) {
nextItemInFocusChain(false).forceActiveFocus(Qt.TabFocusReason)
return
}
if (!autoAppeared) {
let decrementedIndex = completionMenu.currentIndex - 1
// Wrap around to the last item
if (decrementedIndex < 0) {
decrementedIndex = Math.max(completionMenu.count - 1, 0) // 0 if count == 0
}
completionMenu.currentIndex = decrementedIndex
} else {
autoAppeared = false;
}
chatBar.complete();
}
// yes, decrement goes up and increment goes down visually.
Keys.onUpPressed: (event) => {
if (chatBar.isCompleting) {
event.accepted = true
completionMenu.listView.decrementCurrentIndex()
autoAppeared = true;
}
event.accepted = false
}
Keys.onDownPressed: (event) => {
if (chatBar.isCompleting) {
event.accepted = true
completionMenu.listView.incrementCurrentIndex()
autoAppeared = true;
}
event.accepted = false
}
Keys.onTabPressed: {
if (event.modifiers & Qt.ControlModifier) {
switchRoomDown();
return;
}
if (!isCompleting) {
nextItemInFocusChain().forceActiveFocus(Qt.TabFocusReason);
return;
}
// TODO detect moved cursor
// ignore first time tab was clicked so that user can select
// first emoji/user
if (!autoAppeared) {
let incrementedIndex = completionMenu.currentIndex + 1;
// Wrap around to the first item
if (incrementedIndex > completionMenu.count - 1) {
incrementedIndex = 0
}
completionMenu.currentIndex = incrementedIndex;
} else {
autoAppeared = false;
}
chatBar.complete();
}
onTextChanged: {
timeoutTimer.restart()
repeatTimer.start()
currentRoom.cachedInput = text
autoAppeared = false;
const completionInfo = documentHandler.getAutocompletionInfo(isCompleting);
if (completionInfo.type === ChatDocumentHandler.Ignore) {
if (completionInfo.keyword) {
// custom emojis
const idx = completionMenu.currentIndex;
completionMenu.model = Array.from(chatBar.customEmojiModel.filterModel(completionInfo.keyword)).concat(EmojiModel.filterModel(completionInfo.keyword))
completionMenu.currentIndex = idx;
}
return;
}
if (completionInfo.type === ChatDocumentHandler.None) {
isCompleting = false;
return;
}
completionMenu.completionType = completionInfo.type
if (completionInfo.type === ChatDocumentHandler.User) {
completionMenu.model = currentRoom.getUsers(completionInfo.keyword);
} else if (completionInfo.type === ChatDocumentHandler.Command) {
completionMenu.model = CommandModel.filterModel(completionInfo.keyword);
} else {
completionMenu.model = Array.from(chatBar.customEmojiModel.filterModel(completionInfo.keyword)).concat(EmojiModel.filterModel(completionInfo.keyword))
}
if (completionMenu.model.length === 0) {
isCompleting = false;
return;
}
if (!isCompleting) {
isCompleting = true
autoAppeared = true;
completionMenu.endPosition = cursorPosition
}
}
}
}
Item {
visible: !ChatBoxHelper.isReplying && (!ChatBoxHelper.hasAttachment || uploadingBusySpinner.running)
implicitWidth: uploadButton.implicitWidth
implicitHeight: uploadButton.implicitHeight
ToolButton {
id: uploadButton
anchors.fill: parent
// Matrix does not allow sending attachments in replies
visible: !ChatBoxHelper.isReplying && !ChatBoxHelper.hasAttachment && !uploadingBusySpinner.running
icon.name: "mail-attachment"
text: i18n("Attach an image or file")
display: AbstractButton.IconOnly
onClicked: {
if (Clipboard.hasImage) {
attachDialog.open()
} else {
var fileDialog = openFileDialog.createObject(ApplicationWindow.overlay)
fileDialog.chosen.connect((path) => {
if (!path) { return }
ChatBoxHelper.attachmentPath = path;
})
fileDialog.open()
}
}
ToolTip.text: text
ToolTip.visible: hovered
}
BusyIndicator {
id: uploadingBusySpinner
anchors.fill: parent
visible: running
running: currentRoom && currentRoom.hasFileUploading
}
}
ToolButton {
id: emojiButton
icon.name: "preferences-desktop-emoticons"
text: i18n("Add an Emoji")
display: AbstractButton.IconOnly
checkable: true
ToolTip.text: text
ToolTip.visible: hovered
}
ToolButton {
id: sendButton
icon.name: "document-send"
text: i18n("Send message")
display: AbstractButton.IconOnly
onClicked: {
chatBar.postMessage()
}
ToolTip.text: text
ToolTip.visible: hovered
}
}
Action {
id: pasteAction
shortcut: StandardKey.Paste
onTriggered: {
if (Clipboard.hasImage) {
pasteImageTriggered();
}
activeFocusItem.paste();
}
}
CompletionMenu {
id: completionMenu
width: parent.width
//height: 80 //Math.min(implicitHeight, delegate.implicitHeight * 6)
height: implicitHeight
y: -height - 1
z: 1
Behavior on height {
NumberAnimation {
property: "height"
duration: Kirigami.Units.shortDuration
easing.type: Easing.OutCubic
}
}
onCompleteTriggered: {
complete()
isCompleting = false;
}
}
property CustomEmojiModel customEmojiModel: CustomEmojiModel {
connection: Controller.activeConnection
}
function pasteImage() {
let localPath = Platform.StandardPaths.writableLocation(Platform.StandardPaths.CacheLocation) + "/screenshots/" + (new Date()).getTime() + ".png";
if (!Clipboard.saveImage(localPath)) {
return;
}
ChatBoxHelper.attachmentPath = localPath;
}
function postMessage() {
checkForFancyEffectsReason();
if (ChatBoxHelper.hasAttachment) {
// send attachment but don't reset the text
actionsHandler.postMessage("", ChatBoxHelper.attachmentPath,
ChatBoxHelper.replyEventId, ChatBoxHelper.editEventId, {}, this.customEmojiModel);
currentRoom.markAllMessagesAsRead();
messageSent();
return;
}
const re = /^s\/([^\/]*)\/([^\/]*)/;
if (Config.allowQuickEdit && re.test(inputField.text)) {
// send edited messages
actionsHandler.postEdit(inputField.text);
} else {
// send normal message
actionsHandler.postMessage(inputField.text.trim(), ChatBoxHelper.attachmentPath,
ChatBoxHelper.replyEventId, ChatBoxHelper.editEventId, userAutocompleted, this.customEmojiModel);
}
currentRoom.markAllMessagesAsRead();
inputField.clear();
inputField.text = Qt.binding(function() {
return currentRoom ? currentRoom.cachedInput : "";
});
messageSent()
}
function complete() {
documentHandler.replaceAutoComplete(completionMenu.currentDisplayText);
if (completionMenu.completionType === ChatDocumentHandler.User
&& completionMenu.currentDisplayText.length > 0
&& completionMenu.currentItem.userId.length > 0) {
userAutocompleted[completionMenu.currentDisplayText] = completionMenu.currentItem.userId;
}
}
}

View File

@@ -1,276 +0,0 @@
// SPDX-FileCopyrightText: 2020 Carl Schwan <carl@carlschwan.de>
// SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
import QtQuick.Controls 2.15 as QQC2
import Qt.labs.platform 1.1 as Platform
import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0
import NeoChat.Component.ChatBox 1.0
import NeoChat.Component.Emoji 1.0
Item {
id: root
property alias inputFieldText: chatBar.inputFieldText
signal fancyEffectsReasonFound(string fancyEffect)
signal messageSent()
signal editLastUserMessage()
signal replyPreviousUserMessage()
Kirigami.Theme.colorSet: Kirigami.Theme.View
implicitWidth: {
let w = 0
for(let i = 0; i < visibleChildren.length; ++i) {
w = Math.max(w, Math.ceil(visibleChildren[i].implicitWidth))
}
return w
}
implicitHeight: {
let h = 0
for(let i = 0; i < visibleChildren.length; ++i) {
h += Math.ceil(visibleChildren[i].implicitHeight)
}
return h
}
// For some reason, this is needed to make the height animation work even though
// it used to work and height should be directly affected by implicitHeight
height: implicitHeight
Behavior on height {
NumberAnimation {
property: "height"
duration: Kirigami.Units.shortDuration
easing.type: Easing.OutCubic
}
}
Kirigami.Separator {
id: connectionPaneSeparator
visible: connectionPane.visible
width: parent.width
height: visible ? implicitHeight : 0
anchors.bottom: connectionPane.top
z: 1
}
QQC2.Pane {
id: connectionPane
padding: fontMetrics.lineSpacing * 0.25
FontMetrics {
id: fontMetrics
font: networkLabel.font
}
spacing: 0
Kirigami.Theme.colorSet: Kirigami.Theme.View
background: Rectangle {
color: Kirigami.Theme.backgroundColor
}
visible: !Controller.isOnline
width: parent.width
QQC2.Label {
id: networkLabel
text: i18n("NeoChat is offline. Please check your network connection.")
}
anchors.bottom: emojiPickerLoaderSeparator.top
}
Kirigami.Separator {
id: emojiPickerLoaderSeparator
visible: emojiPickerLoader.visible
width: parent.width
height: visible ? implicitHeight : 0
anchors.bottom: emojiPickerLoader.top
z: 1
}
Loader {
id: emojiPickerLoader
active: visible
visible: chatBar.emojiPaneOpened
width: parent.width
height: visible ? implicitHeight : 0
anchors.bottom: replySeparator.top
sourceComponent: EmojiPicker{
textArea: chatBar.textField
onChosen: addText(emoji)
}
Behavior on height {
NumberAnimation {
property: "height"
duration: Kirigami.Units.shortDuration
easing.type: Easing.OutCubic
}
}
}
Kirigami.Separator {
id: replySeparator
visible: replyPane.visible
width: parent.width
height: visible ? implicitHeight : 0
anchors.bottom: replyPane.top
}
ReplyPane {
id: replyPane
visible: ChatBoxHelper.isReplying || ChatBoxHelper.isEditing
user: ChatBoxHelper.replyUser
width: parent.width
height: visible ? implicitHeight : 0
anchors.bottom: attachmentSeparator.top
Behavior on height {
NumberAnimation {
property: "height"
duration: Kirigami.Units.shortDuration
easing.type: Easing.OutCubic
}
}
onReplyCancelled: {
root.focusInputField()
}
}
Kirigami.Separator {
id: attachmentSeparator
visible: attachmentPane.visible
width: parent.width
height: visible ? implicitHeight : 0
anchors.bottom: attachmentPane.top
}
AttachmentPane {
id: attachmentPane
visible: ChatBoxHelper.hasAttachment
width: parent.width
height: visible ? implicitHeight : 0
anchors.bottom: chatBarSeparator.top
Behavior on height {
NumberAnimation {
property: "height"
duration: Kirigami.Units.shortDuration
easing.type: Easing.OutCubic
}
}
}
Kirigami.Separator {
id: chatBarSeparator
visible: chatBar.visible
width: parent.width
height: visible ? implicitHeight : 0
anchors.bottom: chatBar.top
}
ChatBar {
id: chatBar
visible: currentRoom.canSendEvent("m.room.message")
width: parent.width
height: visible ? implicitHeight : 0
anchors.bottom: parent.bottom
Behavior on height {
NumberAnimation {
property: "height"
duration: Kirigami.Units.shortDuration
easing.type: Easing.OutCubic
}
}
onCloseAllTriggered: closeAll()
onMessageSent: {
closeAll()
checkForFancyEffectsReason()
root.messageSent();
}
onEditLastUserMessage: {
root.editLastUserMessage();
}
onReplyPreviousUserMessage: {
root.replyPreviousUserMessage();
}
}
function checkForFancyEffectsReason() {
if (!Config.showFancyEffects) {
return
}
let text = root.inputFieldText.trim()
if (text.includes('\u{2744}')) {
root.fancyEffectsReasonFound("snowflake")
}
if (text.includes('\u{1F386}')) {
root.fancyEffectsReasonFound("fireworks")
}
if (text.includes('\u{1F387}')) {
root.fancyEffectsReasonFound("fireworks")
}
if (text.includes('\u{1F389}')) {
root.fancyEffectsReasonFound("confetti")
}
if (text.includes('\u{1F38A}')) {
root.fancyEffectsReasonFound("confetti")
}
}
function addText(text) {
root.inputFieldText = inputFieldText + text
}
function insertText(str) {
root.inputFieldText = inputFieldText.substr(0, inputField.cursorPosition) + str + inputFieldText.substr(inputField.cursorPosition)
}
function focusInputField() {
chatBar.inputFieldForceActiveFocusTriggered()
}
Connections {
target: RoomManager
function onCurrentRoomChanged() {
chatBar.userAutocompleted = {};
}
}
Connections {
target: ChatBoxHelper
function onShouldClearText() {
root.inputFieldText = "";
}
function onEditing(editContent, editFormatedContent) {
// Set the input field in edit mode
root.inputFieldText = editContent;
// clean autocompletion list
chatBar.userAutocompleted = {};
// Fill autocompletion list with values extracted from message.
// We can't just iterate on every user in the list and try to
// find matching display name since some users have display name
// matching frequent words and this will marks too many words as
// mentions.
const regex = /<a href=\"https:\/\/matrix.to\/#\/(@[a-zA-Z09]*:[a-zA-Z09.]*)\">([^<]*)<\/a>/g;
let match;
while ((match = regex.exec(editFormatedContent.toString())) !== null) {
chatBar.userAutocompleted[match[2]] = match[1];
}
chatBox.forceActiveFocus();
}
}
function closeAll() {
ChatBoxHelper.clear();
chatBar.emojiPaneOpened = false;
}
}

View File

@@ -1,162 +0,0 @@
// SPDX-FileCopyrightText: 2020 Carl Schwan <carl@carlschwan.de>
// SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import Qt.labs.qmlmodels 1.0
import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0
import NeoChat.Component 1.0
Popup {
id: control
// Expose internal ListView properties.
property alias model: completionListView.model
property alias listView: completionListView
property alias currentIndex: completionListView.currentIndex
property alias currentItem: completionListView.currentItem
property alias count: completionListView.count
property alias delegate: completionListView.delegate
// Autocomplee text
property string currentDisplayText: currentItem && (currentItem.displayName ?? "")
property int completionType: ChatDocumentHandler.Emoji
property int beginPosition: 0
property int endPosition: 0
signal completeTriggered()
Kirigami.Theme.colorSet: Kirigami.Theme.View
bottomPadding: 0
leftPadding: 0
rightPadding: 0
topPadding: 0
clip: true
onVisibleChanged: if (!visible) {
completionListView.currentIndex = 0;
}
implicitHeight: Math.min(completionListView.contentHeight, Kirigami.Units.gridUnit * 10)
contentItem: ScrollView {
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
ListView {
id: completionListView
implicitWidth: contentWidth
delegate: {
if (completionType === ChatDocumentHandler.Emoji) {
emojiDelegate
} else if (completionType === ChatDocumentHandler.Command) {
commandDelegate
} else if (completionType === ChatDocumentHandler.User) {
usernameDelegate
}
}
keyNavigationWraps: true
//interactive: Window.window ? contentHeight + control.topPadding + control.bottomPadding > Window.window.height : false
clip: true
currentIndex: control.currentIndex || 0
}
}
background: Rectangle {
color: Kirigami.Theme.backgroundColor
}
Component {
id: usernameDelegate
Kirigami.BasicListItem {
id: usernameItem
width: ListView.view.width ?? implicitWidth
property string displayName: modelData.displayName
property string userId: modelData.id
leading: Kirigami.Avatar {
implicitHeight: Kirigami.Units.gridUnit
implicitWidth: implicitHeight
source: modelData.avatarMediaId ? ("image://mxc/" + modelData.avatarMediaId) : ""
color: modelData.color ? Qt.darker(modelData.color, 1.1) : null
}
labelItem.textFormat: Text.PlainText
text: modelData.displayName
onClicked: completeTriggered();
}
}
Component {
id: emojiDelegate
Kirigami.BasicListItem {
id: emojiItem
width: ListView.view.width ?? implicitWidth
property string displayName: modelData.isCustom ? modelData.shortname : modelData.unicode
text: modelData.shortname
height: Kirigami.Units.gridUnit * 2
leading: Image {
source: modelData.isCustom ? modelData.unicode : ""
width: height
sourceSize.width: width
sourceSize.height: height
Rectangle {
anchors.fill: parent
visible: parent.status === Image.Loading
radius: height/2
gradient: ShimmerGradient { }
}
Label {
id: unicodeLabel
visible: !modelData.isCustom
font.family: 'emoji'
font.pixelSize: height - 2
text: modelData.unicode
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
anchors.fill: parent
}
}
onClicked: completeTriggered();
}
}
Component {
id: commandDelegate
Kirigami.BasicListItem {
id: commandItem
width: ListView.view.width ?? implicitWidth
text: "<i>" + modelData.parameter.replace("<", "&lt;").replace(">", "&gt;") + "</i> " + modelData.help
property string displayName: modelData.command
leading: Label {
id: commandLabel
Layout.preferredHeight: Kirigami.Units.gridUnit
Layout.preferredWidth: textMetrics.tightBoundingRect.width
text: modelData.command
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
TextMetrics {
id: textMetrics
text: modelData.command
font: commandLabel.font
}
onClicked: completeTriggered();
}
}
}

View File

@@ -1,117 +0,0 @@
// SPDX-FileCopyrightText: 2020 Carl Schwan <carl@carlschwan.de>
// SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import org.kde.kirigami 2.14 as Kirigami
import org.kde.neochat 1.0
Loader {
id: root
readonly property bool isEdit: ChatBoxHelper.isEditing
property var user: null
property string avatarMediaUrl: user ? "image://mxc/" + user.avatarMediaId : ""
signal replyCancelled()
active: visible
sourceComponent: Pane {
id: replyPane
Kirigami.Theme.colorSet: Kirigami.Theme.View
spacing: leftPadding
contentItem: RowLayout {
Layout.fillWidth: true
spacing: replyPane.spacing
FontMetrics {
id: fontMetrics
font: textArea.font
}
Kirigami.Avatar {
id: avatar
Layout.alignment: textContentLayout.height > avatar.height ? Qt.AlignHCenter | Qt.AlignTop : Qt.AlignCenter
Layout.preferredWidth: Layout.preferredHeight
Layout.preferredHeight: fontMetrics.lineSpacing * 2 - fontMetrics.leading
source: root.avatarMediaUrl
name: user ? user.displayName : ""
color: user ? user.color : "transparent"
visible: Boolean(user)
}
ColumnLayout {
id: textContentLayout
Layout.alignment: Qt.AlignCenter
Layout.fillWidth: true
spacing: fontMetrics.leading
Label {
Layout.fillWidth: true
textFormat: Text.StyledText
elide: Text.ElideRight
text: {
let heading = "<b>%1</b>"
let userName = user ? "<font color=\""+ user.color +"\">" + currentRoom.htmlSafeMemberName(user.id) + "</font>" : ""
if (isEdit) {
heading = heading.arg(i18n("Editing message:")) + "<br/>"
} else {
heading = heading.arg(i18n("Replying to %1:", userName))
}
return heading
}
}
ScrollView {
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
Layout.fillWidth: true
Layout.maximumHeight: fontMetrics.lineSpacing * 8 - fontMetrics.leading
TextArea {
id: textArea
leftPadding: 0
rightPadding: 0
topPadding: 0
bottomPadding: 0
text: {
const stylesheet = "<style> a{color:"+Kirigami.Theme.linkColor+";}.user-pill{}</style>";
const content = ChatBoxHelper.isReplying ? ChatBoxHelper.replyEventContent : ChatBoxHelper.editContent;
return stylesheet + content;
}
selectByMouse: true
selectByKeyboard: true
readOnly: true
wrapMode: Label.Wrap
textFormat: TextEdit.RichText
background: null
HoverHandler {
cursorShape: textArea.hoveredLink ? Qt.PointingHandCursor : Qt.IBeamCursor
}
}
}
}
Button {
id: cancelReplyButton
Layout.alignment: avatar.Layout.alignment
icon.name: "dialog-cancel"
text: i18n("Cancel")
display: AbstractButton.IconOnly
onClicked: {
ChatBoxHelper.clearEditReply();
root.replyCancelled();
}
ToolTip.text: text
ToolTip.visible: hovered
}
}
background: Rectangle {
color: Kirigami.Theme.backgroundColor
}
}
}

View File

@@ -1,7 +0,0 @@
module NeoChat.Component.ChatBox
ChatBox 1.0 ChatBox.qml
ChatBar 1.0 ChatBar.qml
ReplyPane 1.0 ReplyPane.qml
AttachmentPane 1.0 AttachmentPane.qml
CompletionMenu 1.0 CompletionMenu.qml
EmojiPickerPane 1.0 EmojiPickerPane.qml

View File

@@ -1,169 +0,0 @@
// SPDX-FileCopyrightText: 2018-2019 Black Hat <bhat@encom.eu.org>
// SPDX-License-Identifier: GPL-3.0-only
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0 as NeoChat
import NeoChat.Component 1.0
ColumnLayout {
id: _picker
property string emojiCategory: "history"
property var textArea
readonly property var emojiModel: NeoChat.EmojiModel
property NeoChat.CustomEmojiModel customModel: NeoChat.CustomEmojiModel {
connection: NeoChat.Controller.activeConnection
}
signal chosen(string emoji)
spacing: 0
ListView {
Layout.fillWidth: true
Layout.preferredHeight: Kirigami.Units.gridUnit * 2 + 2 // for the focus line
boundsBehavior: Flickable.DragOverBounds
clip: true
orientation: ListView.Horizontal
model: ListModel {
ListElement { label: "custom"; category: "custom" }
ListElement { label: "⌛️"; category: "history" }
ListElement { label: "😏"; category: "people" }
ListElement { label: "🌲"; category: "nature" }
ListElement { label: "🍛"; category: "food"}
ListElement { label: "🚁"; category: "activity" }
ListElement { label: "🚅"; category: "travel" }
ListElement { label: "💡"; category: "objects" }
ListElement { label: "🔣"; category: "symbols" }
ListElement { label: "🏁"; category: "flags" }
}
delegate: ItemDelegate {
id: del
required property string label
required property string category
width: contentItem.Layout.preferredWidth
height: Kirigami.Units.gridUnit * 2
contentItem: Kirigami.Heading {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
level: del.label === "custom" ? 4 : 1
Layout.preferredWidth: del.label === "custom" ? implicitWidth + Kirigami.Units.largeSpacing : Kirigami.Units.gridUnit * 2
font.family: del.label === "custom" ? "" : 'emoji'
text: del.label === "custom" ? i18n("Custom") : del.label
}
Rectangle {
anchors.bottom: parent.bottom
width: parent.width
height: 2
visible: emojiCategory === category
color: Kirigami.Theme.focusColor
}
onClicked: emojiCategory = category
}
}
Kirigami.Separator {
Layout.fillWidth: true
Layout.preferredHeight: 1
}
GridView {
Layout.fillWidth: true
Layout.preferredHeight: Kirigami.Units.gridUnit * 8
Layout.fillHeight: true
cellWidth: Kirigami.Units.gridUnit * 2
cellHeight: Kirigami.Units.gridUnit * 2
boundsBehavior: Flickable.DragOverBounds
clip: true
model: {
switch (emojiCategory) {
case "custom":
return _picker.customModel
case "history":
return emojiModel.history
case "people":
return emojiModel.people
case "nature":
return emojiModel.nature
case "food":
return emojiModel.food
case "activity":
return emojiModel.activity
case "travel":
return emojiModel.travel
case "objects":
return emojiModel.objects
case "symbols":
return emojiModel.symbols
case "flags":
return emojiModel.flags
}
return null
}
delegate: ItemDelegate {
width: Kirigami.Units.gridUnit * 2
height: Kirigami.Units.gridUnit * 2
contentItem: Kirigami.Heading {
level: 1
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.family: 'emoji'
text: modelData.isCustom ? "" : modelData.unicode
}
Image {
visible: modelData.isCustom
source: visible ? modelData.unicode : ""
anchors.fill: parent
anchors.margins: 2
sourceSize.width: width
sourceSize.height: height
Rectangle {
anchors.fill: parent
visible: parent.status === Image.Loading
radius: height/2
gradient: ShimmerGradient { }
}
}
onClicked: {
if (modelData.isCustom) {
chosen(modelData.shortname)
} else {
chosen(modelData.unicode)
}
emojiModel.emojiUsed(modelData)
}
}
ScrollBar.vertical: ScrollBar {}
}
}

View File

@@ -1,2 +0,0 @@
module NeoChat.Component.Emoji
EmojiPicker 1.0 EmojiPicker.qml

View File

@@ -1,296 +0,0 @@
// SPDX-FileCopyrightText: 2021 Alexey Andreyev <aa13q@ya.ru>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
import QtQuick 2.15
import QtQuick.Controls 2.15 as Controls
import QtQuick.Layouts 1.15
import QtQuick.Particles 2.15
import org.kde.kirigami 2.15 as Kirigami
Item {
id: item
property bool enabled: false
property int effectInterval: Kirigami.Units.veryLongDuration*10;
property color darkSnowColor: "grey"
property bool isThemeDark: Kirigami.Theme.backgroundColor.hslLightness <= darkSnowColor.hslLightness
function showConfettiEffect() {
confettiTimer.start()
}
function showSnowEffect() {
snowTimer.start()
}
function showFireworksEffect() {
fireworksTimer.start()
}
// Confetti
Timer {
id: confettiTimer
interval: item.effectInterval;
running: false;
repeat: false;
triggeredOnStart: true;
onTriggered: {
if (item.enabled) {
confettiSystem.running = !confettiSystem.running
}
}
}
ParticleSystem {
id: confettiSystem
anchors.fill: parent
running: false
onRunningChanged: {
if (running) {
opacity = 1
} else {
opacity = 0
}
}
Behavior on opacity {
SequentialAnimation {
NumberAnimation { duration: Kirigami.Units.longDuration }
}
}
ImageParticle {
source: "qrc:/imports/NeoChat/Component/confetti.png"
entryEffect: ImageParticle.Scale
rotationVariation: 360
rotationVelocity: 90
color: Qt.hsla(Math.random(), 0.5, 0.6, 1)
colorVariation: 1
}
Emitter {
anchors {
left: parent.left
right: parent.right
top: parent.top
}
sizeVariation: Kirigami.Units.iconSizes.small/2
lifeSpan: Kirigami.Units.veryLongDuration*10
size: Kirigami.Units.iconSizes.small
velocity: AngleDirection {
angle: 90
angleVariation: 42
magnitude: 500
}
}
}
// Snow
Timer {
id: snowTimer
interval: item.effectInterval;
running: false;
repeat: false;
triggeredOnStart: true;
onTriggered: {
if (item.enabled) {
snowSystem.running = !snowSystem.running
}
}
}
ParticleSystem {
id: snowSystem
anchors.fill: parent
running: false
onRunningChanged: {
if (running) {
opacity = 1
} else {
opacity = 0
}
}
Behavior on opacity {
SequentialAnimation {
NumberAnimation { duration: Kirigami.Units.longDuration }
}
}
ItemParticle {
delegate: Rectangle {
width: 10
height: width
radius: width
color: item.isThemeDark ? "white" : darkSnowColor
scale: Math.random()
opacity: Math.random()
}
}
Emitter {
anchors {
left: parent.left
right: parent.right
top: parent.top
}
sizeVariation: Kirigami.Units.iconSizes.medium
lifeSpan: Kirigami.Units.veryLongDuration*10
size: Kirigami.Units.iconSizes.large
emitRate: 42
velocity: AngleDirection {
angle: 90
angleVariation: 10
magnitude: 300
}
}
}
// Fireworks
Timer {
id: fireworksTimer
interval: item.effectInterval;
running: false;
repeat: false;
triggeredOnStart: true;
onTriggered: {
if (item.enabled) {
fireworksInternalTimer.running = !fireworksInternalTimer.running
}
}
}
Timer {
id: fireworksInternalTimer
interval: 300
triggeredOnStart: true
running: false
repeat: true
onTriggered: {
var x = Math.random() * parent.width
var y = Math.random() * parent.height
customEmit(x, y)
customEmit(x, y)
customEmit(x, y)
}
}
ParticleSystem {
id: fireworksSystem
anchors.fill: parent
running: fireworksInternalTimer.running
onRunningChanged: {
if (running) {
opacity = 1
} else {
opacity = 0
}
}
Behavior on opacity {
SequentialAnimation {
NumberAnimation { duration: Kirigami.Units.longDuration }
}
}
}
ImageParticle {
id: fireworksParticleA
system: fireworksSystem
source: "qrc:/imports/NeoChat/Component/glowdot.png"
alphaVariation: item.isThemeDark ? 0.1 : 0.1
alpha: item.isThemeDark ? 0.5 : 1
groups: ["a"]
opacity: fireworksSystem.opacity
entryEffect: ImageParticle.Scale
rotationVariation: 360
}
ImageParticle {
system: fireworksSystem
source: "qrc:/imports/NeoChat/Component/glowdot.png"
color: item.isThemeDark ? "white" : "gold"
alphaVariation: item.isThemeDark ? 0.1 : 0.1
alpha: item.isThemeDark ? 0.5 : 1
groups: ["light"]
opacity: fireworksSystem.opacity
entryEffect: ImageParticle.Scale
rotationVariation: 360
}
ImageParticle {
id: fireworksParticleB
system: fireworksSystem
source: "qrc:/imports/NeoChat/Component/glowdot.png"
alphaVariation: item.isThemeDark ? 0.1 : 0.1
alpha: item.isThemeDark ? 0.5 : 1
groups: ["b"]
opacity: fireworksSystem.opacity
entryEffect: ImageParticle.Scale
rotationVariation: 360
}
Component {
id: emitterComp
Emitter {
id: container
property int life: 23
property real targetX: 0
property real targetY: 0
width: 1
height: 1
system: fireworksSystem
size: 16
endSize: 8
sizeVariation: 5
Timer {
interval: life
running: true
onTriggered: {
container.destroy();
var randomHue = Math.random()
var lightness = item.isThemeDark ? 0.8 : 0.7
fireworksParticleA.color = Qt.hsla(randomHue, 0.8, lightness, 1)
fireworksParticleB.color = Qt.hsla(1-randomHue, 0.8, lightness, 1)
}
}
velocity: AngleDirection {angleVariation:360; magnitude: 200}
}
}
function customEmit(x,y) {
var currentSize = Math.round(Math.random() * 200) + 40
var currentLifeSpan = Math.round(Math.random() * 1000) + 100
for (var i=0; i<8; i++) {
var obj = emitterComp.createObject(parent);
obj.x = x
obj.y = y
obj.targetX = Math.random() * currentSize - currentSize/2 + obj.x
obj.targetY = Math.random() * currentSize - currentSize/2 + obj.y
obj.life = Math.round(Math.random() * 23) + 150
obj.emitRate = Math.round(Math.random() * 32) + 5
obj.lifeSpan = currentLifeSpan
const group = Math.round(Math.random() * 3);
switch (group) {
case 0:
obj.group = "light";
break;
case 1:
obj.group = "a";
break;
case 2:
obj.group = "b";
break;
}
}
}
}

View File

@@ -1,72 +0,0 @@
// SPDX-FileCopyrightText: 2019 Black Hat <bhat@encom.eu.org>
// SPDX-License-Identifier: GPL-3.0-only
import QtQuick 2.15
import QtQuick.Controls 2.15
import org.kde.kirigami 2.15 as Kirigami
ApplicationWindow {
id: root
property string filename
property url localPath
property string blurhash: ""
property int imageWidth: -1
property int imageHeight: -1
flags: Qt.FramelessWindowHint | Qt.WA_TranslucentBackground
title: i18n("Image View - %1", filename)
Shortcut {
sequence: "Escape"
onActivated: root.destroy()
}
color: Kirigami.Theme.backgroundColor
background: AbstractButton {
onClicked: root.destroy()
}
BusyIndicator {
visible: image.status !== Image.Ready && root.blurhash === ""
anchors.centerIn: parent
running: visible
}
AnimatedImage {
id: image
anchors.centerIn: parent
width: Math.min(root.imageWidth !== -1 ? root.imageWidth : sourceSize.width, root.width)
height: Math.min(root.imageHeight !== -1 ? root.imageWidth : sourceSize.height, root.height)
fillMode: Image.PreserveAspectFit
source: localPath
Image {
anchors.centerIn: parent
width: image.width
height: image.height
source: root.blurhash !== "" ? ("image://blurhash/" + root.blurhash) : ""
visible: root.blurhash !== "" && parent.status !== Image.Ready
}
}
Button {
anchors.top: parent.top
anchors.right: parent.right
text: i18n("Close")
icon.name: "dialog-close"
display: AbstractButton.IconOnly
width: Kirigami.Units.gridUnit * 2
height: Kirigami.Units.gridUnit * 2
onClicked: root.destroy()
}
}

View File

@@ -1,61 +0,0 @@
// SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
import QtQuick.Controls 2.15 as QQC2
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0
LoginStep {
id: root
readonly property var homeserver: customHomeserver.visible ? customHomeserver.text : serverCombo.currentText
property bool loading: false
title: i18nc("@title", "Select a Homeserver")
action: Kirigami.Action {
enabled: LoginHelper.homeserverReachable && !customHomeserver.visible || customHomeserver.acceptableInput
onTriggered: {
// TODO
console.log("register todo")
}
}
onHomeserverChanged: {
LoginHelper.testHomeserver("@user:" + homeserver)
}
Kirigami.FormLayout {
Component.onCompleted: Controller.testHomeserver(homeserver)
QQC2.ComboBox {
id: serverCombo
Kirigami.FormData.label: i18n("Homeserver:")
model: ["matrix.org", "kde.org", "tchncs.de", i18n("Other...")]
}
QQC2.TextField {
id: customHomeserver
Kirigami.FormData.label: i18n("Url:")
visible: serverCombo.currentIndex === 3
onTextChanged: {
Controller.testHomeserver(text)
}
validator: RegularExpressionValidator {
regularExpression: /([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9]+(:[0-9]+)?/
}
}
QQC2.Button {
id: continueButton
text: i18nc("@action:button", "Continue")
action: root.action
}
}
}

View File

@@ -1,27 +0,0 @@
// SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
// SPDX-License-Identifier: GPL-3.0-only
import QtQuick 2.15
import QtQuick.Controls 2.15 as QQC2
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0
import NeoChat.Component 1.0
Kirigami.PlaceholderMessage {
property var showContinueButton: false
property var showBackButton: false
property string title: i18n("Loading")
anchors.centerIn: parent
QQC2.Label {
text: i18n("Please wait. This might take a little while.")
}
QQC2.BusyIndicator {
Layout.alignment: Qt.AlignHCenter
}
}

View File

@@ -1,65 +0,0 @@
// SPDX-FileCopyrightText: 2020 Carl Schwan <carl@carlschwan.eu>
// SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
import QtQuick.Controls 2.15 as QQC2
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0
import NeoChat.Component 1.0
LoginStep {
id: login
showContinueButton: true
showBackButton: false
title: i18nc("@title", "Login")
message: i18n("Enter your Matrix ID")
Component.onCompleted: {
LoginHelper.matrixId = ""
}
Kirigami.FormLayout {
QQC2.TextField {
id: matrixIdField
Kirigami.FormData.label: i18n("Matrix ID:")
placeholderText: "@user:matrix.org"
onTextChanged: {
if(acceptableInput) {
LoginHelper.matrixId = text
}
}
Component.onCompleted: {
matrixIdField.forceActiveFocus()
}
Keys.onReturnPressed: {
login.action.trigger()
}
validator: RegularExpressionValidator {
regularExpression: /^\@?[a-zA-Z0-9\._=\-/]+\:[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*\.[a-zA-Z]+(:[0-9]+)?$/
}
}
}
action: Kirigami.Action {
text: LoginHelper.testing && matrixIdField.acceptableInput ? i18n("Loading") : i18nc("@action:button", "Continue")
onTriggered: {
if (LoginHelper.supportsSso && LoginHelper.supportsPassword) {
processed("qrc:/imports/NeoChat/Component/Login/LoginMethod.qml");
} else if (LoginHelper.supportsPassword) {
processed("qrc:/imports/NeoChat/Component/Login/Password.qml");
} else {
processed("qrc:/imports/NeoChat/Component/Login/Sso.qml");
}
}
enabled: LoginHelper.homeserverReachable
}
}

View File

@@ -1,32 +0,0 @@
// SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
import QtQuick.Controls 2.15 as Controls
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0
import NeoChat.Component.Login 1.0
LoginStep {
id: loginMethod
title: i18n("Login Methods")
Layout.alignment: Qt.AlignHCenter
Controls.Button {
Layout.alignment: Qt.AlignHCenter
text: i18n("Login with password")
Layout.preferredWidth: Kirigami.Units.gridUnit * 12
onClicked: processed("qrc:/imports/NeoChat/Component/Login/Password.qml")
}
Controls.Button {
Layout.alignment: Qt.AlignHCenter
text: i18n("Login with single sign-on")
Layout.preferredWidth: Kirigami.Units.gridUnit * 12
onClicked: processed("qrc:/imports/NeoChat/Component/Login/Sso.qml")
}
}

View File

@@ -1,31 +0,0 @@
// SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
import QtQuick.Controls 2.15 as Controls
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0
import NeoChat.Component.Login 1.0
LoginStep {
id: loginRegister
Layout.alignment: Qt.AlignHCenter
Controls.Button {
Layout.alignment: Qt.AlignHCenter
text: i18n("Login")
Layout.preferredWidth: Kirigami.Units.gridUnit * 12
onClicked: processed("qrc:/imports/NeoChat/Component/Login/Login.qml")
}
Controls.Button {
Layout.alignment: Qt.AlignHCenter
text: i18n("Register")
Layout.preferredWidth: Kirigami.Units.gridUnit * 12
onClicked: processed("qrc:/imports/NeoChat/Component/Login/Homeserver.qml")
}
}

View File

@@ -1,27 +0,0 @@
// SPDX-FileCopyrightText: 2020 Carl Schwan <carl@carlschwan.de>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
/// Step for the login/registration flow
ColumnLayout {
property string title: i18n("Welcome")
property string message: i18n("Welcome")
property bool showContinueButton: false
property bool showBackButton: false
property bool acceptable: false
property string previousUrl: ""
/// Process this module, this is called by the continue button.
/// Should call \sa processed when it finish successfully.
property Action action: null
/// Called when switching to the next step.
signal processed(url nextUrl)
signal showMessage(string message)
}

View File

@@ -1,52 +0,0 @@
// SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
import QtQuick.Controls 2.15 as QQC2
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0
import NeoChat.Component 1.0
LoginStep {
id: password
title: i18nc("@title", "Password")
message: i18n("Enter your password")
showContinueButton: true
showBackButton: true
previousUrl: LoginHelper.isLoggingIn ? "" : LoginHelper.supportsSso ? "qrc:/imports/NeoChat/Component/Login/LoginMethod.qml" : "qrc:/imports/NeoChat/Component/Login/Login.qml"
action: Kirigami.Action {
text: i18nc("@action:button", "Login")
enabled: passwordField.text.length > 0 && !LoginHelper.isLoggingIn
onTriggered: {
LoginHelper.login();
}
}
Connections {
target: LoginHelper
function onConnected() {
processed("qrc:/imports/NeoChat/Component/Login/Loading.qml")
}
}
Kirigami.FormLayout {
Kirigami.PasswordField {
id: passwordField
onTextChanged: LoginHelper.password = text
enabled: !LoginHelper.isLoggingIn
Component.onCompleted: {
passwordField.forceActiveFocus()
}
Keys.onReturnPressed: {
password.action.trigger()
}
}
}
}

View File

@@ -1,40 +0,0 @@
// SPDX-FileCopyrightText: 2020 Tobias Fella <fella@posteo.de>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
import QtQuick.Controls 2.15 as QQC2
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.12 as Kirigami
import org.kde.neochat 1.0
import NeoChat.Component 1.0
LoginStep {
id: root
title: i18nc("@title", "Login")
message: i18n("Login with single sign-on")
Kirigami.FormLayout {
Connections {
target: LoginHelper
function onSsoUrlChanged() {
Qt.openUrlExternally(LoginHelper.ssoUrl)
}
function onConnected() {
processed("qrc:/imports/NeoChat/Component/Login/Loading.qml")
}
}
QQC2.Button {
text: i18n("Login")
onClicked: {
LoginHelper.loginWithSso()
root.showMessage(i18n("Complete the authentication steps in your browser"))
}
Component.onCompleted: forceActiveFocus()
Keys.onReturnPressed: clicked()
}
}
}

View File

@@ -1,7 +0,0 @@
module NeoChat.Component.Login
Login 1.0 Login.qml
Password 1.0 Password.qml
LoginRegister 1.0 LoginRegister.qml
Loading 1.0 Loading.qml
LoginMethod 1.0 LoginMethod.qml
LoginStep 1.0 LoginStep.qml

View File

@@ -1,81 +0,0 @@
// SPDX-FileCopyrightText: 2021 Carson Black <uhhadd@gmail.com>
// SPDX-License-Identifier: GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.10
import QtQuick.Controls 2.12 as QQC2
import org.kde.kirigami 2.14 as Kirigami
import org.kde.kitemmodels 1.0
import org.kde.neochat 1.0
QQC2.Popup {
id: _popup
onVisibleChanged: {
if (!visible) {
return
}
quickSearch.forceActiveFocus()
quickSearch.text = ""
}
anchors.centerIn: QQC2.Overlay.overlay
background: Kirigami.Card {}
height: 2 * Math.round(implicitHeight / 2)
padding: Kirigami.Units.largeSpacing * 2
contentItem: ColumnLayout {
spacing: Kirigami.Units.largeSpacing * 2
Kirigami.SearchField {
id: quickSearch
// TODO: get this broken property removed/disabled by default in Kirigami,
// we used to be able to expect that the text field wouldn't attempt to
// perform a mini-DDOS attack using signals.
autoAccept: false
Layout.preferredWidth: Kirigami.Units.gridUnit * 21 // 3 * 7 = 21, roughly 7 avatars on screen
Keys.onLeftPressed: cView.decrementCurrentIndex()
Keys.onRightPressed: cView.incrementCurrentIndex()
onAccepted: {
const item = cView.itemAtIndex(cView.currentIndex)
RoomManager.enterRoom(item.currentRoom)
_popup.close()
}
}
ListView {
id: cView
orientation: Qt.Horizontal
spacing: Kirigami.Units.largeSpacing
model: SortFilterRoomListModel {
id: sortFilterRoomListModel
sourceModel: RoomListModel {
id: roomListModel
connection: Controller.activeConnection
}
filterText: quickSearch.text
roomSortOrder: SortFilterRoomListModel.LastActivity
}
Layout.preferredHeight: Kirigami.Units.gridUnit * 3
Layout.fillWidth: true
delegate: Kirigami.Avatar {
id: del
implicitHeight: Kirigami.Units.gridUnit * 3
implicitWidth: Kirigami.Units.gridUnit * 3
required property string avatar
required property var currentRoom
source: avatar != "" ? "image://mxc/" + avatar : ""
}
}
}
modal: true
focus: true
}

View File

@@ -1,39 +0,0 @@
// SPDX-FileCopyrightText: 2021 Carson Black <uhhadd@gmail.com>
// SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
// Not to be confused with the Shimmer project.
// I like their gradiented GTK themes though.
import QtQuick 2.15
import org.kde.kirigami 2.15 as Kirigami
Gradient {
id: gradient
orientation: Gradient.Horizontal
property color color: Kirigami.Theme.textColor
property color translucent: Qt.rgba(color.r, color.g, color.b, 0.2)
property color bright: Qt.rgba(color.r, color.g, color.b, 0.3)
property real pos: 0.5
property real offset: 0.6
property SequentialAnimation ani: SequentialAnimation {
running: true
loops: Animation.Infinite
NumberAnimation {
from: -2.0
to: 2.0
duration: 700
target: gradient
properties: "pos"
}
PauseAnimation {
duration: 300
}
}
GradientStop { position: gradient.pos-gradient.offset; color: gradient.translucent }
GradientStop { position: gradient.pos; color: gradient.bright }
GradientStop { position: gradient.pos+gradient.offset; color: gradient.translucent }
}

View File

@@ -1,62 +0,0 @@
// SPDX-FileCopyrightText: 2019-2020 Black Hat <bhat@encom.eu.org>
// SPDX-License-Identifier: GPL-3.0-only
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtGraphicalEffects 1.15
import Qt.labs.platform 1.1 as Platform
import QtMultimedia 5.15
import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0
import NeoChat.Component 1.0
import NeoChat.Dialog 1.0
import NeoChat.Menu.Timeline 1.0
Control {
id: root
Layout.fillWidth: true
Audio {
id: audio
source: currentRoom.urlToMxcUrl(content.url)
autoLoad: false
}
contentItem: ColumnLayout {
RowLayout {
ToolButton {
icon.name: audio.playbackState == Audio.PlayingState ? "media-playback-pause" : "media-playback-start"
onClicked: {
if (audio.playbackState == Audio.PlayingState) {
audio.pause()
} else {
audio.play()
}
}
}
Label {
text: model.display
}
}
RowLayout {
visible: audio.hasAudio
Layout.leftMargin: Kirigami.Units.largeSpacing
Layout.rightMargin: Kirigami.Units.largeSpacing
// Server doesn't support seeking, so use ProgressBar instead of Slider :(
ProgressBar {
from: 0
to: audio.duration
value: audio.position
}
Label {
text: Controller.formatDuration(audio.position) + "/" + Controller.formatDuration(audio.duration)
}
}
}
}

View File

@@ -1,18 +0,0 @@
// SPDX-FileCopyrightText: 2021 Tobias Fella <fella@posteo.de>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick 2.15
import QtQuick.Controls 2.15
import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0
TextEdit {
text: i18n("This message is encrypted and the sender has not shared the key with this device.")
color: Kirigami.Theme.disabledTextColor
font.pointSize: Kirigami.Theme.defaultFont.pointSize
selectByMouse: !Kirigami.Settings.isMobile
readOnly: true
wrapMode: Text.WordWrap
textFormat: Text.RichText
}

View File

@@ -1,126 +0,0 @@
// SPDX-FileCopyrightText: 2018-2019 Black Hat <bhat@encom.eu.org>
// SPDX-License-Identifier: GPL-3.0-only
import QtQuick 2.15
import QtQuick.Controls 2.15 as QQC2
import QtQuick.Layouts 1.15
import QtGraphicalEffects 1.15
import Qt.labs.platform 1.1
import org.kde.kirigami 2.15 as Kirigami
import org.kde.neochat 1.0
import NeoChat.Component 1.0
import NeoChat.Dialog 1.0
import NeoChat.Menu.Timeline 1.0
RowLayout {
id: root
property bool openOnFinished: false
readonly property bool downloaded: progressInfo && progressInfo.completed
Layout.margins: Kirigami.Units.largeSpacing
spacing: Kirigami.Units.largeSpacing
states: [
State {
name: "downloaded"
when: progressInfo.completed
PropertyChanges {
target: downloadButton
icon.name: "document-open"
QQC2.ToolTip.text: i18nc("tooltip for a button on a message; offers ability to open its downloaded file with an appropriate application", "Open File")
onClicked: openSavedFile()
}
},
State {
name: "downloading"
when: progressInfo.active
PropertyChanges {
target: sizeLabel
text: i18nc("file download progress", "%1 / %2", Controller.formatByteSize(progressInfo.progress), Controller.formatByteSize(progressInfo.total))
}
PropertyChanges {
target: downloadButton
icon.name: "media-playback-stop"
QQC2.ToolTip.text: i18nc("tooltip for a button on a message; stops downloading the message's file", "Stop Download")
onClicked: currentRoom.cancelFileTransfer(eventId)
}
},
State {
name: "raw"
when: true
PropertyChanges {
target: downloadButton
onClicked: root.saveFileAs()
}
}
]
Kirigami.Icon {
id: ikon
source: model.fileMimetypeIcon
fallback: "unknown"
}
ColumnLayout {
Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true
spacing: 0
QQC2.Label {
text: model.display
wrapMode: Text.Wrap
Layout.fillWidth: true
}
QQC2.Label {
id: sizeLabel
text: Controller.formatByteSize(content.info ? content.info.size : 0)
opacity: 0.7
Layout.fillWidth: true
}
}
QQC2.Button {
id: downloadButton
icon.name: "download"
QQC2.ToolTip.text: i18nc("tooltip for a button on a message; offers ability to download its file", "Download")
QQC2.ToolTip.visible: hovered
}
Component {
id: fileDialog
FileDialog {
fileMode: FileDialog.SaveFile
folder: StandardPaths.writableLocation(StandardPaths.DownloadLocation)
onAccepted: {
currentRoom.downloadFile(eventId, file)
}
}
}
function saveFileAs() {
var dialog = fileDialog.createObject(QQC2.ApplicationWindow.overlay)
dialog.open()
dialog.currentFile = dialog.folder + "/" + currentRoom.fileNameToDownload(eventId)
}
function openSavedFile() {
if (Qt.openUrlExternally(progressInfo.localPath)) return;
if (Qt.openUrlExternally(progressInfo.localDir)) return;
}
}

Some files were not shown because too many files have changed in this diff Show More