From 03b0d272f99180bd41cf108c54a6227fddbdc0a9 Mon Sep 17 00:00:00 2001 From: Alexandra Betouni Date: Tue, 20 Jul 2021 19:01:22 +0300 Subject: [PATCH] [#2549] Muted contacts and chats modal was missing indicative text Muted contacts and Muted chats modals were blank when nothing added to list, added indicative text label Closes #2549 --- .../Profile/Sections/MutedChatsModal.qml | 7 +++++++ .../Profile/Sections/NotificationsContainer.qml | 14 ++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ui/app/AppLayouts/Profile/Sections/MutedChatsModal.qml b/ui/app/AppLayouts/Profile/Sections/MutedChatsModal.qml index 4d03dd8a40..468b1f4286 100644 --- a/ui/app/AppLayouts/Profile/Sections/MutedChatsModal.qml +++ b/ui/app/AppLayouts/Profile/Sections/MutedChatsModal.qml @@ -11,6 +11,7 @@ ModalPopup { //% "Muted chats" title: qsTrId("muted-chats") property bool showMutedContacts: false + property string noContentText: "" onClosed: { root.destroy() @@ -88,4 +89,10 @@ ModalPopup { } } } + + StyledText { + anchors.centerIn: parent + visible: (mutedChatsList.count === 0) + text: root.noContentText + } } diff --git a/ui/app/AppLayouts/Profile/Sections/NotificationsContainer.qml b/ui/app/AppLayouts/Profile/Sections/NotificationsContainer.qml index a1757e7472..23d751cc1c 100644 --- a/ui/app/AppLayouts/Profile/Sections/NotificationsContainer.qml +++ b/ui/app/AppLayouts/Profile/Sections/NotificationsContainer.qml @@ -116,7 +116,7 @@ ScrollView { StatusSettingsLineButton { //% "Play a sound when receiving a notification" - text: qsTrId("play-a-sound-when-receiving-a-notification") + text: qsTr("play-a-sound-when-receiving-a-notification") isSwitch: true switchChecked: appSettings.notificationSoundsEnabled onClicked: { @@ -126,7 +126,7 @@ ScrollView { StatusSettingsLineButton { //% "Use your operating system's notifications" - text: qsTrId("use-your-operating-system-s-notifications") + text: qsTr("use-your-operating-system-s-notifications") isSwitch: true switchChecked: appSettings.useOSNotifications onClicked: { @@ -273,8 +273,9 @@ ScrollView { showMutedContacts: true }) //% "Muted contacts" - mutedChatsModal.title = qsTrId("muted-contacts") - mutedChatsModal.open() + mutedChatsModal.title = qsTrId("muted-contacts"); + mutedChatsModal.noContentText = qsTr("Muted contacts will appear here"); + mutedChatsModal.open(); } } @@ -289,8 +290,9 @@ ScrollView { showMutedContacts: false }) //% "Muted chats" - mutedChatsModal.title = qsTrId("muted-chats") - mutedChatsModal.open() + mutedChatsModal.title = qsTrId("muted-chats"); + mutedChatsModal.noContentText = qsTr("Muted chats will appear here"); + mutedChatsModal.open(); } StyledText {