2020-11-19 14:59:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtGraphicalEffects 1.13
|
|
|
|
import QtQuick.Layouts 1.13
|
|
|
|
import "../../../../imports"
|
|
|
|
import "../../../../shared"
|
|
|
|
import "../../../../shared/status"
|
|
|
|
|
|
|
|
ModalPopup {
|
|
|
|
id: root
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Muted chats"
|
|
|
|
title: qsTrId("muted-chats")
|
2020-11-19 14:59:31 +00:00
|
|
|
property bool showMutedContacts: false
|
|
|
|
|
|
|
|
onClosed: {
|
|
|
|
root.destroy()
|
|
|
|
}
|
|
|
|
|
|
|
|
ListView {
|
|
|
|
id: mutedChatsList
|
|
|
|
anchors.top: parent.top
|
|
|
|
visible: true
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
model: root.showMutedContacts ? profileModel.mutedContacts : profileModel.mutedChats
|
|
|
|
delegate: Rectangle {
|
|
|
|
height: contactImage.height + Style.current.smallPadding * 2
|
2021-01-21 18:07:01 +00:00
|
|
|
width: parent.width
|
2020-11-19 14:59:31 +00:00
|
|
|
color: Style.current.transparent
|
|
|
|
|
|
|
|
StatusIdenticon {
|
|
|
|
id: contactImage
|
|
|
|
height: 40
|
|
|
|
width: 40
|
|
|
|
chatName: model.name
|
|
|
|
chatType: model.chatType
|
|
|
|
identicon: model.identicon
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: contactInfo
|
|
|
|
text: model.chatType !== Constants.chatTypePublic ?
|
|
|
|
Emoji.parse(Utils.removeStatusEns(Utils.filterXSS(model.name)), "26x26") :
|
|
|
|
"#" + Utils.filterXSS(model.name)
|
|
|
|
anchors.right: unmuteButton.left
|
|
|
|
anchors.rightMargin: Style.current.smallPadding
|
|
|
|
elide: Text.ElideRight
|
|
|
|
font.pixelSize: 17
|
|
|
|
anchors.left: contactImage.right
|
|
|
|
anchors.leftMargin: Style.current.padding
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
|
2021-01-21 18:07:01 +00:00
|
|
|
StatusButton {
|
2020-11-19 14:59:31 +00:00
|
|
|
id: unmuteButton
|
2021-01-21 18:07:01 +00:00
|
|
|
type: "secondary"
|
2020-11-19 14:59:31 +00:00
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Unmute"
|
|
|
|
text: qsTrId("unmute")
|
2021-01-21 18:07:01 +00:00
|
|
|
onClicked: {
|
|
|
|
profileModel.unmuteChannel(model.id)
|
2020-11-19 14:59:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|