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,
|
2023-06-08 12:52:03 +00:00
|
|
|
ContactVerification = 10,
|
2023-08-24 13:09:25 +00:00
|
|
|
ContactRemoved = 11,
|
2023-10-23 11:35:20 +00:00
|
|
|
NewKeypairAddedToPairedDevice = 12,
|
|
|
|
OwnerTokenReceived = 13,
|
2023-10-23 11:36:33 +00:00
|
|
|
OwnershipReceived = 14,
|
|
|
|
OwnershipLost = 15,
|
2023-10-23 11:35:20 +00:00
|
|
|
OwnershipFailed = 16,
|
2023-11-28 13:41:11 +00:00
|
|
|
OwnershipDeclined = 17,
|
2024-01-04 12:22:12 +00:00
|
|
|
ShareAccounts = 18,
|
|
|
|
CommunityTokenReceived = 19
|
2023-02-23 11:09:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
enum ActivityCenterReadType {
|
|
|
|
Read = 1,
|
|
|
|
Unread = 2,
|
|
|
|
All = 3
|
|
|
|
}
|
|
|
|
|
|
|
|
enum ActivityCenterMembershipStatus {
|
2023-08-07 13:35:14 +00:00
|
|
|
None = 0,
|
2023-02-23 11:09:05 +00:00
|
|
|
Pending = 1,
|
|
|
|
Accepted = 2,
|
2023-08-07 09:21:46 +00:00
|
|
|
Declined = 3,
|
|
|
|
AcceptedPending = 4,
|
|
|
|
DeclinedPending = 5
|
2023-02-23 11:09:05 +00:00
|
|
|
}
|
|
|
|
|
2023-04-18 15:08:24 +00:00
|
|
|
enum ActivityCenterContactRequestState {
|
|
|
|
Pending = 1,
|
|
|
|
Accepted = 2,
|
|
|
|
Dismissed = 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-02-23 12:43:28 +00:00
|
|
|
|
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
|
|
|
|
2023-02-23 12:43:28 +00:00
|
|
|
readonly property int adminCount: activityCenterModuleInst.adminCount
|
|
|
|
readonly property int mentionsCount: activityCenterModuleInst.mentionsCount
|
|
|
|
readonly property int repliesCount: activityCenterModuleInst.repliesCount
|
|
|
|
readonly property int contactRequestsCount: activityCenterModuleInst.contactRequestsCount
|
2023-03-01 12:23:46 +00:00
|
|
|
readonly property int identityVerificationCount: activityCenterModuleInst.identityVerificationCount
|
2023-02-23 12:43:28 +00:00
|
|
|
readonly property int membershipCount: activityCenterModuleInst.membershipCount
|
|
|
|
|
2022-10-26 16:00:20 +00:00
|
|
|
function markAllActivityCenterNotificationsRead() {
|
|
|
|
root.activityCenterModuleInst.markAllActivityCenterNotificationsRead()
|
|
|
|
}
|
|
|
|
|
|
|
|
function markActivityCenterNotificationRead(notification) {
|
2023-11-20 08:53:34 +00:00
|
|
|
root.activityCenterModuleInst.markActivityCenterNotificationRead(notification.id)
|
2022-10-26 16:00:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function markActivityCenterNotificationUnread(notification) {
|
2023-11-20 08:53:34 +00:00
|
|
|
root.activityCenterModuleInst.markActivityCenterNotificationUnread(notification.id)
|
2022-10-26 16:00:20 +00:00
|
|
|
}
|
|
|
|
|
2023-02-07 15:53:56 +00:00
|
|
|
function markAsSeenActivityCenterNotifications() {
|
|
|
|
root.activityCenterModuleInst.markAsSeenActivityCenterNotifications()
|
|
|
|
}
|
|
|
|
|
2022-10-26 16:00:20 +00:00
|
|
|
function switchTo(notification) {
|
2023-07-22 17:20:06 +00:00
|
|
|
root.activityCenterModuleInst.switchTo(notification.sectionId, notification.chatId, notification.message.id)
|
2022-10-26 16:00:20 +00:00
|
|
|
}
|
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)
|
|
|
|
}
|
2023-11-15 11:29:03 +00:00
|
|
|
|
|
|
|
function fetchActivityCenterNotifications() {
|
|
|
|
root.activityCenterModuleInst.fetchActivityCenterNotifications()
|
|
|
|
}
|
2023-07-22 17:20:06 +00:00
|
|
|
}
|