From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 121F7158020 for ; Sun, 18 Dec 2022 10:04:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 60E67E0863; Sun, 18 Dec 2022 10:04:25 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4AC0DE0863 for ; Sun, 18 Dec 2022 10:04:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8D680340DBE for ; Sun, 18 Dec 2022 10:04:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E1E98771 for ; Sun, 18 Dec 2022 10:04:22 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1671357844.29dcad42fad387284ba806eec4219e9e9ba0011f.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/neochat/, net-im/neochat/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-im/neochat/files/neochat-22.11-fix-crash-notification-settings.patch net-im/neochat/files/neochat-22.11-hide-dev-settings-loading.patch net-im/neochat/neochat-22.11-r1.ebuild X-VCS-Directories: net-im/neochat/ net-im/neochat/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 29dcad42fad387284ba806eec4219e9e9ba0011f X-VCS-Branch: master Date: Sun, 18 Dec 2022 10:04:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f0dea40c-9058-4023-940c-e885c46274bd X-Archives-Hash: c2ecdb14624d85b0b6fe325f74048105 commit: 29dcad42fad387284ba806eec4219e9e9ba0011f Author: Andreas Sturmlechner gentoo org> AuthorDate: Sun Dec 18 10:02:34 2022 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun Dec 18 10:04:04 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=29dcad42 net-im/neochat: Fix settings crash/UI KDE-bug: https://bugs.kde.org/show_bug.cgi?id=462853 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=462900 Signed-off-by: Andreas Sturmlechner gentoo.org> ...hat-22.11-fix-crash-notification-settings.patch | 61 ++++++++++++++++++++++ .../neochat-22.11-hide-dev-settings-loading.patch | 41 +++++++++++++++ net-im/neochat/neochat-22.11-r1.ebuild | 60 +++++++++++++++++++++ 3 files changed, 162 insertions(+) diff --git a/net-im/neochat/files/neochat-22.11-fix-crash-notification-settings.patch b/net-im/neochat/files/neochat-22.11-fix-crash-notification-settings.patch new file mode 100644 index 000000000000..48c65a368fd3 --- /dev/null +++ b/net-im/neochat/files/neochat-22.11-fix-crash-notification-settings.patch @@ -0,0 +1,61 @@ +From 6b3f44e9232bd1bf49752934a896a9aa3afe5a65 Mon Sep 17 00:00:00 2001 +From: James Graham +Date: Sun, 11 Dec 2022 11:53:21 +0000 +Subject: [PATCH] Fix crash when opening notification settings with no account + by making sure that the keyword model doesn't try to update the noficiation + settings when there is no active connection. Also make sure that ability to + add a keyword or change the global notiifcaiton state is disabled without an + active connection as these will cause the same crash. + +--- + src/keywordnotificationrulemodel.cpp | 4 +++- + src/qml/Settings/GlobalNotificationsPage.qml | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/keywordnotificationrulemodel.cpp b/src/keywordnotificationrulemodel.cpp +index a15f4aa0..e9ac6145 100644 +--- a/src/keywordnotificationrulemodel.cpp ++++ b/src/keywordnotificationrulemodel.cpp +@@ -15,7 +15,9 @@ + KeywordNotificationRuleModel::KeywordNotificationRuleModel(QObject *parent) + : QAbstractListModel(parent) + { +- controllerConnectionChanged(); ++ if (Controller::instance().activeConnection()) { ++ controllerConnectionChanged(); ++ } + connect(&Controller::instance(), &Controller::activeConnectionChanged, this, &KeywordNotificationRuleModel::controllerConnectionChanged); + } + +diff --git a/src/qml/Settings/GlobalNotificationsPage.qml b/src/qml/Settings/GlobalNotificationsPage.qml +index f81b1a65..ab6bdc3f 100644 +--- a/src/qml/Settings/GlobalNotificationsPage.qml ++++ b/src/qml/Settings/GlobalNotificationsPage.qml +@@ -23,7 +23,7 @@ Kirigami.ScrollablePage { + contentItem: MobileForm.FormCheckDelegate { + text: i18n("Enable notifications for this account") + checked: Config.showNotifications +- enabled: !Config.isShowNotificationsImmutable ++ enabled: !Config.isShowNotificationsImmutable && Controller.activeConnection + onToggled: { + Config.showNotifications = checked + Config.save() +@@ -225,6 +225,7 @@ Kirigami.ScrollablePage { + Layout.fillWidth: true + + placeholderText: i18n("Keyword…") ++ enabled: NotificationsManager.keywordNotificationAction !== PushNotificationAction.Unknown + + rightActions: Kirigami.Action { + icon.name: "edit-clear" +@@ -246,6 +247,7 @@ Kirigami.ScrollablePage { + Accessible.name: text + icon.name: "list-add" + display: QQC2.AbstractButton.IconOnly ++ enabled: NotificationsManager.keywordNotificationAction !== PushNotificationAction.Unknown + + onClicked: { + keywordNotificationRuleModel.addKeyword(keywordAddField.text, PushNotificationAction.On) +-- +GitLab + diff --git a/net-im/neochat/files/neochat-22.11-hide-dev-settings-loading.patch b/net-im/neochat/files/neochat-22.11-hide-dev-settings-loading.patch new file mode 100644 index 000000000000..c19e54683839 --- /dev/null +++ b/net-im/neochat/files/neochat-22.11-hide-dev-settings-loading.patch @@ -0,0 +1,41 @@ +From 25c7b7b780d2913c323b8c048e8999ea9f72997f Mon Sep 17 00:00:00 2001 +From: James Graham +Date: Sun, 11 Dec 2022 16:47:16 +0000 +Subject: [PATCH] Hide loading item and show info message when on the devices + page and not logged in. + +--- + src/qml/Settings/DevicesPage.qml | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/src/qml/Settings/DevicesPage.qml b/src/qml/Settings/DevicesPage.qml +index dd3f2eab..71a9d950 100644 +--- a/src/qml/Settings/DevicesPage.qml ++++ b/src/qml/Settings/DevicesPage.qml +@@ -27,7 +27,7 @@ Kirigami.ScrollablePage { + } + MobileForm.AbstractFormDelegate { + Layout.fillWidth: true +- visible: deviceRepeater.count === 0 // We can assume 0 means loading since there is at least one device ++ visible: Controller.activeConnection && deviceRepeater.count === 0 // We can assume 0 means loading since there is at least one device + contentItem: Kirigami.LoadingPlaceholder { } + } + Repeater { +@@ -160,6 +160,14 @@ Kirigami.ScrollablePage { + } + } + } ++ Kirigami.InlineMessage { ++ Layout.fillWidth: true ++ Layout.maximumWidth: Kirigami.Units.gridUnit * 30 ++ Layout.alignment: Qt.AlignHCenter ++ text: i18n("Please login to view the signed-in devices for your account.") ++ type: Kirigami.MessageType.Information ++ visible: !Controller.activeConnection ++ } + } + + Kirigami.OverlaySheet { +-- +GitLab + diff --git a/net-im/neochat/neochat-22.11-r1.ebuild b/net-im/neochat/neochat-22.11-r1.ebuild new file mode 100644 index 000000000000..b722512985b7 --- /dev/null +++ b/net-im/neochat/neochat-22.11-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_HANDBOOK=optional +ECM_TEST=true +KDE_ORG_CATEGORY=network +KFMIN=5.99.0 +QTMIN=5.15.5 +inherit ecm plasma-mobile.kde.org + +DESCRIPTION="Client for Matrix, the decentralized communication protocol" +HOMEPAGE="https://apps.kde.org/neochat/" + +if [[ ${KDE_BUILD_TYPE} = release ]]; then + KEYWORDS="~amd64 ~arm64 ~ppc64" +fi + +LICENSE="GPL-3+ handbook? ( CC-BY-SA-4.0 )" +SLOT="0" + +DEPEND=" + app-text/cmark:= + >=dev-libs/kirigami-addons-0.6:5 + dev-libs/qcoro5 + dev-libs/qtkeychain:=[qt5(+)] + >=dev-qt/qtdeclarative-${QTMIN}:5 + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtmultimedia-${QTMIN}:5 + >=dev-qt/qtnetwork-${QTMIN}:5 + >=dev-qt/qtquickcontrols2-${QTMIN}:5 + >=dev-qt/qtsvg-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + >=kde-frameworks/kconfig-${KFMIN}:5 + >=kde-frameworks/kconfigwidgets-${KFMIN}:5 + >=kde-frameworks/kcoreaddons-${KFMIN}:5 + >=kde-frameworks/kdbusaddons-${KFMIN}:5 + >=kde-frameworks/ki18n-${KFMIN}:5 + >=kde-frameworks/kio-${KFMIN}:5 + >=kde-frameworks/kirigami-${KFMIN}:5 + >=kde-frameworks/kitemmodels-${KFMIN}:5[qml] + >=kde-frameworks/knotifications-${KFMIN}:5[qml] + >=kde-frameworks/kwindowsystem-${KFMIN}:5 + >=kde-frameworks/qqc2-desktop-style-${KFMIN}:5 + >=kde-frameworks/sonnet-${KFMIN}:5[qml] + media-libs/kquickimageeditor:5 + >=net-libs/libquotient-0.6 +" +RDEPEND="${DEPEND} + >=dev-qt/qtgraphicaleffects-${QTMIN}:5 + >=dev-qt/qtmultimedia-${QTMIN}:5[qml] + >=kde-frameworks/purpose-${KFMIN}:5 +" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}/${P}-fix-crash-notification-settings.patch" # KDE-bug #462853 + "${FILESDIR}/${P}-hide-dev-settings-loading.patch" # KDE-bug #462900 +)