Commit Graph

229 Commits

Author SHA1 Message Date
Alex Jbanca 27bb6bf665 perf(chatScroll): Optimize StatusTextMessage size and hover binding for the delegate 2023-01-19 19:24:18 +02:00
Alex Jbanca 6c76026d53 perf(chatScroll): Use Qt.callLater to release the main thread when parsing and loading links data
perf(chatScroll): Undo Use Qt.callLater to release the main thread

perf(chatScroll): Undo Use Qt.callLater to release the main thread
2023-01-19 19:24:18 +02:00
Alex Jbanca 4e3e245675 perf(chatScroll): Fix connection warnings 2023-01-19 19:24:18 +02:00
Alex Jbanca 719e0a34f6 perf(chatScroll): Optimise timestamps
The date parsing is time consuming and it needs to be used with care in the delegate

perf(chatScroll): Fix StatusDateGroupLabel comment - standaloneMonthName

perf(chatScroll): fix comments on Optimise timestamps

perf(chatScroll): Optimise timestamps - bring back comment

perf(chatScroll): fix activity notification
2023-01-19 19:24:18 +02:00
Alex Jbanca bf1d59c0ad perf(chatScroll): Avoid calling the backend on delegate creation/binding
Provide the needed data from the nim model directly to the delegate. This way whenever a delegate needs to display the data it doesn't need to reach the backend.

perf(chatScroll): Fix comments on Avoid calling the backend on delegate creation/binding

perf(chatScroll): Avoid calling the backend on delegate creation/binding  - add TODO comment on senderColorHash default

perf(chatScroll): merge quotedMessageAuthor details

perf(chatScroll): Fix nim tests

perf(chatScroll): Fix merge error - messages_model.nim
2023-01-19 19:24:18 +02:00
MishkaRogachev 2890fe5845 hotfix(ActivityCenter): Fix warnings and text align with messageBadge 2023-01-18 18:01:56 +04:00
Lukáš Tinkl b2328d6643 chore: Consolidate date/time formatting
- simplify locale settings
- extract/fix datetime related functions into LocaleUtils
- port code to the new LocaleUtils

Closes #7230
2023-01-17 16:42:34 +01:00
Pascal Precht bf7148efd6 fix: make avatar info in replies of imported messages work again
Because we've switched to `QuotedMessage` as an attached payload to
messages to make message replies data more reliable, we lost some of
the author information in imported messages, that was available prior
to that move.

This commit introduces `quotedMessageAuthorDisplayName` and
`quotedMessageAuthorAvatar` to our model so it can be set in case
we can't retrieve contact details for a given message (which is always
the case for imported messages)
2023-01-17 12:48:56 +01:00
MishkaRogachev 2359dfe6a3 feat(Profile): Add SimplifiedMessageView for AC and verifiaction popups 2023-01-17 12:21:25 +04:00
Alex Jbanca b591254782 fix(MessageView): Fixing Add reaction popup regressions
The popup parent was being destroyed after popup creation.
2023-01-17 09:13:41 +02:00
Alex Jbanca d07136481c perf(chatScroll): Adding signals for chat settings in MessageStore
perf(chatScroll): Fix comment
2023-01-16 10:26:53 -05:00
Igor Sirotin 93c90b8436 Terminal fix(MessageView): Fix calculating `isExpired` value 2023-01-13 19:57:26 +03:00
Alex Jbanca 8cb4420d49 perf(chatScroll): Create message quick context items only when message row is hovered 2023-01-13 11:13:42 +02:00
Jonathan Rainville af0c9767d1 feat(context-menu): add Copy message action in message context menu
Adds the action to copy the right-clicked message's text.

It copies the unparsed text (no html).
For that, I had to add it in the MessageItem and expose it in the model.

I also fixed the copy MessageId action that didn't show + didn't work even if it would have shown.

Plus some small cleanups.
2023-01-12 16:15:17 -05:00
Jonathan Rainville c3945f33c0 feat(replies): add deleted to QuotedMessage to change msg displayed
Adds `deleted` to the QuotedMessage object so that on the frontend, we can show "Delete message" only when we know the message was deleted.
Otherwise, when we don't know the quoted message, we show "Unknown message [...]"
2023-01-12 15:18:03 -05:00
Jonathan Rainville 91c2e6d257 feat: use QuotedMessage object for replies to better show the replies
Fixes #7754
ok
2023-01-12 15:18:03 -05:00
Lukáš Tinkl 9e396f7344 chore: refactor/improve/optimize StatusMessage & friends
- drop dead code
- reduce number of direct bindings
- use Loaders whenever possible

Fixes #8744
2023-01-10 10:55:53 +01:00
Jonathan Rainville 29450d34a7 feat(admin): enable admins to delete messages from other users
Fixes #8869
2023-01-04 11:12:47 -05:00
Alex Jbanca 94b911a986 fix(messagesView): Increase spacing between chat messages
Added padding between messages as specified in Figma:
topPadding - 8 if the current message has header, 2 otherwise
bottomPadding - 8 if both current and next message have header, 2 otherwise
2022-12-23 16:46:33 +02:00
Igor Sirotin 784b9acd4f fix(MessageView): Ignore message editing with no actual changes 2022-12-22 15:00:48 +03:00
Jonathan Rainville f29210d4a2 fix(image): fix image download on Windows
Fixes #8755
2022-12-21 10:33:34 -05:00
Patryk Osmaczko 87674064d0 feat(chat/messages): implement new messages marker
closes: #8572
iterates: #7488
2022-12-16 19:12:12 +01:00
MishkaRogachev ddf27d3038 feat(Contacts): Handle cancel identity verification on the reciever side
Close #8437
2022-12-15 15:44:45 +04:00
Igor Sirotin 50427390dd ens: Fix ens name inconsistency across app 2022-12-14 23:46:50 +03:00
Boris Melnik 5d19667f2d fix(warnings): Fix warnings raised from settings
Fixes: #8293
2022-12-14 14:33:13 +03:00
Jonathan Rainville 194e3048bc fix(messages): fix Resend btn not working and add Sending visual state
Fixes #7643

This adds the backend to resend. It then hooks the button to it.
This also adds a visual state for when we are sending. This gives a good indication that a message was sent.
2022-12-12 11:56:21 -05:00
Boris Melnik ea432f26f5 fix(reactions): Fix reactions popup
Fixes: #8425
2022-12-07 20:39:39 +03:00
Igor Sirotin 4da18c8de7 fix(EnsListView): Fixed preferred name message preview 2022-12-07 15:59:40 +03:00
Igor Sirotin e3bfdc0f09 fix(StatusPopupMenu): Refactoring 2022-12-02 10:30:50 +03:00
Lukáš Tinkl 9559789030 chore: reduce the number of (verification) RPC calls
- when calling `Utils.getColorHashAsJson()` we don't actually need to
issue ID verification requests at all and there might be situations when
we know beforehand that we don't need the ENS verification either
- change these helper functions' syntax and do early returns in that case
- in MessageContextMenuView, the "contact details" were duplicated, so
remove one
- remove dead code, fix some warnings
2022-12-01 16:50:23 +01:00
Lukáš Tinkl 6ceb4bde26 fix(InvitationBubbleView): Community invite box cta bleeds out of box
a simple refactor to use a QML Control with separate `background` and
`contentItem`

Fixes: #8360
2022-12-01 16:47:40 +01:00
Boris Melnik bff6b22fc4 fix(replies): Get original message from status-go for replies
Fixes: #7248
2022-11-30 14:07:49 +01:00
Lukáš Tinkl 3d4cb12d0c fix: some notification UI fixes
This aims at bringing the notifcation display closer to what regular
messages look like, namely:

- show compressed chat keys
- don't show identicon rings for ENS names
- fix timestamps and their tooltips (`notification` isn't part of StatusMessage!)
- unbreak clicking outside of the whole popup overlay (`activityCenter`
is undefined)
- fix blurry checkmark icon for marking notification as read
2022-11-30 11:05:58 +01:00
mprakhov e8e2c022ca fix(@desktop/chat): Hide quick actions panel in non-joined chats 2022-11-29 19:56:04 +02:00
MishkaRogachev 726ae26128 hotfix(ActivityCenter): Fix AC timestamps and binding loop for previousMessageIndex
Close #8434
2022-11-29 16:49:36 +04:00
Lukáš Tinkl 2bf2861631 fix: reactions distance to message content is inconsistent
- harmonize the margins/spacings in other message components
- fix warnings
- cleanup/remove some dead code

Fixes #8295
2022-11-23 17:42:11 +01:00
Lukáš Tinkl 8e4d9be779 fix: disable quick actions when editting a message
also move the top/bottom margins one level up so that the message editor
gets the same margins as well

Fixes: #8185
2022-11-21 20:55:08 +01:00
Jonathan Rainville 312dd72955 fix(windows): fix windows chat list empty because of popup overflow
Fixes #7906
2022-11-16 15:41:32 -05:00
Alexandra Betouni 7c88f462ec fix(StatusMessage): Updated component to QQC2 Control and as per desing
Fixes #7318
2022-11-14 18:13:40 +02:00
Igor Sirotin a69b3b5928 fix(StatusMessageReply): Fixed reply text styling and behavior 2022-11-11 13:31:06 +01:00
Boris Melnik b10b6617cf fix(edit-message): Add content-type to edit message request
Closes: #7879
2022-11-11 14:01:16 +03:00
Richard Ramos ae7a16f27e fix: display "Resend" for expired messages 2022-11-10 11:49:42 -04:00
Lukáš Tinkl 80d211f521 fix(MessageView): fix opening URL links
Fixes: #8123
2022-11-07 11:03:39 +01:00
Lukáš Tinkl f122607ada fix: consecutive discord messages should be grouped like status messages
- fill the senderId just like other messages
- add some checks in Utils since the "publicKey" (ID) coming Discord
isn't in the format we'd normally expect

Closes #6678
2022-10-27 22:44:00 +02:00
Lukáš Tinkl 16a51f2f72 fix(MessageView): unbreak showing identity ring in replies
use the correct way to get the original message's content type and
compare it with the correct Constant type
2022-10-27 10:01:59 +02:00
Lukáš Tinkl 2c2337a45d fix(MessageView): unbreak message reply update and found animation
due to the refactor, StatusMessage is no longer the toplevel item inside
the delegate, so adjust the functions

some minor cleanups and dead code removals; striving for keeping the
number of properties and bindings inside a ListView delegate at a minimum
2022-10-26 12:50:39 +02:00
Jonathan Rainville afaf7717e8 fix: fix signals not passing the callback
Fixes #8038

We added a callback arg to the signals, but signals do not support default args. You need to pass the exact number of args.
2022-10-26 10:29:33 +02:00
Michal Iskierko 6d2a2e6e03 fix(@desktop/general): Fix clicking deep links in chat
Clicking any deep-link in chat: /u, /c, /cc does not open browser but executes instantly

Fix: #6302
2022-10-25 08:26:16 -04:00
Igor Sirotin 5ff2976e80 fix(MessageView): Changed visual borders of message 2022-10-21 00:44:19 +02:00
Lukáš Tinkl 38b6bdbfd3 chore: split English TS files
- qml_base.ts is created as a reference point for translators
- qml_en.ts is a minimal overlay translation, providing just the needed
  plural forms
- adjust the script to generate the above TS files
- fixup some leftover qsTrId() calls and the qmake file
2022-10-19 10:48:08 +02:00