feat(ActivityCenter): Store AC properties globaly
Close 7489
This commit is contained in:
parent
ac9d68b6f5
commit
2681542a98
|
@ -39,6 +39,7 @@ import AppLayouts.stores 1.0
|
|||
|
||||
import "popups"
|
||||
import "activitycenter/popups"
|
||||
import "activitycenter/stores" as AC
|
||||
|
||||
Item {
|
||||
id: appMain
|
||||
|
@ -46,7 +47,8 @@ Item {
|
|||
|
||||
property alias appLayout: appLayout
|
||||
property alias dragAndDrop: dragTarget
|
||||
property RootStore rootStore: RootStore { }
|
||||
property RootStore rootStore: RootStore {}
|
||||
property AC.RootStore acStore: AC.RootStore {}
|
||||
// set from main.qml
|
||||
property var sysPalette
|
||||
|
||||
|
@ -907,6 +909,7 @@ Item {
|
|||
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
|
||||
acStore: appMain.acStore
|
||||
chatSectionModule: chatLayoutContainer.rootStore.chatCommunitySectionModule
|
||||
onClosed: {
|
||||
Global.activityCenterPopupOpened = false
|
||||
|
|
|
@ -45,7 +45,6 @@ Badge {
|
|||
readOnly: true
|
||||
textFormat: Text.RichText
|
||||
clip: true
|
||||
color: root.communityColor
|
||||
font.pixelSize: 13
|
||||
}
|
||||
}
|
|
@ -36,9 +36,9 @@ Popup {
|
|||
property int mentionsCount: 0
|
||||
property int repliesCount: 0
|
||||
property int contactRequestsCount: 0
|
||||
property bool hideReadNotifications: false
|
||||
|
||||
property var store
|
||||
property var acStore
|
||||
property var chatSectionModule
|
||||
property var messageContextMenu: MessageContextMenuView {
|
||||
store: root.store
|
||||
|
@ -128,11 +128,11 @@ Popup {
|
|||
hasReplies: root.repliesCount > 0
|
||||
hasMentions: root.mentionsCount > 0
|
||||
hasContactRequests: root.contactRequestsCount > 0
|
||||
hideReadNotifications: root.hideReadNotifications
|
||||
hideReadNotifications: acStore.hideReadNotifications
|
||||
currentActivityCategory: root.currentActivityCategory
|
||||
onCategoryTriggered: root.currentActivityCategory = category
|
||||
onMarkAllReadClicked: errorText = root.store.activityCenterModuleInst.markAllActivityCenterNotificationsRead()
|
||||
onShowHideReadNotifications: root.hideReadNotifications = hideReadNotifications
|
||||
onShowHideReadNotifications: acStore.hideReadNotifications = hideReadNotifications
|
||||
}
|
||||
|
||||
StatusListView {
|
||||
|
@ -147,7 +147,7 @@ Popup {
|
|||
sourceModel: root.store.activityCenterList
|
||||
|
||||
filters: ExpressionFilter { expression: filterActivityCategories(model.notificationType) &&
|
||||
!(root.hideReadNotifications && model.read) }
|
||||
!(acStore.hideReadNotifications && model.read) }
|
||||
}
|
||||
|
||||
delegate: DelegateChooser {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import QtQuick 2.13
|
||||
|
||||
import utils 1.0
|
||||
import StatusQ.Core.Utils 0.1 as StatusQUtils
|
||||
import QtQuick 2.14
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
|
||||
property bool hideReadNotifications: false
|
||||
|
||||
// TODO: move AC-related stuff from chat here
|
||||
}
|
|
@ -17,6 +17,4 @@ ActivityNotificationMessage {
|
|||
repliedMessageContent: notification.repliedMessage.messageText
|
||||
onReplyClicked: root.store.activityCenterModuleInst.switchTo(notification.sectionId, notification.chatId, notification.id)
|
||||
}
|
||||
// repliedMessageContent: notification.repliedMessage.messageText
|
||||
// repliedMessageId: notification.message.responseToMessageWithId
|
||||
}
|
Loading…
Reference in New Issue