Commit Graph

363 Commits

Author SHA1 Message Date
Carl Schwan
ef56764a97 fix crash 2020-12-02 00:13:39 +01:00
Carl Schwan
372a60cec9 Remove loading forcing to load every room 2020-12-01 19:17:43 +01:00
Carl Schwan
29fe130f6d Use standard Ctrl+Shift+Comma shortcut for showing settings
Fix: #42
2020-12-01 15:45:41 +01:00
Carl Schwan
b62e694c97 Code style 2020-12-01 11:56:50 +01:00
Carl Schwan
c5e2acdd5d Refactor lastEvent
Now lastEvent() return the last event and lastActiveTime() and
lastEventToString() are convenient functions to get the visual
representation and the timestamp.

We are also now fetching new events when the timeline is empty
so that we can correctly order the rooms. In the future, we should
instead probably cache the last event in an SQLite database to optimize
the startup time.

This also ignore state event when the configuration ask to ignore them.

Fix: #97
2020-12-01 10:55:18 +00:00
Aleix Pol
118dabb58b Make it possible to quit the application
This will call Qt.quit when the Quit application shortcut is pressed (not just
visible=false).
2020-11-28 16:56:18 +00:00
Aleix Pol
dd8269344f Fix raising on wayland
On wayland raise doesn't imply show, so we need to do both.
2020-11-27 17:25:45 +01:00
Tobias Fella
c8553003d7 Only send a notification for events newer than one minute
To prevent notification flood on startup
A bit hacky, but good enough for now
2020-11-27 16:09:53 +01:00
Carl Schwan
962c1d8d75 Merge branch 'neroburner/neochat-fix_fallthrough_warning' 2020-11-27 00:32:39 +01:00
Carl Schwan
136a8f2af8 Clang-tidy + clang-format 2020-11-27 00:26:39 +01:00
Reinhold Gschweicher
05539dc87a Fix fallthrough warning in neochatroom 2020-11-26 23:03:31 +00:00
Tobias Fella
49881f809d Improve the 'jump to last read message' button
When loading a room, automatically load messages until the last read
message is loaded #35
Don't show the button if the message is not loaded
2020-11-26 23:05:08 +01:00
Carl Schwan
15bccad324 Fix possible container detaching 2020-11-26 15:36:48 +01:00
Carl Schwan
d6ab6bacdd Use RichText text input to provide real mentions
This use internally now a QTextDocument and a new C++ class to
manipulate the document with QTextCursor.
2020-11-26 14:25:30 +00:00
Alexey Andreev
d6e1a6a45b Improve color-coding for user disambiguation
See also: https://github.com/quotient-im/libQuotient/wiki/User-color-coding-standard-draft-proposal
2020-11-26 10:57:37 +00:00
Carl Schwan
e838f7423d Add highlight effect on mentioned messages 2020-11-26 10:20:55 +00:00
Nicolas Fella
e5064dffe5 Don't show room name in notification if equal to sender
This is the case for direct messages.
2020-11-25 20:16:56 +01:00
Nicolas Fella
619fc3907f Escape potential HTML in notifications
Originally done in https://gitlab.com/spectral-im/spectral/-/merge_requests/74
2020-11-25 00:49:19 +01:00
Aleix Pol
32b82d247f Define the KAboutData before the KDBusService
This way the service annouces itself properly as org.kde.neochat instead
of local.neochat.
2020-11-24 18:13:11 +00:00
Aleix Pol
0906e0c680 Fix system tray, clean it up
At first I noticed it wasn't working like it should, then realised it
was using APIs that are largely unadvised. Also I saw there's some kind
of system to render numbers in there but this is also something we
generally do not do. There's better ways to display such information
(e.g. using the com.canonical.Unity interface), so I wouldn't bother
having ad-hoc code in there. And if we need to have it, we better have
it in KNotifications.
It now will also use the icon from the theme.
2020-11-24 13:57:00 +00:00
Aleix Pol
092f8ee75d Do not launch the application twice
If the application is already running, simply raise the running
instance.
2020-11-24 13:12:48 +00:00
Carl Schwan
b6ad038a54 Add option to disable showing new join and leave events 2020-11-24 10:39:25 +01:00
Carl Schwan
5d221b995a Add an unified room list view
This is off by default and can be enabled in the setting
2020-11-23 17:41:56 +00:00
Nicolas Fella
a0815adbe9 Open window on system tray left click 2020-11-22 23:19:39 +00:00
Tobias Fella
0b8db12543 Don't use trayicon on android 2020-11-23 00:03:49 +01:00
Nicolas Fella
7ec6f83bcb Remove unused include 2020-11-22 16:13:40 +01:00
Carl Schwan
a7e06a6529 Improve sections
Now they are displayed for each day (if there was at least one message
on that day) instead of every few hours
2020-11-22 14:51:25 +00:00
Tobias Fella
e778c18913 Show an info message instead of an empty message for redactions
Fixes #26
2020-11-22 15:36:00 +01:00
Carl Schwan
7a30c4ba8e Possible fix for weird sorting orders on initial load
Use category sorting as default sorting mode.
2020-11-22 12:27:44 +01:00
Carl Schwan
59ae9fa18d Don't leak QSetting in emoji model 2020-11-22 11:56:19 +01:00
Carl Schwan
8f358b7680 Immediately display connect errors in the login page
This is using a Kirigami.InlineMessage component.
2020-11-22 11:02:56 +01:00
Tobias Fella
4bfbca75d8 Add action to search in room directory when search is empty in roomlist 2020-11-21 22:48:36 +01:00
Jonathan Riddell
2c7e7f4c31 cmake complains: Argument not separated from preceding token by whitespace. 2020-11-20 17:08:24 +00:00
Carl Schwan
e6ed67b1a2 Support wellknow for autentification
Now kde.org is an alias to kde.modular.im
2020-11-19 15:52:04 +00:00
Carl Schwan
7b30c199a4 [clazy] Fix allocating an unneeded temporary container
Instead of creating a new container and iterate over it, we wrap the
loop in a lambda and use the lambda for the two initial container.
2020-11-19 12:50:51 +00:00
Tobias Fella
4e2b68dc0a Make Neochat compile against libQuotient 0.6 2020-11-19 08:13:55 +00:00
Tobias Fella
10935bfb15 Bundle a bunch of missing icons 2020-11-18 23:40:20 +01:00
Tobias Fella
039816e8eb Show notifications 2020-11-18 21:14:40 +00:00
Tobias Fella
f85b2a7cba Fix room sorting 2020-11-18 21:10:41 +01:00
Carl Schwan
bd6de9cd6b Fix reply
The C++ header signature was using a C++17 type alias and this was
confusing MOC. Just changing the signature to the more verbose type name
fix the bug.
2020-11-18 13:53:19 +01:00
Tobias Fella
3a11ff614c Port away from qsTr/tr 2020-11-17 20:52:40 +01:00
Carl Schwan
03921e02a6 Remember last opened room 2020-11-17 19:45:22 +00:00
Carl Schwan
be1467f718 Save collapsed categories 2020-11-17 19:45:22 +00:00
Carl Schwan
f98834bb03 Add KConfigXt configs 2020-11-17 19:45:22 +00:00
Tobias Fella
de183caefb Apply clang-format 2020-11-17 20:25:18 +01:00
Tobias Fella
92569a8869 Remove debug message 2020-11-17 19:39:18 +01:00
Tobias Fella
93e5ad430b Fix segfault 2020-11-17 13:41:47 +01:00
Carl Schwan
8e52f645a2 Remove more old MPalette stuff 2020-11-17 11:21:56 +01:00
Carl Schwan
bd853800a6 Add PlaceholderMessage when room list is empty 2020-11-15 21:31:06 +00:00
Carl Schwan
32ea887de6 Fix undefined error 2020-11-15 22:06:49 +01:00