mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-18 01:27:25 +00:00
fix(act-center): multiple fixes to the activity center
This commit is contained in:
parent
d7c368bcb6
commit
e2d91dc66b
@ -243,6 +243,12 @@ QtObject:
|
|||||||
self.setNewData(activityCenterNotifications)
|
self.setNewData(activityCenterNotifications)
|
||||||
else:
|
else:
|
||||||
for activityCenterNotification in activityCenterNotifications:
|
for activityCenterNotification in activityCenterNotifications:
|
||||||
|
var found = false
|
||||||
|
for notif in self.activityCenterNotifications:
|
||||||
|
if activityCenterNotification.id == notif.id:
|
||||||
|
found = true
|
||||||
|
break
|
||||||
|
if found: continue
|
||||||
self.addActivityNotificationItemToList(activityCenterNotification, false)
|
self.addActivityNotificationItemToList(activityCenterNotification, false)
|
||||||
|
|
||||||
self.nbUnreadNotifications = self.status.chat.unreadActivityCenterNotificationsCount()
|
self.nbUnreadNotifications = self.status.chat.unreadActivityCenterNotificationsCount()
|
||||||
|
@ -234,7 +234,7 @@ Item {
|
|||||||
|
|
||||||
membersButton.visible: appSettings.showOnlineUsers && chatsModel.channelView.activeChannel.chatType !== Constants.chatTypeOneToOne
|
membersButton.visible: appSettings.showOnlineUsers && chatsModel.channelView.activeChannel.chatType !== Constants.chatTypeOneToOne
|
||||||
notificationButton.visible: appSettings.isActivityCenterEnabled
|
notificationButton.visible: appSettings.isActivityCenterEnabled
|
||||||
notificationCount: chatsModel.activityNotificationList.unreadCount
|
notificationCount: chatsModel.activityNotificationList.unreadCount + profileModel.contacts.contactRequests.count
|
||||||
|
|
||||||
onSearchButtonClicked: searchPopup.open()
|
onSearchButtonClicked: searchPopup.open()
|
||||||
SearchPopup {
|
SearchPopup {
|
||||||
|
@ -20,7 +20,9 @@ Item {
|
|||||||
(model.notificationType === Constants.activityCenterNotificationTypeReply && activityCenter.currentFilter === ActivityCenter.Filter.Replies)
|
(model.notificationType === Constants.activityCenterNotificationTypeReply && activityCenter.currentFilter === ActivityCenter.Filter.Replies)
|
||||||
}
|
}
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: visible ? messageNotificationContent.height : 0
|
// Setting a height of 0 breaks the layout for when it comes back visible
|
||||||
|
// The Item never goes back to actually have a height or width
|
||||||
|
height: visible ? messageNotificationContent.height : 0.01
|
||||||
|
|
||||||
function openProfile() {
|
function openProfile() {
|
||||||
const pk = model.author
|
const pk = model.author
|
||||||
@ -58,8 +60,13 @@ Item {
|
|||||||
AcceptRejectOptionsButtons {
|
AcceptRejectOptionsButtons {
|
||||||
id: buttons
|
id: buttons
|
||||||
onAcceptClicked: {
|
onAcceptClicked: {
|
||||||
|
const setActiveChannel = chatsModel.channelView.setActiveChannel
|
||||||
|
const chatId = model.message.chatId
|
||||||
|
const messageId = model.message.messageId
|
||||||
profileModel.contacts.addContact(model.author)
|
profileModel.contacts.addContact(model.author)
|
||||||
chatsModel.activityNotificationList.acceptActivityCenterNotification(model.id)
|
chatsModel.activityNotificationList.acceptActivityCenterNotification(model.id)
|
||||||
|
setActiveChannel(chatId)
|
||||||
|
positionAtMessage(messageId)
|
||||||
}
|
}
|
||||||
onDeclineClicked: chatsModel.activityNotificationList.dismissActivityCenterNotification(model.id)
|
onDeclineClicked: chatsModel.activityNotificationList.dismissActivityCenterNotification(model.id)
|
||||||
onProfileClicked: root.openProfile()
|
onProfileClicked: root.openProfile()
|
||||||
|
@ -50,7 +50,7 @@ Rectangle {
|
|||||||
id: replyComponent
|
id: replyComponent
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
property int replyMessageIndex: chatsModel.getMessageIndex(chatId, responseTo)
|
property int replyMessageIndex: chatsModel.messageView.getMessageIndex(chatId, responseTo)
|
||||||
property string repliedMessageContent: replyMessageIndex > -1 ? chatsModel.messageView.getMessageData(chatId, replyMessageIndex, "message") : "";
|
property string repliedMessageContent: replyMessageIndex > -1 ? chatsModel.messageView.getMessageData(chatId, replyMessageIndex, "message") : "";
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user