Commit Graph

2256 Commits

Author SHA1 Message Date
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
miruka
cb16ed0843 Minor improvements to flatpak README 2020-08-28 10:45:37 -04:00
miruka
13dde2fe95 Add make clean step to flatpak README 2020-08-28 10:45:37 -04:00
miruka
d53cf0cbbe Bump version to v0.6.2 2020-08-28 10:45:37 -04:00
miruka
f715c38ebd Update CHANGELOG.md 2020-08-28 10:45:36 -04:00
miruka
48663ae846 Increase spacing between list items in messages 2020-08-28 09:27:59 -04:00
miruka
6d26ac9006 Join/LeftBanner: auto keyboard-focus first button 2020-08-28 07:40:48 -04:00
miruka
78acb51220 Refactor the QML past events loading code
- Make the code cleaner and more declarative
- Start loading past events when the join state of the room changes,
  e.g. when accepting an invite, load history right then
- Properly cancel the loading task when leaving the room chat page
2020-08-28 07:19:26 -04:00
miruka
702497cb48 Fix 403 error on invited room chat page
Don't try to fetch room members while user is only invited or has left
the room.
2020-08-25 09:37:09 -04:00
miruka
0d2be820fe Allow "replying" to an event with a file
Send a pseudo-reply consisting of two messages: a `m.text` which is just
a reply with an empty body, then the file event itself.

This is a workaround to the restriction imposed by the Matrix API,
which prevents us from simply attaching a reply to a media event:
https://matrix.org/docs/spec/client_server/latest#rich-replies
2020-08-24 10:17:04 -04:00
miruka
6d9a013d5d Composer: allow sending a reply with no text
Useful for "forwarding" a message (to the same room)
2020-08-24 09:54:49 -04:00
miruka
bbb46a9feb Disallow whitespace in composer aliases
These cause problems with the composer alias parsing code.
If an alias from the config file has whitespace, only the first word
will be taken into account (ignoring any leading or trailing whitespace).
2020-08-24 09:54:49 -04:00
miruka
83f35c034e Refactor MessageArea composer alias handling
Simplify the code, make it more declarative, and improve the reliability
of sending typing notifications (notably when changing the used alias in
the middle of a message).
2020-08-24 09:54:49 -04:00
miruka
aba47ef26b Discard room members from outdated initial sync
Fix in cooperation with matrix-nio commit
ffc42287c22a1179a9be7d4e47555693417f715d, see its description.
2020-08-24 09:54:49 -04:00
miruka
b83fd63769 Save composer state as right user when using alias
If the chat was opened under e.g. "@user1:example.org", but the
composer text is "o abc" where "o" is a composer alias for
"@other_account:example.org", save the composer text to state.json as
"@user1:example.org" and not the alias user.
2020-08-24 09:54:49 -04:00
miruka
df3f1fb645 Remove all Backend "get_any_client"-using methods
thumbnail() and download() were remaining.
Use a direct and carefully chosen MatrixClient's methods instead to
avoid problems mentioned in the previous commit 7502c1.
2020-08-24 09:54:43 -04:00
miruka
0f2efa9ba3 Don't pick a random client to get user profiles
Causes problem if one of the candidate client is on a server that
doesn't federate (e.g. a local one). Move the `get_profile()` function
from Backend to MatrixClient.
2020-08-23 16:18:54 -04:00
miruka
7502c1a9b4 Don't use TapHandlers in TextArea/TextField
Causes conflicts on touch/pen which prevent the component from being
focused. Use the normal press/pressHold signals instead.
2020-08-23 15:41:20 -04:00
miruka
71a2951f5b Move tooltip window hover detector to HToolTip
Having a HoverHandler covering the root ApplicationWindow causes
problems for some Qt Quick Controls with pen/touch, e.g. it's impossible
to focus a TextArea/TextField.

The HoverHandler is moved to HToolTip (since it's used for those),
targets the ApplicationWindow but is now only enabled while a tooltip is
visible.
2020-08-23 15:17:06 -04:00
miruka
f68dda9f14 Don't start with any member in autocompl. models
Fix the AutoCompletedMembers filter model to ensure that it doesn't
pick all the items from the corresponding room member model on startup,
wait until the user actually uses the completion feature to fill it.
2020-08-23 10:54:03 -04:00
miruka
fc6827807c Fix mentioning blank display names
If the display name of a user is blank (e.g. just a space character),
autocomplete it as a user ID.

If the display name starts or ends with whitespace, trim it.
2020-08-23 10:46:59 -04:00
miruka
fbf6e48b5b Fix mentioning users without display names 2020-08-23 09:41:41 -04:00
miruka
e79094c18c Fix click on user delegate not making it a mention 2020-08-23 09:23:34 -04:00
miruka
3dc604a36b Add new 0.6.1 features in the README 2020-08-23 09:16:27 -04:00
miruka
4000d70514 Reset input method when autocompleting a user
Fixes IME being left in a strange state upon autocompleting a word that
was being edited.
2020-08-23 09:14:45 -04:00
miruka
0434659ad1 CompletableUserDelegate avatar: respect uiScale 2020-08-22 15:17:52 -04:00
miruka
223197b84e Pass HTTPS server URL to Python when possible
Reduce the time it takes to connect to the server since Python won't
need to guess the real protocol.
2020-08-22 15:15:15 -04:00
miruka
9cc9229fdb Simplify pinging & properly close aiohttp session 2020-08-22 13:19:38 -04:00
miruka
f327c99a99 Use the new improved anchel.nl JSON API
The /publiclist.json provides all the server event/downtime logs
in one file, so we don't have to do requests for every server anymore.
2020-08-22 13:10:04 -04:00
miruka
3e22694817 Add some missing entries to 0.6.1 changelog 2020-08-22 02:11:39 -04:00
miruka
e7f769b344 HTextArea: consider preeditText for getWordAt()
`preeditText` is partial input from IME and touchscreen
autocompleting keyboards, consider it together with `text` for the
`getWordAt()` function.

This should allow user autocompletion to work properly in these
specific conditions.
2020-08-22 01:47:53 -04:00
miruka
eadc4bb317 Remove unused function inside UserAutoCompletion 2020-08-22 01:44:41 -04:00
miruka
bc3d6d902f Fix @autocomplete closing after one character
Typing e.g. "@a" would work, but "@ab" would always instantly close
the autocompletion UI if the cursor was at the end of the text area.
2020-08-22 01:23:44 -04:00
miruka
65f1cfe0c5 Fix changelog typos and add missing line 2020-08-21 12:28:16 -04:00
miruka
8ab4ce8ad7 Bump version to v0.6.1 2020-08-21 12:10:22 -04:00
miruka
12a25fde8e Bump nio required version to v0.15.0 2020-08-21 12:10:22 -04:00
miruka
8d4cf4e7b6 Update CHANGELOG.md 2020-08-21 12:10:22 -04:00
miruka
12c47476fc Add theme properties for autocompletion UI 2020-08-21 12:10:22 -04:00
miruka
044060d1c0 Color name when highlighting member delegates 2020-08-21 12:10:22 -04:00
miruka
010675001c Add bottom margin to autocompletion UI 2020-08-21 12:10:22 -04:00
miruka
6f37ce3519 Fix completing in the middle of a name with spaces 2020-08-21 12:10:22 -04:00
miruka
bea1d60621 Fix autocompletion for users without display name 2020-08-21 12:10:22 -04:00
miruka
cd81c94ce8 Fix autocompletion for display names with spaces 2020-08-21 12:10:22 -04:00
miruka
9dc9a5e70f Clip the autocompletion UI 2020-08-21 12:10:21 -04:00