Commit Graph

471 Commits

Author SHA1 Message Date
Jonathan Rainville 8952d55028 update status-go to develop version 2021-05-26 12:12:05 -04:00
Jonathan Rainville b52dceb984 feat(Chat): add pinned messages feature 2021-05-26 12:12:05 -04:00
Richard Ramos f86611303f feat: updated mailserver logic 2021-05-25 14:47:13 -04:00
Richard Ramos 62d7fc9853 feat: mailserver gaps 2021-05-25 14:47:13 -04:00
Richard Ramos 22839f177b feat: use new API for joining/leaving chats
Fixes #2526
Fixes #2487
2021-05-25 14:47:13 -04:00
Eric Mastro 65a0cfbcd3 fix: show emoji in reaction tooltip
Fixes: #2387.

Shows the emoji in the emoji reaction tooltip instead of the shorthand (ie 👎 instead of `👎`).
2021-05-14 12:17:48 -04:00
Richard Ramos 9493839b65 force messages to dissapear if a contact is blocked 2021-05-14 11:56:07 -04:00
Eric Mastro 46caa67d49 fix: add mention hover
Fixes: #2388

Adds a specific background color to hovered mentions.
2021-05-14 10:28:05 -04:00
Eric Mastro ee1287b71d fix: prevent crash on generate account wrong password
Fixes #2448.

Currently, if a wrong password is entered when generating a wallet account, the app will crash due to attempting to decode a `GeneratedAccount ` from an rpc response containing only an error.

With this PR, we are detecting if an error is returned in the response, and if so, raising a StatusGoException. This exception is caught in the call chain, and translated in to a `StatusGoError` which is serialised and sent to the QML view, where it is parsed and displayed as an invalid password error in the input box.

refactor: remove string return values as error messages in wallet model
In the wallet model, we were passing back empty strings for no error, or an error as a string. This is not only confusing, but does not benefit from leaning on the compiler and strong types. One has to read the entire code to understand if a string result is returned when there is no error instead of implicitly being able to understand there is no return type.

To alleviate this, account creation fundtions that do not need to return a value have been changed to a void return type, and raise `StatusGoException` if there is an error encountered. This can be caught in the call chain and used as necessary (ie to pass to QML).

refactor: move invalid password string detection to Utils
Currently, we are reading returned view model values and checking to see if they include a known string from Status Go that means there was an invalid password used. This string was placed in the codebased in mulitple locations.

This PR moves the string check to a Utils function and updates all the references to use the function in Utils.
2021-05-14 10:27:37 -04:00
Jonathan Rainville 9d625016ff chore: fix spacing and width of chat identifier 2021-05-04 14:52:37 -04:00
Jonathan Rainville 49d130a111 feat(ChatMessages): show chat identifier at the top of the window 2021-05-04 14:52:37 -04:00
Jonathan Rainville 64e965ea07 feat(Chat): add Add To Contact banner in 1 to 1 chats 2021-05-04 14:52:37 -04:00
Richard Ramos 9ea56a3ae7 force refetching previews when preview whitelist changes 2021-05-03 15:03:03 -04:00
Jonathan Rainville eac7009807 feat(community): fetch community info from link
Fixes #2290
2021-05-03 14:36:37 -04:00
Jonathan Rainville 22398284e9 fix(CompactChat): fix margins for images and invites
Fixes #2407
2021-04-30 13:01:52 -04:00
Eric Mastro 0850835b34 fix: Send Message button not working in profile popup
Fixes: #2364

The Send Message button click event was erroring due to a refactor that had been done to allow for changing app sections.

This has been updated to follow the current way to change app sections.

fix: “Send Message” button crash in communities
This required switching from communities to normal view.

fix: crash when clicking channel link in community message
When a message in communities contains a link to another channel (ie #otherchannel), the search for this channel needed to be updated to also search for the channel by name, allowing for switching between channels within a community by message link. Additionally, when in a community, if the channel was located in a normal chat, it will switch the view to the normal chat after being found.
2021-04-29 12:36:58 -04:00
Eric Mastro daabef3a3c fix: do not show watch-only accounts as “from address”
Fixes: #2257.

If a user had selected a watch-only address in the wallet, the backend `walletModel.currentAccount` property would also change. When loading a transaction modal, this property was used to set the `selectedAccount` value for the “from” `AccountSelector`, regardless if the account was a watch-only address.

This PR updates the logic for `selectedAccount` such that it will only allow the account to be selected if it is not a watch-only account.
2021-04-29 12:36:39 -04:00
Jonathan Rainville 3a7c95967a feat: implement redesign of message replies
Fixes #2303
2021-04-29 12:35:59 -04:00
Jonathan Rainville e77012919b fix(CompactMessage): fix reactions overlapping with the test 2021-04-29 12:18:31 -04:00
Jonathan Rainville 2e25bf4f8a fix(CompactMessage): fix message hover getting stuck
Fixes #2226 and #2196
2021-04-21 18:05:42 -04:00
Pascal Precht b36652348a uiux(Chat): ensure emojis are centered vertically within messages
Closes #227
2021-04-20 13:06:25 -04:00
Eric Mastro 6de717e0e4 fix: remove emoji html from notifications 2021-04-20 12:12:33 -04:00
Pascal Precht aeedc87368 feat: introduce global settings
This commit introces global settings that apply across accounts used
inside the application. This is useful when settings like the selected
locale should b the same across all accounts.

Closes #2144
2021-04-19 13:53:14 +02:00
Pascal Precht 6529efda4d uiux: fix sticker message border color 2021-04-15 16:59:55 -04:00
Jonathan Rainville 63b5c549b9 fix: fix invite button not setting Joined correctly
Fixes #2209
2021-04-13 17:50:32 -04:00
Jonathan Rainville 8607251a6e fix: fix qml warnings 2021-04-13 17:49:43 -04:00
Jonathan Rainville a9cae5b96e fix: fix compact message hover when a popup is opened
Fixes #2187
2021-04-13 14:43:48 -04:00
Jonathan Rainville b1fbad91fe fix: fix channel-identifier-dark-text 2021-04-13 14:42:45 -04:00
Jonathan Rainville 10fd90a152 fix: date label not showing correctly
Fixes #2184
2021-04-13 14:40:44 -04:00
Jonathan Rainville 2e248d710d fix: fix mention popup not showing after a line break 2021-04-01 17:07:25 -04:00
Jonathan Rainville 6c0fce5b0c fix: menu dropdowns not closing on button click and position 2021-04-01 16:59:43 -04:00
Jonathan Rainville 1bc3fa1c97 fix: fix sticker click modal to only open on sticker click 2021-03-30 16:08:13 -04:00
Jonathan Rainville 996b36714d fix: fix scroll speed on Windows 2021-03-30 16:02:10 -04:00
Jonathan Rainville 038ea033c9 feat: implement new dark theme colors for menu and more
Fixes #2094
2021-03-26 15:28:06 -04:00
Jonathan Rainville 0478a04db9 fix: fix chat time tooltip being too big
Fixes #1946
2021-03-25 16:57:47 -04:00
Iuri Matias 4e15002beb hide reactions and replies when the message is a transaction 2021-03-24 14:43:04 -04:00
Pascal Precht c28d4054ef fix(Chat): ensure chat reply separator doesn't leak into message
Fixes #1988
2021-03-24 14:17:43 -04:00
Jonathan Rainville 7188579e46 fix: fix mention showing as pubkey and show styling 2021-03-24 14:16:55 -04:00
Pascal Precht e1a4a47636 fix(Chat): disable HoverHandler when profile popup or context menu are open
Alright, this is an interesting one:

As described in #1829, when the profile popup is opened within the chat view,
users are still able to click *through* the popup on message, which then puts them in
an active state.

I've done a bunch of debugging as described [here](https://github.com/status-im/status-desktop/issues/1829#issuecomment-804748148) and after doing some
further debugging, I found out that `isMessageActive` isn't really the culprit here.

What causes this effect is the `HoverHandler` that's attached to the `CompactMessage` item.
`HoverHandler` is a standard QML type that emits `hoverChanged` signals so one can do things like
applying hover effects on elements, which is exactly what we do:

```
HoverHandler {
  onHoverChanged: {
    root.isHovered = hovered  // `root` being the message item
  }
}
```

I assume we went with this handler because putting a `MouseArea` in there instead, which fills
the entire message component pretty much eliminates all existing mouse handlers attached to
other child components, such as the profile image or the username of the message, which also
open a message context menu.

It turns out that, having a `HoverHandler` as described above, actually activates it when the
user clicks with the left mouse button as well (not just on hover). That's what causes the "click-through"
effect. This can be verified by setting `acceptedButtons` to `Qt.RightButton`, basically telling
the handler that only right clicks will activate it.

I then tried using `Qt.NoButtons` instead so that no button clicks and only hovers will activate
the handler, but that didn't seem to have any effect at all. It still defaults to `Qt.LeftButton`.

So the last resort was to disable the `HoverHandler` altogether, whenever either the profile popup,
or the message context menu (for emojis etc) is open.

Unfortunately, we don't have access to the profile popup in the compact message component, because it's
detached from the component tree. Therefore, I've introduced a new property `profilePopupOpened` on
the chat layout, which we can read from instead.

Fixes #1829
2021-03-23 10:32:31 -04:00
Jonathan Rainville 7fb9578285 feat: highlite mentions in the chat input as well 2021-03-22 15:49:21 -04:00
Pascal Precht b4389402e9
refactor: make use of StatusContextMenuButton 2021-03-18 10:03:08 +01:00
Jonathan Rainville 23a8de0449 fix: fix community not being passed correctly to the invite bubble 2021-03-17 16:09:23 -04:00
Jonathan Rainville 62d10eba49 feat: show community invite component on community link 2021-03-17 16:09:23 -04:00
Jonathan Rainville b9594591b0 fix: fix a lot of issues relative to dark theme
Fixes #1997
2021-03-16 17:22:58 -04:00
Richard Ramos 4f4a3f1c30 feat: see stickers details when clicking on a sticker 2021-03-16 15:39:52 -04:00
Pascal Precht 86ea7014f6 fix(Communities): make rejoining communities work
When the communities code was moved into its own view in https://github.com/status-im/status-desktop/commit/b38d1df59
it broke the functionality to join communities again.

Qt complains that the Nim API in use `chatsModel.communities.joinCommunity`
expects two parameters, when it's call with just one.
This is unexpected because the API in question set a default value
for its second parameter.

To make this work again, we have to make sure the `setActive`
parameter is supplied every time we call the API from
within QML.

Also, worth noting that this is not the first time we're running into
a scenario like this.
2021-03-05 13:59:44 -05:00
ace-smart 6e2062ec6f Fixed not showing issue for the profile thumbnail in the suggestion list. Fixes #1916 2021-03-04 17:34:01 -05:00
ace-smart f3226852c3 Fixed onboarding view backgroud image issue on dark mode. Fixes #1965 2021-03-04 17:17:29 -05:00
Jonathan Rainville 84034d5dbf fix: fix channel color in communities 2021-03-03 16:45:23 -05:00
Jonathan Rainville e28e98a394 fix: fix community rebase errors 2021-03-03 16:45:23 -05:00
Jonathan Rainville c5241e2bf4 feat: intercept clicks on messages links as well 2021-03-03 16:45:23 -05:00
Jonathan Rainville 35688e9740 feat: show unfurled link for status chats in 1:1 2021-03-03 16:45:23 -05:00
Jonathan Rainville b38d1df591 refactor: move communities functions to communities view in chat 2021-03-03 16:45:23 -05:00
Jonathan Rainville f9817d4f52 feat: add community requests, permissions, ENS and more 2021-03-03 16:45:23 -05:00
Iuri Matias 27eab84f94 Revert "chore: add dummy ListView to ChatMessages to avoid app crash"
This reverts commit 7b07a31fa6.
2021-03-01 16:06:06 -05:00
Pascal Precht 7b07a31fa6 chore: add dummy ListView to ChatMessages to avoid app crash
For an unknown reason, when the `chatLogView` ListView uses
a `verticalLayoutDirection: BottomToTop`, it prevents the application
from successfully rendering during login and crashes.

From debugging this, we know that this only happens when the above
condition applies *and* when a `DelegateModel` is used.
The delegate doesn't even need proper data, it application would still
crash.

We found out that the crash can be avoided when another `ListView` exists
in this component (however it's unclear why).

For now this commit adds such a placeholder `ListView` until it
we know more about what's going on.
2021-03-01 14:18:46 -05:00
ace-smart 367afb70a2 Fixed wrong invite description text color in dark mode. Fixes #1912 2021-02-25 15:43:57 -05:00
Jonathan Rainville f52cc984d6 fix: fix profile image order since reversing the list order 2021-02-25 15:41:14 -05:00
Jonathan Rainville fdcc700607 fix: fix chatMessages not starting at bottom by reversing list layout 2021-02-23 11:57:33 -05:00
Pascal Precht bd9fa37ce3 fix(Chat): ensure correct contact username is shown
In some cases inside of 1-on-1 chats, the fake messages added to
the beginning of the message list, wouldn't determine the correct
username of the contact in question.

This commit explicitly calls `chatsModel.userNameOrAlias()` instead
of relying on `activeChannel.name` which tries to do the same.
2021-02-23 10:42:23 -05:00
Pascal Precht 84806ee96c feat(MessageContextMenu): add copy link actions
This commit adds a menu item to the message context menu to
copy links that may exist inside of a message.

There are three possible scenarios:

1. There's no link in the message, which causes the menu to not
render the dedicated menu item at all
2. There's one link in the message, which renders an additional
`Action` with a copy-to-clipboard functionality
3. There are multiple links in a single message. This adds a
nested `PopupMenu` in the existing menu with menu items for each
link extracted from the message

To make this work there were some changes in the `PopupMenu` component
needed, as it wasn't take the sub menu's `enabled` state into account
properly. This makde it always render nested menus even when they
should've been invisible.

Closes: #1733
2021-02-23 08:53:54 -05:00
Richard Ramos b43122d7f3 feat: use stacklayout for chat messages 2021-02-23 08:53:31 -05:00
Jonathan Rainville ae56a360c4 fix: message height taking into account the image even when hidden 2021-02-22 17:29:06 -05:00
Jonathan Rainville 6eee5da36e fix: fix texts to use secondaryText instead of darkGrey 2021-02-22 09:58:18 -05:00
Jonathan Rainville eeb1628337 fix: fix binding loop on the fetch button 2021-02-18 16:38:10 -05:00
Jonathan Rainville 2a4780f379 fix: fix top bar not showing group chat name 2021-02-18 16:38:10 -05:00
Jonathan Rainville 7dc3bf7e87 fix: fix group info popup warning and don't load popup immediately 2021-02-18 16:38:10 -05:00
Jonathan Rainville 46412204c5 feat: implement new colors for dark mode 2021-02-18 15:24:12 -05:00
Jonathan Rainville 0e699cac65 chore: run translation scripts 2021-02-18 15:23:58 -05:00
Jonathan Rainville 0104962df8 fix: fix App not showing correctly when notification is clicked 2021-02-15 16:22:26 -05:00
Jonathan Rainville 82ede94700 fix: remove notifications from OS tray when app is opened back 2021-02-15 16:22:26 -05:00
ace-smart 3420593774 Fixed an issue that doesn't update one2one chatview name when unassign nickname from the contact. Fixes #1840 2021-02-15 16:04:31 -05:00
Jonathan Rainville 3fef5c7a69 feat: hide fetch old messages after 30 days 2021-02-12 14:45:43 -05:00
Jonathan Rainville 90e9e2d192 fix: fix top bar menu position 2021-02-12 14:45:09 -05:00
ace-smart aca6d4bd2e Fixed showing wrong ensname on one2one chat profile modal. Fixes #1810 2021-02-12 14:44:37 -05:00
ace-smart 972cf9f138 Fixed the issue doesn't show nickname on profileview in 1:1 chat. Fixes #1826 2021-02-11 10:15:29 -05:00
Iuri Matias 7b5a1660f8 make compact mode the default 2021-02-10 15:48:57 -05:00
Richard Ramos e8c169aace fix: make the time not selectable 2021-02-10 13:53:09 -05:00
Richard Ramos 0f44178c85 feat: add tooltip with the message timestamp when hovering the chat time 2021-02-10 13:53:09 -05:00
Richard Ramos b2262c8105 Show chat image and username again after a couple of minutes in chat
Fixes #1764
2021-02-10 13:52:36 -05:00
ace-smart 0c65551b45 Limited StatusToolTip width for maxWidth. Fixes #1817 2021-02-10 13:37:02 -05:00
ace-smart 9950221159 Adjusted padding and margin of the StatusTooltip component as design. Fixes #1817 2021-02-10 13:37:02 -05:00
Richard Ramos 3f525a0b2a fix: hover state on compact messages 2021-02-10 09:52:05 -05:00
Richard Ramos 4b7769c391 fix: adding padding to suggestion box to avoid having the identicon cut 2021-02-08 17:38:53 -05:00
Pascal Precht e61d91dd51 fix: make sure context menu receives correct channel index
This was missing in one of our previous PRs and causes the
channel context menu to not function properly e.g. when deleting
chats, it currently always deletes the first chat in the channel list
instead of the active channel.
2021-02-08 17:38:17 -05:00
Jonathan Rainville cabc82782c fix: fix emojis on normal mode and replies on compact 2021-02-08 16:48:14 -05:00
Jonathan Rainville e57fc2afb7 fix: fix appearance container to not have hover state and better height 2021-02-08 16:48:14 -05:00
Jonathan Rainville 51a379efda fix: add hover color for active emoji and fix corner 2021-02-08 16:48:14 -05:00
Jonathan Rainville 55920a4f9d feat: use StatusTooltip for emoji reaction list 2021-02-08 16:48:14 -05:00
Jonathan Rainville 984133ba4a feat: position emoji picker next to button group on the top 2021-02-08 16:48:14 -05:00
Jonathan Rainville 02651326b5 feat: add hover and selected state to the emoji picker 2021-02-08 16:48:14 -05:00
Jonathan Rainville c665861820 fix: fix button alignment and background glitch in compact mode 2021-02-08 16:48:14 -05:00
Jonathan Rainville 8a43fffd77 feat: add back date group in compact mode 2021-02-08 16:48:14 -05:00
Jonathan Rainville bffe888b0d feat: improve compact mode to fix all alignements 2021-02-08 16:48:14 -05:00
RichΛrd 200285399d Update ui/app/AppLayouts/Chat/ChatColumn/Message.qml
Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
2021-02-01 14:23:29 -05:00
Richard Ramos 4a9f63c59a fix: code review 2021-02-01 14:23:29 -05:00
Richard Ramos e76e936d2b feat: request older status updates 2021-02-01 14:23:29 -05:00
Richard Ramos f0479a50b1 fix: do not use a loading indicator for identicons 2021-02-01 12:00:03 -05:00
Jonathan Rainville 9026108e86 fix: status update not using the right component 2021-02-01 11:54:26 -05:00
Jonathan Rainville b773766055 fix: fix chatIdentifier binding loop 2021-02-01 11:54:26 -05:00