mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 14:26:34 +00:00
b1e5a15e2a
This commit does a bunch of things: - First and foremost, it removes the active channel dependency. This is needed to have it operate on the correct channel object, without forcing us to change the active channel (e.g. right-clicking on a channel item that's not active, will make it active eventually) - To make that work, this commit changes the `ChannelContextMenu` to receive a `ChatItemView`, so it can be used for things like determining what menu options are shown, what members are in a group, whether someone is admin of a group etc. - This also required a new `QtProperty` called `contextChannel`. The reason this is required, is because in some cases, like receiving members count of groups, we need a complete `ChatItemView` object as we don't have access to certain APIs otherwise. - Unfortunately, we can't pass down `activeChannel` every where for that because sometimes the context menu should not actually operate on the active channel. Fixes: #1755