Commit graph

338 commits

Author SHA1 Message Date
Konstantinos Sideris
7f7f3a805b Remove dead code & small refactorings using the std library 2018-03-03 22:08:56 +02:00
Konstantinos Sideris
735d508a29 Handle empty matrix ID (regression from 9de1ec1)
fixes #259
2018-03-01 09:31:08 +02:00
Konstantinos Sideris
9de1ec1b7b Fix crash when inviting users 2018-02-28 21:14:41 +02:00
Konstantinos Sideris
12a96aae6d Add some missing references 2018-02-28 12:12:07 +02:00
Konstantinos Sideris
c75a136973 Enable room switcher only in the chat view (#251) 2018-02-26 13:17:04 +02:00
Konstantinos Sideris
f525b7e6a9 Replace login request with the one from matrix-structs 2018-02-23 22:27:59 +02:00
Konstantinos Sideris
020f153f1f Fix crash when trying to use automatically deleted ImageOverlay dialog 2018-02-20 22:08:16 +02:00
Konstantinos Sideris
f95998a64b Be explicit about the captured parameters in lambdas 2018-02-20 17:09:11 +02:00
Konstantinos Sideris
127c52e39a Scale down the preview image to fit in the application window
On macOS the modal has some extra space around the main content
that might make it unusable with a big enough image.
2018-02-19 23:33:11 +02:00
Konstantinos Sideris
1764bacd4b Move scaleImage() in Utils 2018-02-19 23:32:37 +02:00
Konstantinos Sideris
8b139c32a3 Minor adjustments 2018-02-19 22:09:21 +02:00
Konstantinos Sideris
a8e17b9c91 Notify the user on upload failures 2018-02-19 00:17:54 +02:00
christarazi
cd9d1a2ec6 Support audio, video, generic file for pasting (#220)
* Refactor widget items to use same interface

* Support audio, video, generic file for pasting

* Add utils function for human readable file sizes

* Set correct MIME type for media messages

This change also determines the size of the upload once from the
ContentLengthHeader, rather than seeking the QIODevice and asking for
its size. This prevents any future trouble in case the QIODevice is
sequential (cannot be seeked). The MIME type is also determined at
upload once, rather than using the QIODevice and the underlying data
inside.

* Allow for file urls to be used as fall-back

This fixes an issue on macOS which uses `text/uri-list` for copying
files to the clipboard.

fixes #228
2018-02-18 22:52:31 +02:00
Konstantinos Sideris
c8bfb02211 Show loading indicator while waiting for /login & /logout
fixes #208
2018-02-18 22:22:26 +02:00
Konstantinos Sideris
fdd5051dcf Remove QPropertyAnimation from modals to work around a regression on Qt 5.10.1 (#87) 2018-02-17 18:43:40 +02:00
Konstantinos Sideris
86280098b4 Implement server-side notification count 2018-02-15 21:58:57 +02:00
Konstantinos Sideris
ba8faa357f Remove empty destructors 2018-02-10 16:29:09 +02:00
Konstantinos Sideris
26f221ec23 Move LeaveRoom dialog to MainWindow (#87) 2018-02-10 16:05:31 +02:00
Konstantinos Sideris
ddcc0f7f60 Generate a date separator before local messages 2018-02-10 01:09:30 +02:00
Konstantinos Sideris
da6b816228 Remove tone emoji 2018-02-09 12:20:09 +02:00
Konstantinos Sideris
b60554b8fd Add a timeout timer for initial sync (#223, #222)
Show a better message on the login screen after an initial sync failure.
2018-02-08 19:07:58 +02:00
Chris Tarazi
2dcc01633e
Apply fixed width for checkmark for all messages 2018-02-07 21:32:21 -08:00
Chris Tarazi
a15079c68f
Fix #217: create space for checkmark beforehand 2018-02-07 21:32:20 -08:00
Konstantinos Sideris
b1f232bf86 Render messages received by /messages on demand 2018-01-30 12:56:01 -07:00
Konstantinos Sideris
86aa409c1f Register timeline item so that it will be available 2018-01-29 06:29:07 -07:00
Konstantinos Sideris
0e91dae922 Erase items using the key 2018-01-25 14:34:15 +02:00
Konstantinos Sideris
936e215aed Resize text input vertically to fit the contents 2018-01-25 07:57:19 +02:00
Konstantinos Sideris
1fad9398fc Use more stl containers & minor refactorings 2018-01-24 20:46:37 +02:00
Konstantinos Sideris
2274642f12 Show the scroll-down button when showing the timeline 2018-01-23 17:34:57 +02:00
Konstantinos Sideris
48dabdfdc7 Don't dismiss the loading overlay by clicking 2018-01-22 16:47:08 +02:00
Konstantinos Sideris
64dd4c5985 Remove Accept-Encoding header 2018-01-22 12:02:07 +02:00
Konstantinos Sideris
c59cd0e80b Load the initial cache data without blocking the UI 2018-01-21 21:43:21 +02:00
Konstantinos Sideris
c123bada94 Refactor avatar fetching in one function 2018-01-21 20:28:38 +02:00
Konstantinos Sideris
e37c2e34ce Use the Accept-Content header to enable response compression
fixes #86
fixes #89
2018-01-21 15:12:21 +02:00
Konstantinos Sideris
9de2db2fb8 Automatically focus on input when opening a dialog 2018-01-16 22:50:47 +02:00
Konstantinos Sideris
26540bd120 Hack to work around layout flickering when adding new timeline items 2018-01-16 22:24:23 +02:00
Konstantinos Sideris
af5663b6bc Add borders 2018-01-15 21:04:49 +02:00
Konstantinos Sideris
020a842aef Change cache format to not allow duplicate receipts
Convert list of receipts to map<userId, timestamp>
2018-01-14 23:37:38 +02:00
Konstantinos Sideris
4521837765 Add option to disable typing notifications
fixes #131
2018-01-14 15:57:58 +02:00
Konstantinos Sideris
c4fa8c844d Add a checkmark to messages that have been received by the server (#93) 2018-01-14 12:54:17 +02:00
Konstantinos Sideris
dfeb0c833a Move timestamps to the right 2018-01-14 12:29:54 +02:00
Konstantinos Sideris
d31a08f1d5 Keep syncing regardless of connectivity (#93) 2018-01-13 22:25:15 +02:00
Konstantinos Sideris
d3603606e7 Make some functions inline 2018-01-13 17:52:23 +02:00
Konstantinos Sideris
3929261a8e Use QSharedPointer to save RoomStates 2018-01-13 17:15:47 +02:00
krombel
f87b8fe817 Upload filter automatically and use filter_id (#201)
When a custom filter is inserted into nheko.conf or there was no filter
defined yet the default filter gets automatically uploaded.
After a successful upload the server-side generated filter-id is used.

This is done async as it is just an enhancement and it is not required
to upload the filter before the first request.
2018-01-13 14:49:51 +02:00
Konstantinos Sideris
396becbaa7 Properly assign default value to QSharedPointer for Qt5.7
[ci skip]
2018-01-12 12:35:15 +02:00
Konstantinos Sideris
daabb40bed Use Q_NULLPTR to be compatible with qt5.7
fixes #199
2018-01-12 11:27:24 +02:00
Konstantinos Sideris
5b09c8e652 Handle surrogate pairs in avatars 2018-01-12 10:21:53 +02:00
Konstantinos Sideris
8beef5e61f Dismiss modal by clicking on the overlay 2018-01-11 18:10:18 +02:00
Konstantinos Sideris
9521efab7e Lint
[ci skip]
2018-01-11 16:34:43 +02:00
krombel
0570135253 Filter out content in sync that is currently unhandled (#198)
I had a look at sync.cpp and checked which parts of the sync response
are currently handled and which not. As I think it is unnecessary to let the 
unhandled data be transmitted without being handled I added these filters.

In the same term I increased the timeout server-side to 30s as Riot
defaults to this value as well. Especially now when a lots of presence-updates 
are not send anymore this value is more relevant.

It is now also possible to use a filter that is defined in`client/sync_filter`.
Advanced users might want to set an own filter here.

[ci skip]
2018-01-11 16:33:50 +02:00
christarazi
ddfce136ed Add support for pasting images into a room (#180)
fixes #132
2018-01-10 09:52:59 +02:00
Konstantinos Sideris
53f670096c Make group's sidebar visible through an option 2018-01-09 21:57:41 +02:00
Max Sandholm
312df6f3bb Communities (#195) 2018-01-09 15:07:32 +02:00
Konstantinos Sideris
953634c9b5 Enable read receipts on messages sent through nheko 2018-01-05 15:28:38 +02:00
Konstantinos Sideris
983aea7c76 Create widgets on demand for messages added to the end of the timeline 2018-01-05 00:27:32 +02:00
Konstantinos Sideris
8a259a0f07 Add missing <functional> header 2018-01-03 20:52:12 +02:00
Konstantinos Sideris
eaf05748ff Initial support for read receipts 2018-01-03 18:06:29 +02:00
Konstantinos Sideris
208f957911 Re-order room list based on activity
fixes #2
2017-12-30 17:29:57 +02:00
Konstantinos Sideris
1ab55d4732 Add date separator in the timeline
fixes #157
2017-12-25 23:02:33 +02:00
Konstantinos Sideris
6835a97b15 Use a better regex to identify URLs 2017-12-24 13:13:07 +02:00
Konstantinos Sideris
9d763c4de9 Don't keep fetching history on non-visible timelines
If the user switched to another timeline before the current timeline
filled up with messages, nheko would keep fetching history.

Now it will check periodically if the timeline became visible so
it can decide whether or not to stop fetching history.
2017-12-23 13:50:11 +02:00
Konstantinos Sideris
33f534c6f8 Cache room avatars (#139)
fixes #107
2017-12-22 00:00:48 +02:00
Konstantinos Sideris
ece20dd917 Add rounded corners to inline images 2017-12-21 18:27:57 +02:00
Konstantinos Sideris
1705273bb8 Fix font size inconsistencies 2017-12-21 14:36:05 +02:00
Konstantinos Sideris
94b2827051 Bump font sizes 2017-12-21 14:04:36 +02:00
Konstantinos Sideris
aaa4d8c323 Prevent emoji selector for closing
fixes #176
2017-12-21 13:17:38 +02:00
Konstantinos Sideris
f11044b5eb Handle incoming invites
fixes #128
2017-12-19 22:36:12 +02:00
Konstantinos Sideris
65672d3dfb Allow only one application instance
fixes #141
2017-12-14 21:55:00 +02:00
Konstantinos Sideris
1d285993f7 Valgrind run
- Fix a memory leak where a layout was created without being used.
- Fix uninitialized value.
2017-12-12 09:31:00 +02:00
Konstantinos Sideris
544b623512 Add dialog to create rooms
fixes #25
2017-12-11 23:00:37 +02:00
Konstantinos Sideris
ef0b0f6879 Add menu to invite users 2017-12-10 23:59:50 +02:00
Konstantinos Sideris
19bae2a2e6 Add gui option for joining rooms (#25) 2017-12-10 15:22:01 +02:00
Konstantinos Sideris
d872b1060b Reset cache on breaking changes
fixes #154
2017-12-10 12:51:44 +02:00
Konstantinos Sideris
6415c4125f Add style colors for the ScrollBar 2017-12-05 14:13:26 +02:00
Konstantinos Sideris
a605e4486f Migrate to matrix-structs for event and response parsing 2017-12-04 18:41:19 +02:00
Konstantinos Sideris
914bdecc0b Initial integration with matrix-structs 2017-12-03 02:47:37 +02:00
Konstantinos Sideris
f4f78b1d8a Add basic support for m.video messages
fixes #115
2017-12-01 18:28:26 +02:00
Konstantinos Sideris
5573548fb1 Allow audio clip uploads 2017-12-01 17:33:49 +02:00
Konstantinos Sideris
432a2e1354 Add inline audio clip player (m.audio) (#143) 2017-12-01 15:39:50 +02:00
Konstantinos Sideris
eae069ad93 Group emoji and dialogs with namespaces 2017-11-30 20:02:46 +02:00
Konstantinos Sideris
32c8340577 Create directories for related files 2017-11-30 13:53:28 +02:00
Konstantinos Sideris
5663c58dd9 Use templates for the TimelineItem generation 2017-11-30 13:19:34 +02:00
Konstantinos Sideris
deb1a6e292 Simplify timeline item creation 2017-11-30 12:55:30 +02:00
Konstantinos Sideris
fdb76bb5c1 Implement file uploads
fixes #24
2017-11-29 23:39:35 +02:00
Konstantinos Sideris
b21942a3e3 Add read support for m.file messages (#24) 2017-11-28 02:01:37 +02:00
Konstantinos Sideris
0dad256743 Reload theme without restart (#137) 2017-11-25 22:47:06 +02:00
Konstantinos Sideris
54cf3418bc Paint RoomList's background (#137) 2017-11-25 22:20:34 +02:00
Konstantinos Sideris
f0ecf6eee6 Add dark theme 2017-11-25 18:19:58 +02:00
Konstantinos Sideris
f36e498503 Update system theme 2017-11-25 15:14:37 +02:00
Konstantinos Sideris
0f363b5f44 Send read receipts
Automatically dismiss unread notifications when the window regains
focus.

fixes #111
fixes #68
2017-11-24 00:10:58 +02:00
Konstantinos Sideris
fc34f373df Remove unnecessary comments 2017-11-22 21:13:22 +02:00
Konstantinos Sideris
56d8be5a27 Fix emoji picker's theme 2017-11-22 21:03:53 +02:00
Konstantinos Sideris
552941118b Fix minor stylistic issues on the nheko theme 2017-11-22 19:52:38 +02:00
Konstantinos Sideris
929b2df6fb Merge branch 'theme' 2017-11-22 19:09:19 +02:00
Konstantinos Sideris
937caddacd Keep track of newly joined rooms in the settings manager
fixes #134
2017-11-21 17:34:32 +02:00
Max Sandholm
19b526d453 Use system color scheme (using a Qt stylesheet) #104
The color scheme of nheko obeys the default color theme of Qt
(i.e. the system theme). It uses a Qt stylesheet to accomplish this,
which means replacing the color theme with a custom theme would only
be a matter of writing a new style sheet and loading it into the app.
2017-11-16 16:33:52 +02:00
Konstantinos Sideris
4166a863b4 Lint 2017-11-15 18:42:21 +02:00
Jani Mustonen
4e1c8dd663 Implement a per-room send queue. (#118)
[ci skip]
2017-11-15 18:38:50 +02:00
Konstantinos Sideris
e40dab9f98 Improve settings menu layout 2017-11-09 22:04:40 +02:00
Konstantinos Sideris
a6b84fac45 Remove unnecessary layouts 2017-11-08 23:09:15 +02:00
Konstantinos Sideris
24dd76ee0b Parse unsigned key 2017-11-06 22:14:16 +02:00
Benjamin Saunders
4ccb5ed81f Add input history, enable multi-line input, refactor commands (#119)
This also fixes the transmission of mis-typed commands as messages,
fixes inability to send messages that start with a command, and does
some initial work towards automatically resizing the input field to fit
the input message.
2017-11-05 23:01:21 +02:00
Jani Mustonen
13cb0521fa Improvements to the quick switcher (#109)
- Ghetto disambiguation for the quick switcher
- Fix the Ctrl+K shortcut
- Fix keyboard focus when the quick switcher is closed

fixes #114
2017-11-03 08:54:17 +02:00
Jani Mustonen
84741adc16 Implement a setting for the tray icon (#108) 2017-11-02 22:00:43 +02:00
Konstantinos Sideris
886edd03fb Add dummy settings menu 2017-11-02 00:41:13 +02:00
Thomas Herzog
287b5aa4c0 Implemented sending of typing notifications (#105) 2017-10-31 20:11:49 +02:00
Konstantinos Sideris
91b8427795 Add missing headers 2017-10-28 21:24:42 +03:00
Konstantinos Sideris
e224440f5d Display user avatar changes 2017-10-28 21:11:40 +03:00
Konstantinos Sideris
c18a49915b Save the changes between syncs in cache
- Fixes high cpu issues caused by the serialization of the whole
  in-memory state.
- Display name changes are now visible in the timeline.
2017-10-28 20:46:34 +03:00
Konstantinos Sideris
a17b6dffaf Clean up headers 2017-10-28 15:46:39 +03:00
Konstantinos Sideris
845228ac6a Add scroll-down button 2017-10-27 22:20:33 +03:00
Konstantinos Sideris
8e15a5080d Adjust scrollbar only after pagination (#94)
The scrollbar will stay in the same position if new messages
are added to the bottom of the timeline.
2017-10-27 13:36:26 +03:00
Konstantinos Sideris
c6e1068e0e Lint 2017-10-23 00:19:35 +03:00
Konstantinos Sideris
143ed5176a Use callbacks on MatrixClient 2017-10-22 22:51:50 +03:00
Konstantinos Sideris
c0e55378c3 Remove extra inline keywords 2017-10-22 19:03:55 +03:00
Konstantinos Sideris
3cae6c3983 Remove ui flickering when adding new timeline events 2017-10-21 18:53:15 +03:00
Konstantinos Sideris
13e526c27d Retry initial sync (#19) 2017-10-20 22:32:48 +03:00
Konstantinos Sideris
8a9a513ecd Move ctrl-k callback to the MainWindow 2017-10-20 21:39:05 +03:00
Konstantinos Sideris
9b60fdd620 Remove sync timer 2017-10-20 21:21:04 +03:00
Rokas Kupstys
3205e5fdd3 Make sidebar topic expand on click and fix html formatting of elided text. (#96)
Fixes #95
2017-10-20 20:58:23 +03:00
Konstantinos Sideris
8299a74775 Elide room topic 2017-10-19 19:04:51 +03:00
Konstantinos Sideris
8390ff253d Fix icons for retina displays 2017-10-15 22:08:51 +03:00
Konstantinos Sideris
ac8e42b926 Reduce timeline flickering 2017-10-09 01:32:25 +03:00
Konstantinos Sideris
76ddfb792b Add /join command support 2017-10-08 22:38:38 +03:00
Konstantinos Sideris
ac525970b0 Add snackbar 2017-10-08 22:01:18 +03:00
Konstantinos Sideris
ebe36b5713 Drop the loading screen if consensus can't be achieved 2017-10-08 21:35:37 +03:00
Konstantinos Sideris
6e1285bb0e Prevent FOUC 2017-10-07 20:51:35 +03:00
Konstantinos Sideris
bc4b47a5e3 Use shared pointer for the modals 2017-10-07 20:51:35 +03:00
Konstantinos Sideris
985530e99b Resume sync when connectivity is established 2017-10-05 18:13:11 +03:00
Konstantinos Sideris
28b3a3fde0 Put typing notifications above the text input 2017-10-04 22:00:26 +03:00
Konstantinos Sideris
d60c2b76e3 Receive typing notifications (#88) 2017-10-04 11:33:34 +03:00
Konstantinos Sideris
88349eae90 Recover from corrupted cache data
Make Cache constructor exception free

fixes #74
2017-10-03 21:16:31 +03:00
Max Sandholm
7ad45d8d64 React to externally left and joined rooms, and add "leave room" button in room menu (#75)
* Initial "join room" feature.
* React correctly to remotely joined rooms.
* Leaving rooms implemented both locally using the room menu
   in nheko, and reacting properly when leaving a room remotely 
   from another client.
2017-10-01 19:49:36 +03:00
Konstantinos Sideris
6e0ae807d5 Update badge counter only on change 2017-10-01 18:15:23 +03:00
Konstantinos Sideris
0c0ac68bc2 Remove extra clang-format options 2017-10-01 12:51:29 +03:00
Rokas Kupstys
da6e7c11dc Fixes #50.
On KDE desktop icon failed to appear because TrayIcon requested a zero-size rect. Implementing MsgCountComposedIcon::availableSizes() method fixes that.

After icon became visible it was not transparent, and places that should have been transparent contained artifacts likely due to uninitialized memory. Implementing MsgCountComposedIcon::pixmap() which returns a pixmap with alpha channel fixes that.
2017-10-01 12:15:38 +03:00
Konstantinos Sideris
775d2e88f5 Don't move scrollbar to the bottom when it's active
fixes #55
2017-09-30 22:26:33 +03:00
Konstantinos Sideris
748f480077 Add missing update calls 2017-09-30 20:44:18 +03:00
Konstantinos Sideris
41a85832b3 Remove unnecessary animations 2017-09-30 17:05:05 +03:00
Konstantinos Sideris
ff1bc797de Refactor the welcome page 2017-09-30 16:39:24 +03:00
Konstantinos Sideris
29e21e2970 Merge branch 'images' 2017-09-10 13:13:02 +03:00
Konstantinos Sideris
1bfe48de75 Style change again 2017-09-10 12:59:21 +03:00
Konstantinos Sideris
edff71bc24 Implement image uploads (#24) 2017-09-10 12:58:00 +03:00
Konstantinos Sideris
b5ae84c3c3 Add write support for m.emote events
closes #41
2017-09-03 11:43:45 +03:00
Konstantinos Sideris
a44a4f36af Add read support for m.emote events (#41) 2017-09-02 16:47:59 +03:00
Konstantinos Sideris
6797cbc943 Linkify URLs in room topics
closes #52
2017-08-26 15:36:10 +03:00
Konstantinos Sideris
177dd6a5b0 Remove cache data when the user logs out 2017-08-26 14:31:23 +03:00
Konstantinos Sideris
7fbfe3af15 Update the cache state at once to avoid being in an invalid state 2017-08-26 13:49:16 +03:00
Konstantinos Sideris
43b1bdfe63 Remove nick colors 2017-08-26 11:33:26 +03:00