mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-10 13:46:35 +00:00
popupMenu
property
Chat list items can open a context on right click as well, so `StatusChatList` needs to provide an API for users to pass down a `StatusPopupMenu` accordingly. This is now possible with a dedicated `popupMenu` proporty that can be used as follows: ```qml StatusChatList { ... popupMenu: StatusPopupMenu { property string chatId openHandler: function () { ... } StatusMenuItem { ... } ... } } ``` As will all `popupMenu` properties in StatusQ component, having this explicit API option enables us to have control over how triggering components (in this case chat list items) behave when they open a context menu (e.g. keeping them highlighted as long as the menu is active). When defining a `chatId` property, `StatusChatList` will hydrate it with the id of the chat list item that has triggered the menu. If there's more logic to be executed upon opening the menu, `openHandler` serves as a hook similar to other popup menus. Inside the hook, users have access to the specific `chatId`. Closes #171
…
…
…
…
…
Status-desktop
Desktop client for the Status Network built with Nim and Qt
Dev Docs: https://hackmd.io/@status-desktop/B1naRjxh_/https%3A%2F%2Fhackmd.io%2F%40status-desktop%2FB1eOaf-nd
Description
Languages
QML
39.4%
JavaScript
29.5%
Nim
18.5%
Python
5.6%
C++
5.2%
Other
1.6%