Commit Graph

2499 Commits

Author SHA1 Message Date
vslg
bbcdcde53f Add simple system tray 2020-09-04 17:30:12 -03:00
miruka
acb1367f11 Fix warnings when uploading to non-E2E room
Fix these:

    <Unknown File>: media_crypt_dict is undefined.
    Adding an object with a undefined member does not create a role for it.
2020-09-04 14:57:09 -04:00
miruka
56f676e35d "X removed this event": say "message" instead
That's what was supposed to happen for non-media message events
since redactions were implemented, but seems like nio doesn't
properly keep the original event type.
2020-09-04 14:52:10 -04:00
miruka
ebfc3d3ee2 Fix redacted media events keeping their thumbnails 2020-09-04 14:47:47 -04:00
miruka
65a1324eb0 Fix initial and non-initial sync filters reversed
Issue introduced in 758edd8a6a (0.6.1)
The filter for the first sync was passed as the filter for later
syncs and vice-versa, which caused problems like redaction events never
arriving.
2020-09-04 14:40:00 -04:00
miruka
89f8cf25d3 Show login page if current was for logged out acc. 2020-09-04 14:05:07 -04:00
miruka
8376d85961 Fix possible segfault when EventDelegate destroyed 2020-09-04 12:57:46 -04:00
miruka
7b6478f514 Correctly handle account with invalid access token
Show a popup saying the session was signed out and cleanup
the models data, instead of spamming the users with
never-ending errors.
2020-09-04 11:25:29 -04:00
miruka
3c9895b0b2 Fix EventHandlers.onModelCleared callback 2020-09-04 10:58:04 -04:00
miruka
1c306f421a Fix PageLoader initial page when no account 2020-09-04 10:51:33 -04:00
miruka
99ae075bb4 Reset composer when recycling chat page 2020-09-03 18:30:36 -04:00
miruka
82bcc29475 Field/area: insertAtCursor() when restoring text
Instead of assigning to `text` directly, which kills editing history and
has worse performance.
2020-09-03 18:27:31 -04:00
miruka
2545ba6c00 Reset room pane state when recycling chat page
Side effect: the members filter field's text is no longer saved to disk
2020-09-03 18:09:50 -04:00
miruka
601b42a503 Rename PageLoader.showPage() → PageLoader.show() 2020-09-03 17:33:19 -04:00
miruka
90929691c6 PageLoader: remove unused proporties 2020-09-03 17:31:33 -04:00
miruka
0704144576 Update INSTALL.md to reflect error changes
The previous commit 180e995f33 got rid of
the generic "Component is not ready" error and provide more details
on what actually happened.
2020-09-03 12:55:56 -04:00
vslg
180e995f33 Print Window.qml component creation errors 2020-09-03 12:26:19 -04:00
miruka
2b45c07819 Fix starting Mirage when initial page isn't a chat 2020-09-03 11:08:31 -04:00
miruka
462d3972ff Small window: close main pane when recycling page 2020-09-03 11:06:45 -04:00
miruka
f5c6a2627b Improve pageLoader animation 2020-09-03 10:49:15 -04:00
miruka
3f339b7bb9 Add global baseGIFSpeed property to DebugConsole
for great debugging
2020-09-02 15:56:13 -04:00
miruka
bed19eb117 Play appearAnimation when recycling page 2020-09-02 15:25:02 -04:00
miruka
e947fe7695 Refactor PageLoader show methods
Also lets the chat page recycling work with showPrevious() (ctrl+tab)
2020-09-02 15:19:27 -04:00
miruka
a4bbbfee87 Recycle chat pages if possible when switching room
The chat page is complex and slow to create, which creates a visible lag
when user switches room.

Instead of throwing the pre-switch one away and
making a new one from scratch, keep the same page and update its user &
room ID for a big improvement in responsiveness. The rest is automatic
thanks to QML property bindings.
2020-09-02 15:19:21 -04:00
miruka
509c4a0871 Add defaultCurrentIndex to H(List/Grid)View
When the model of a view changes, Qt automatically sets the
currentIndex to 0.
Reset it back to the set default (usually -1) instead.
2020-09-02 14:40:06 -04:00
miruka
3fb64dbef5 Fix EventContextMenu errs if timeline has 0 events 2020-09-02 14:02:12 -04:00
miruka
d8c006a8c8 Remove a bunch of leftover debug prints 2020-09-02 13:41:31 -04:00
miruka
f5cb3ecaa0 Keep a {id: item} cache for ModelStore models
Accelerates the ModelStore ListView find() function,
which now just has to get an object key instead of looping through the
whole model.
2020-09-02 13:38:11 -04:00
miruka
b1398e5dbf EventDelegate: remove pointless content x Behavior 2020-09-02 12:06:09 -04:00
miruka
eebe215a62 Fix image viewer size 0x0 while loading & for GIFs 2020-09-02 11:53:44 -04:00
miruka
5a1ca24e65 Image viewer open: pause timeline URL preview GIF 2020-09-02 11:40:49 -04:00
miruka
377f1ffd4a Fix URL preview thumbnail GIFs not being animated 2020-09-02 11:37:51 -04:00
miruka
519eaa2ca0 EventDelegate: replace json() by dict() for debug
When debugging an event, `target.dict()` will return an object that can
be properly worked with and pretty-printed using the `.j` command.
2020-09-02 11:26:44 -04:00
miruka
9c4d37f64b Fix copying non-message single event text
For events with no body in their source, copy Mirage's generated
content text.
2020-09-02 10:56:45 -04:00
miruka
b79006f2ec Rename menu "Debug this event" to just "Debug" 2020-09-02 10:43:12 -04:00
miruka
b3ca5599cf Simplify & fix bugs event images context menu
Fix copy menu entries for messages with URL thumbnail previews
2020-09-02 10:40:37 -04:00
miruka
648c37f413 Refactor event context menu into its separate file
Have only one menu component attached to the EventList,
instead of every delegate carrying its own.
2020-09-02 09:47:42 -04:00
miruka
b5b968db3a Focus center event if scrolled up when ctrl+j/k
When using the focus(Previous/Next)Message keybinds, no message is
focused and the view has been scrolled up, focus the message in the
center of the view instead of returning to the list's bottom to focus
the most recent one.
2020-09-01 18:24:40 -04:00
miruka
a1b9f34958 Add setting to sort rooms lexically 2020-09-01 14:42:08 -04:00
miruka
8d61826887 Fix up/down not working with cursor in @word
In the composer, when the text cursor was inside a word starting
with a @ but not matching any username (thus the completion UI being
invisible), pressing up/down arrow would not do anything instead of
going to the prev/next line.
2020-09-01 14:27:28 -04:00
miruka
8b37ca2524 Add a persistent zoom setting to settings.json
The zoom keybinds now modify this setting directly.
The `uiScale` property in themes now default to using this zoom setting,
since just removing it would need of annoying changes through theme
files and QML code, and is best left to until the future theming
overhaul update.
2020-09-01 14:19:40 -04:00
miruka
bd8c6ec0fc Force-reload background image on config reload
Make it possible to see the change without restarting Mirage if an
image used for the theme's background was edited, or if used did the
mistake of typing "/path/to/img" then corrects it to
"file:///path/to/img".
2020-09-01 14:08:31 -04:00
miruka
63ccca60cb Fix theme file finder ignoring $MIRAGE_DATA_DIR 2020-09-01 14:05:19 -04:00
miruka
f5ad22fcfb EventDelegate: fix separationSpacing indentation 2020-09-01 13:48:15 -04:00
miruka
39f159f0a3 Fix the one-line events combining
When there's a one line (emote or non-message) event with its avatar
shown and combinable events follow it, that first event delegate's height
is supposed to be one line with the avatar overflowing into
the following event's blank space.

This behavior hasn't been working for a long time. This commit restores
it, along with improving the related code's quality.
2020-09-01 13:48:15 -04:00
miruka
27c3d08031 EventDelegate/Content property usage improvements
- Remove pointless confusing aliases for avatar properties
  (smallAvatar, collapseAvatar, etc)

- Make some EventDelegate properties readonly as they should be

- Use Layout.preferredWidth/Height for avatarWrapper instead of both
  minimum and maximum W/H
2020-09-01 13:48:15 -04:00
miruka
107eddaa5c Use HTextArea.RichText, not Qt.RichText 2020-09-01 13:48:15 -04:00
miruka
2a0f6aead1 Fix Midnight.qpl stylesheet error from 48663ae
Missing `}` in `chat.message.styleSheet` caused some CSS properties to
not work (sender name bottom margin, quotes color, no underline for
mentions, etc).
2020-09-01 13:38:30 -04:00
miruka
b0c16d04ea Fix v0.6.2 changelog typos 2020-08-28 11:25:49 -04:00
miruka
6b6c03962c Update flatpak nio requirements 2020-08-28 10:45:37 -04:00