From bf50c451a0de5e719ab257c3837c277cd60e9569 Mon Sep 17 00:00:00 2001 From: Gela Date: Thu, 12 Oct 2023 09:37:55 -0700 Subject: [PATCH] Remove Messages - Remove Me option from developer menu (#8270) --- .../developerMenu/ViewDeveloperMenu.qml | 4 - .../getHelp/developerMenu/ViewMessages.qml | 80 ------------------- src/ui/ui.qrc | 1 - 3 files changed, 85 deletions(-) delete mode 100644 src/ui/screens/getHelp/developerMenu/ViewMessages.qml diff --git a/src/ui/screens/getHelp/developerMenu/ViewDeveloperMenu.qml b/src/ui/screens/getHelp/developerMenu/ViewDeveloperMenu.qml index df2eb93aeb..87eaf0cefc 100644 --- a/src/ui/screens/getHelp/developerMenu/ViewDeveloperMenu.qml +++ b/src/ui/screens/getHelp/developerMenu/ViewDeveloperMenu.qml @@ -148,10 +148,6 @@ MZViewBase { title: "Theme list" viewQrc: "qrc:/ui/screens/getHelp/developerMenu/ViewThemeList.qml" } - ListElement { - title: "Messages - REMOVE ME" - viewQrc: "qrc:/ui/screens/getHelp/developerMenu/ViewMessages.qml" - } ListElement { title: "Animations playground" viewQrc: "qrc:/ui/screens/getHelp/developerMenu/ViewAnimationsPlayground.qml" diff --git a/src/ui/screens/getHelp/developerMenu/ViewMessages.qml b/src/ui/screens/getHelp/developerMenu/ViewMessages.qml deleted file mode 100644 index 6b1068c3bf..0000000000 --- a/src/ui/screens/getHelp/developerMenu/ViewMessages.qml +++ /dev/null @@ -1,80 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -import QtQuick 2.5 -import QtQuick.Controls 2.14 -import QtQuick.Layouts 1.14 - -import Mozilla.Shared 1.0 -import Mozilla.Shared.qmlcomponents 1.0 -import components 0.1 -import components.forms 0.1 - -Item { - id: root - - MZMenu { - id: menu - // Do not translate this string! - title: "Messages - REMOVE ME" - _menuOnBackClicked: () => getHelpStackView.pop() - } - - MZFlickable { - id: vpnFlickable - flickContentHeight: messagessHolder.implicitHeight - anchors.top: menu.bottom - height: root.height - menu.height - anchors.left: parent.left - anchors.right: parent.right - - ColumnLayout { - anchors.top: parent.top - anchors.left: parent.left - anchors.leftMargin: MZTheme.theme.windowMargin - - spacing: MZTheme.theme.windowMargin - id: messagessHolder - - MZFilterProxyModel { - id: messagesModel - source: MZAddonManager - filterCallback: obj => obj.addon.type === "message" - } - - Text { - text: "Unread messages: " + MZAddonManager.reduce((addon, initialValue) => initialValue + (addon.type === "message" ? 1 : 0), 0); - } - - Repeater { - model: messagesModel - delegate: MZCheckBoxRow { - // I'm too lazy to create a proper view. - function showMessageContent(addon) { - const list = []; - list.push("Translate title: " + addon.title); - list.push("Is read: " + addon.isRead); - list.push("Blocks: " + addon.composer.blocks.length); - return list.join("\n"); - } - - showDivider: false - labelText: addon.id - subLabelText: showMessageContent(addon) - // Only enable the list on features where devModeEnable has any impact - enabled: true - Layout.minimumHeight: MZTheme.theme.rowHeight * 1.5 - - onClicked: { - if (addon.isRead) { - addon.dismiss(); - } else { - addon.markAsRead(); - } - } - } - } - } - } -} diff --git a/src/ui/ui.qrc b/src/ui/ui.qrc index f9e955a3bc..2183328bd1 100644 --- a/src/ui/ui.qrc +++ b/src/ui/ui.qrc @@ -26,7 +26,6 @@ screens/getHelp/developerMenu/ViewAnimationsPlayground.qml screens/getHelp/developerMenu/ViewDeveloperMenu.qml screens/getHelp/developerMenu/ViewFeatureList.qml - screens/getHelp/developerMenu/ViewMessages.qml screens/getHelp/developerMenu/ViewTelemetryDebugging.qml screens/getHelp/developerMenu/ViewThemeList.qml screens/getHelp/developerMenu/ViewUiTesting.qml