2023-02-21 16:11:44 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
|
|
|
import shared 1.0
|
2022-10-26 16:00:20 +00:00
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: root
|
|
|
|
|
2023-02-23 11:09:05 +00:00
|
|
|
enum ActivityCenterGroup {
|
|
|
|
All = 0,
|
|
|
|
Mentions = 1,
|
|
|
|
Replies = 2,
|
|
|
|
Membership = 3,
|
|
|
|
Admin = 4,
|
|
|
|
ContactRequests = 5,
|
|
|
|
IdentityVerification = 6,
|
|
|
|
Transactions = 7,
|
|
|
|
System = 8
|
|
|
|
}
|
|
|
|
|
|
|
|
enum ActivityCenterNotificationType {
|
|
|
|
NoType = 0,
|
|
|
|
NewOneToOne = 1,
|
|
|
|
NewPrivateGroupChat = 2,
|
|
|
|
Mention = 3,
|
|
|
|
Reply = 4,
|
|
|
|
ContactRequest = 5,
|
|
|
|
CommunityInvitation = 6,
|
|
|
|
CommunityRequest = 7,
|
|
|
|
CommunityMembershipRequest = 8,
|
|
|
|
CommunityKicked = 9,
|
|
|
|
ContactVerification = 10
|
|
|
|
}
|
|
|
|
|
|
|
|
enum ActivityCenterReadType {
|
|
|
|
Read = 1,
|
|
|
|
Unread = 2,
|
|
|
|
All = 3
|
|
|
|
}
|
|
|
|
|
|
|
|
enum ActivityCenterMembershipStatus {
|
|
|
|
Pending = 1,
|
|
|
|
Accepted = 2,
|
|
|
|
Declined = 3
|
|
|
|
}
|
|
|
|
|
2023-01-23 09:00:06 +00:00
|
|
|
readonly property var activityCenterModuleInst: activityCenterModule
|
2023-02-13 08:51:24 +00:00
|
|
|
readonly property var activityCenterNotifications: activityCenterModuleInst.activityNotificationsModel
|
2023-01-23 09:00:06 +00:00
|
|
|
readonly property int unreadNotificationsCount: activityCenterModuleInst.unreadActivityCenterNotificationsCount
|
2023-02-07 15:53:56 +00:00
|
|
|
readonly property bool hasUnseenNotifications: activityCenterModuleInst.hasUnseenActivityCenterNotifications
|
2023-02-21 16:11:44 +00:00
|
|
|
readonly property int activeNotificationGroup: activityCenterModuleInst.activeNotificationGroup
|
2023-02-22 15:49:44 +00:00
|
|
|
readonly property int activityCenterReadType: activityCenterModuleInst.activityCenterReadType
|
2022-10-26 16:00:20 +00:00
|
|
|
|
|
|
|
function markAllActivityCenterNotificationsRead() {
|
|
|
|
root.activityCenterModuleInst.markAllActivityCenterNotificationsRead()
|
|
|
|
}
|
|
|
|
|
|
|
|
function markActivityCenterNotificationRead(notification) {
|
|
|
|
root.activityCenterModuleInst.markActivityCenterNotificationRead(
|
|
|
|
notification.id, notification.message.communityId,
|
|
|
|
notification.message.chatId, notification.notificationType)
|
|
|
|
}
|
|
|
|
|
|
|
|
function markActivityCenterNotificationUnread(notification) {
|
|
|
|
root.activityCenterModuleInst.markActivityCenterNotificationUnread(
|
|
|
|
notification.id, notification.message.communityId,
|
|
|
|
notification.message.chatId, notification.notificationType)
|
|
|
|
}
|
|
|
|
|
2023-02-07 15:53:56 +00:00
|
|
|
function markAsSeenActivityCenterNotifications() {
|
|
|
|
root.activityCenterModuleInst.markAsSeenActivityCenterNotifications()
|
|
|
|
}
|
|
|
|
|
2022-10-26 16:00:20 +00:00
|
|
|
function switchTo(notification) {
|
|
|
|
root.activityCenterModuleInst.switchTo(notification.sectionId, notification.chatId, notification.id)
|
|
|
|
}
|
2023-02-21 16:11:44 +00:00
|
|
|
|
|
|
|
function setActiveNotificationGroup(group) {
|
|
|
|
root.activityCenterModuleInst.setActiveNotificationGroup(group)
|
|
|
|
}
|
2023-02-22 15:49:44 +00:00
|
|
|
|
|
|
|
function setActivityCenterReadType(readType) {
|
|
|
|
root.activityCenterModuleInst.setActivityCenterReadType(readType)
|
|
|
|
}
|
2022-10-26 16:00:20 +00:00
|
|
|
}
|