2023-02-21 20:11:44 +04:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
|
|
|
import shared 1.0
|
2022-10-26 20:00:20 +04:00
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: root
|
|
|
|
|
2023-02-23 15:09:05 +04: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 16:52:03 +04:00
|
|
|
ContactVerification = 10,
|
2023-08-24 15:09:25 +02:00
|
|
|
ContactRemoved = 11,
|
2023-10-23 13:35:20 +02:00
|
|
|
NewKeypairAddedToPairedDevice = 12,
|
|
|
|
OwnerTokenReceived = 13,
|
2023-10-23 13:36:33 +02:00
|
|
|
OwnershipReceived = 14,
|
|
|
|
OwnershipLost = 15,
|
2023-10-23 13:35:20 +02:00
|
|
|
OwnershipFailed = 16,
|
2023-11-28 14:41:11 +01:00
|
|
|
OwnershipDeclined = 17,
|
2024-01-04 13:22:12 +01:00
|
|
|
ShareAccounts = 18,
|
2024-01-29 14:29:15 +01:00
|
|
|
CommunityTokenReceived = 19,
|
|
|
|
FirstCommunityTokenReceived = 20
|
2023-02-23 15:09:05 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
enum ActivityCenterReadType {
|
|
|
|
Read = 1,
|
|
|
|
Unread = 2,
|
|
|
|
All = 3
|
|
|
|
}
|
|
|
|
|
|
|
|
enum ActivityCenterMembershipStatus {
|
2023-08-07 16:35:14 +03:00
|
|
|
None = 0,
|
2023-02-23 15:09:05 +04:00
|
|
|
Pending = 1,
|
|
|
|
Accepted = 2,
|
2023-08-07 12:21:46 +03:00
|
|
|
Declined = 3,
|
|
|
|
AcceptedPending = 4,
|
|
|
|
DeclinedPending = 5
|
2023-02-23 15:09:05 +04:00
|
|
|
}
|
|
|
|
|
2023-04-18 19:08:24 +04:00
|
|
|
enum ActivityCenterContactRequestState {
|
|
|
|
Pending = 1,
|
|
|
|
Accepted = 2,
|
|
|
|
Dismissed = 3
|
|
|
|
}
|
|
|
|
|
2023-01-23 13:00:06 +04:00
|
|
|
readonly property var activityCenterModuleInst: activityCenterModule
|
2023-02-13 12:51:24 +04:00
|
|
|
readonly property var activityCenterNotifications: activityCenterModuleInst.activityNotificationsModel
|
2023-02-23 16:43:28 +04:00
|
|
|
|
2023-01-23 13:00:06 +04:00
|
|
|
readonly property int unreadNotificationsCount: activityCenterModuleInst.unreadActivityCenterNotificationsCount
|
2023-02-07 19:53:56 +04:00
|
|
|
readonly property bool hasUnseenNotifications: activityCenterModuleInst.hasUnseenActivityCenterNotifications
|
2023-02-21 20:11:44 +04:00
|
|
|
readonly property int activeNotificationGroup: activityCenterModuleInst.activeNotificationGroup
|
2023-02-22 19:49:44 +04:00
|
|
|
readonly property int activityCenterReadType: activityCenterModuleInst.activityCenterReadType
|
2022-10-26 20:00:20 +04:00
|
|
|
|
2023-02-23 16:43:28 +04: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 16:23:46 +04:00
|
|
|
readonly property int identityVerificationCount: activityCenterModuleInst.identityVerificationCount
|
2023-02-23 16:43:28 +04:00
|
|
|
readonly property int membershipCount: activityCenterModuleInst.membershipCount
|
|
|
|
|
2022-10-26 20:00:20 +04:00
|
|
|
function markAllActivityCenterNotificationsRead() {
|
|
|
|
root.activityCenterModuleInst.markAllActivityCenterNotificationsRead()
|
|
|
|
}
|
|
|
|
|
|
|
|
function markActivityCenterNotificationRead(notification) {
|
2023-11-20 12:53:34 +04:00
|
|
|
root.activityCenterModuleInst.markActivityCenterNotificationRead(notification.id)
|
2022-10-26 20:00:20 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
function markActivityCenterNotificationUnread(notification) {
|
2023-11-20 12:53:34 +04:00
|
|
|
root.activityCenterModuleInst.markActivityCenterNotificationUnread(notification.id)
|
2022-10-26 20:00:20 +04:00
|
|
|
}
|
|
|
|
|
2023-02-07 19:53:56 +04:00
|
|
|
function markAsSeenActivityCenterNotifications() {
|
|
|
|
root.activityCenterModuleInst.markAsSeenActivityCenterNotifications()
|
|
|
|
}
|
|
|
|
|
2022-10-26 20:00:20 +04:00
|
|
|
function switchTo(notification) {
|
2023-07-22 20:20:06 +03:00
|
|
|
root.activityCenterModuleInst.switchTo(notification.sectionId, notification.chatId, notification.message.id)
|
2022-10-26 20:00:20 +04:00
|
|
|
}
|
2023-02-21 20:11:44 +04:00
|
|
|
|
|
|
|
function setActiveNotificationGroup(group) {
|
|
|
|
root.activityCenterModuleInst.setActiveNotificationGroup(group)
|
|
|
|
}
|
2023-02-22 19:49:44 +04:00
|
|
|
|
|
|
|
function setActivityCenterReadType(readType) {
|
|
|
|
root.activityCenterModuleInst.setActivityCenterReadType(readType)
|
|
|
|
}
|
2023-11-15 15:29:03 +04:00
|
|
|
|
|
|
|
function fetchActivityCenterNotifications() {
|
|
|
|
root.activityCenterModuleInst.fetchActivityCenterNotifications()
|
|
|
|
}
|
2023-07-22 20:20:06 +03:00
|
|
|
}
|