Revert "fix(CreateChatView): Move `ActivityCenterPopup` to appmain"
This reverts commit f1651ce4aa
.
This commit is contained in:
parent
9591123b7e
commit
430c5eb0b7
|
@ -8,16 +8,12 @@ import StatusQ.Controls 0.1
|
|||
|
||||
import shared 1.0
|
||||
import shared.popups 1.0
|
||||
import shared.views.chat 1.0
|
||||
|
||||
import utils 1.0
|
||||
|
||||
import "../views"
|
||||
import "../panels"
|
||||
|
||||
Popup {
|
||||
id: activityCenter
|
||||
|
||||
enum Filter {
|
||||
All,
|
||||
Mentions,
|
||||
|
@ -32,13 +28,11 @@ Popup {
|
|||
property bool hideReadNotifications: false
|
||||
property var store
|
||||
property var chatSectionModule
|
||||
property var messageContextMenu: MessageContextMenuView {
|
||||
store: activityCenter.store
|
||||
reactionModel: activityCenter.store.emojiReactionsModel
|
||||
}
|
||||
property var messageContextMenu
|
||||
|
||||
readonly property int unreadNotificationsCount : activityCenter.store.activityCenterList.unreadCount
|
||||
|
||||
id: activityCenter
|
||||
modal: false
|
||||
|
||||
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
||||
|
|
|
@ -2,4 +2,3 @@ PinnedMessagesPopup 1.0 PinnedMessagesPopup.qml
|
|||
ChooseBrowserPopup 1.0 ChooseBrowserPopup.qml
|
||||
InviteFriendsToCommunityPopup 1.0 community/InviteFriendsToCommunityPopup.qml
|
||||
CommunityProfilePopup 1.0 community/CommunityProfilePopup.qml
|
||||
ActivityCenterPopup 1.0 ActivityCenterPopup.qml
|
||||
|
|
|
@ -155,6 +155,12 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
MessageContextMenuView {
|
||||
id: contextmenu
|
||||
store: root.rootStore
|
||||
reactionModel: root.rootStore.emojiReactionsModel
|
||||
}
|
||||
|
||||
EmptyChatPanel {
|
||||
anchors.fill: parent
|
||||
visible: root.activeChatId === "" || root.chatsCount == 0
|
||||
|
@ -227,14 +233,14 @@ Item {
|
|||
stickersLoaded: root.stickersLoaded
|
||||
isBlocked: model.blocked
|
||||
isActiveChannel: categoryChatLoader.isActiveChannel
|
||||
activityCenterVisible: Global.activityCenterPopupOpened
|
||||
activityCenterNotificationsCount: root.rootStore.activityCenterList.unreadCount
|
||||
activityCenterVisible: activityCenter.visible
|
||||
activityCenterNotificationsCount: activityCenter.unreadNotificationsCount
|
||||
pinnedMessagesPopupComponent: root.pinnedMessagesListPopupComponent
|
||||
onOpenStickerPackPopup: {
|
||||
root.openStickerPackPopup(stickerPackId)
|
||||
}
|
||||
onNotificationButtonClicked: {
|
||||
Global.openActivityCenterPopup()
|
||||
activityCenter.open();
|
||||
}
|
||||
onOpenAppSearch: {
|
||||
root.openAppSearch();
|
||||
|
@ -291,7 +297,7 @@ Item {
|
|||
root.openStickerPackPopup(stickerPackId)
|
||||
}
|
||||
onNotificationButtonClicked: {
|
||||
Global.openActivityCenterPopup()
|
||||
activityCenter.open();
|
||||
}
|
||||
onOpenAppSearch: {
|
||||
root.openAppSearch();
|
||||
|
@ -408,6 +414,15 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
ActivityCenterPopup {
|
||||
id: activityCenter
|
||||
height: root.height - 56 * 2 // TODO get screen size // Taken from old code top bar height was fixed there to 56
|
||||
y: 56
|
||||
store: root.rootStore
|
||||
chatSectionModule: root.parentModule
|
||||
messageContextMenu: contextmenu
|
||||
}
|
||||
|
||||
// Not Refactored Yet
|
||||
// Connections {
|
||||
// target: root.rootStore.chatsModelInst.stickers
|
||||
|
|
|
@ -12,8 +12,6 @@ import StatusQ.Core.Theme 0.1
|
|||
import utils 1.0
|
||||
import shared.status 1.0
|
||||
|
||||
import "../popups"
|
||||
|
||||
Page {
|
||||
id: root
|
||||
Behavior on anchors.bottomMargin { NumberAnimation { duration: 30 }}
|
||||
|
@ -138,7 +136,7 @@ Page {
|
|||
height: parent.height
|
||||
tooltip.offset: width/2
|
||||
unreadNotificationsCount: activityCenter.unreadNotificationsCount
|
||||
onClicked: Global.openActivityCenterPopup()
|
||||
onClicked: activityCenter.open()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,12 +89,6 @@ Item {
|
|||
popup.openPopup(publicKey, state);
|
||||
Global.profilePopupOpened = true;
|
||||
}
|
||||
|
||||
onOpenActivityCenterPopupRequested: {
|
||||
Global.openPopup(activityCenterPopupComponent)
|
||||
Global.activityCenterPopupOpened = true
|
||||
}
|
||||
|
||||
onOpenChangeProfilePicPopup: {
|
||||
var popup = changeProfilePicComponent.createObject(appMain);
|
||||
popup.chooseImageToCrop();
|
||||
|
@ -768,20 +762,6 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: activityCenterPopupComponent
|
||||
ActivityCenterPopup {
|
||||
id: activityCenter
|
||||
height: appView.height - 56 * 2 // TODO get screen size // Taken from old code top bar height was fixed there to 56
|
||||
y: 56
|
||||
store: chatLayoutContainer.rootStore
|
||||
chatSectionModule: chatLayoutContainer.rootStore.chatCommunitySectionModule
|
||||
onClosed: {
|
||||
Global.activityCenterPopupOpened = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DropArea {
|
||||
id: dragTarget
|
||||
|
||||
|
|
|
@ -19,8 +19,6 @@ QtObject {
|
|||
property var inviteFriendsToCommunityPopup
|
||||
property bool profilePopupOpened: false
|
||||
|
||||
property bool activityCenterPopupOpened: false
|
||||
|
||||
property var sendMessageSound
|
||||
property var notificationSound
|
||||
property var errorSound
|
||||
|
@ -39,16 +37,11 @@ QtObject {
|
|||
signal openChangeProfilePicPopup()
|
||||
signal displayToastMessage(string title, string subTitle, string icon, bool loading, int ephNotifType, string url)
|
||||
signal openEditDisplayNamePopup()
|
||||
signal openActivityCenterPopupRequested
|
||||
|
||||
function openProfilePopup(publicKey, parentPopup, state = "") {
|
||||
openProfilePopupRequested(publicKey, parentPopup, state);
|
||||
}
|
||||
|
||||
function openActivityCenterPopup() {
|
||||
openActivityCenterPopupRequested()
|
||||
}
|
||||
|
||||
function openPopup(popupComponent, params = {}) {
|
||||
const popup = popupComponent.createObject(root.appMain, params);
|
||||
popup.open();
|
||||
|
|
Loading…
Reference in New Issue