Commit Graph

22 Commits

Author SHA1 Message Date
miruka
947c706638 Improve "nothing events to show yet" message 2019-08-15 11:56:28 -04:00
miruka
34edf923d0 Fix past events loading error for invited room 2019-08-15 11:46:40 -04:00
miruka
3c35616eaa Remove copyright headers in code 2019-08-11 08:34:36 -04:00
miruka
67dde68126 Big performance refactoring & various improvements
Instead of passing all sorts of events for the JS to handle and manually
add to different data models, we now handle everything we can in Python.

For any change, the python models send a sync event with their
contents (no more than 4 times per second) to JS, and the QSyncable
library's JsonListModel takes care of converting it to a QML ListModel
and sending the appropriate signals.

The SortFilterProxyModel library is not used anymore, the only case
where we need to filter/sort something now is when the user interacts
with the "Filter rooms" or "Filter members" fields. These cases are
handled by a simple JS function.

We now keep separated room and timeline models for different accounts,
the previous approach of sharing all the data we could between accounts
created a lot of complications (local echoes, decrypted messages
replacing others, etc).

The users's own account profile changes are now hidden in the timeline.
On startup, if all events for a room were only own profile changes, more
events will be loaded.

Any kind of image format supported by Qt is now handled by the
pyotherside image provider, instead of just PNG/JPG.
SVGs which previously caused errors are supported as well.

The typing members bar paddings/margins are fixed.

The behavior of the avatar/"upload a profile picture" overlay is fixed.

Config files read from disk are now cached (TODO: make them reloadable
again).

Pylint is not used anymore because of all its annoying false warnings
and lack of understanding for dataclasses, it is replaced by flake8 with
a custom config and various plugins.

Debug mode is now considered on if the program was compiled with
the right option, instead of taking an argument from CLI.
When on, C++ will set a flag in the Window QML component.

The loading screen is now unloaded after the UI is ready, where
previously it just stayed in the background invisible and wasted CPU.

The overall refactoring and improvements make us now able to handle
rooms with thousand of members and no lazy-loading, where previously
everything would freeze and simply scrolling up to load past events
in any room would block the UI for a few seconds.
2019-08-11 08:27:53 -04:00
miruka
efa4ad0ae0 Add keybinds to config file 2019-07-24 17:05:27 -04:00
miruka
41eea44fff Add keyboard shortcuts to flick the events list 2019-07-20 18:08:58 -04:00
miruka
cea586120e Rework how messages and events are handled
- No more translatable, content_type, show_name_line attrs for
  TimelineEventReceived.
  Since they are UI concerns, they are handled directly in QML.

- Refactor the EventDelegate and get rid of errors when new items
  are added to the timeline

- Messages, events and emotes all combine correctly.

- No more 28px wide avatars for events, to make them uniform with
  messages.
2019-07-20 01:30:58 -04:00
miruka
67efde9116 Show own events on right only under certain width 2019-07-18 06:33:09 -04:00
miruka
8a38274280 Make all JS functions and variables camelCase
According to conventions.
2019-07-18 04:48:34 -04:00
miruka
8f53d2e018 Qt 5.12 ES5 → 7: Use "() =>" and array.includes 2019-07-18 03:13:34 -04:00
miruka
d2dfafb4e7 Standardize spacings 2019-07-16 05:29:47 -04:00
miruka
751a27157c Add account settings page
Display name change working
2019-07-13 20:15:20 -04:00
miruka
eeea0af4cd Change every QtQuick import versions to 2.12 2019-07-13 05:39:01 -04:00
miruka
0f6474532b Add LGPL license headers 2019-07-07 23:53:08 -04:00
miruka
8dccfffc8b Drop kwargs support for callCoro/callClientCoro 2019-07-07 23:38:37 -04:00
miruka
a47e6b5c07 When room changes category, affect the Chat too 2019-07-07 02:35:22 -04:00
miruka
d83508742c Replace HStyle singleton by global Theme in Window 2019-07-06 17:50:55 -04:00
miruka
388967c737 Improve TypingMembersBar 2019-07-06 17:29:45 -04:00
miruka
ecba7c47ec Past events loading (with two bugs) 2019-07-05 03:12:27 -04:00
miruka
55e14e96bc Ensure msgs are sent in right order, fix echo bug
bug: only one local echo message delegate could be seen because all
echo eventId were the same
2019-07-04 21:37:20 -04:00
miruka
fde7f4aee6 Move models to their own files 2019-07-04 16:01:44 -04:00
miruka
f0c5afe8c7 Rename RoomEventList components 2019-07-02 22:29:09 -04:00