This introduces a new `popupMenu` property that can be used to pass
down a `StatusPopupMenu` to `StatusChatToolBar`.
The reason this is done is so that we get control over its `onClosed`
handler, which is used to remove the menu button's `highlighted` state.
The `highlighted` state is activated inside the component as well when
it's clicked.
Existing signals like `menuButtonClicked` still exist and can be leveraged
for further logic.
Closes#125
This component is used to render chat list categories.
Usage:
```qml
import StatusQ.Components 0.1
StatusChatListCategoryItem {
title: "Public"
onClicked: opened = !opened
onToggleButtonClicked: opened = !opened
onMenuButtonClicked: ...
onAddButtonClicked: ...
addButton.[...]: ... // StatusChatListCategoryItemButton
menuButton.[...]: ... // StatusChatListCategoryItemButton
toggleButton.[...]: ... // StatusChatListCategoryItemButton
}
```
The button components are exposed so their tooltips can be configured
with (internationalized) app messages.
Closes#117
This commit introduce a new `StautsChatList` component that can be used
to render `StatusChatListItem`s, typically for chat and community views.
The component expects a `chatListItems.model` that has the following properties:
```qml
ListModel {
ListElement {
chatId: "0"
name: "#status"
chatType: StatusChatListItem.Type.PublicChat
muted: false
hasUnreadMessages: false
hasMention: false
unreadMessagesCount: 0
iconColor: "blue"
}
...
}
```
It also emits two possible signals:
- `onChatItemSelected(string id)`
- `onChatItemUnmuted(string id)`
Usage:
```qml
import StatusQ.Components 0.1
StatusChatList {
selectedChatId: "0"
chatListItems.model: demoChatListItems
onChatItemSelected: ...
onChatItemUnmuted: ...
}
```
Closes#100