[gentoo-commits] repo/gentoo:master commit in: net-im/neochat/, net-im/neochat/files/

2023-07-31 Thread Andreas Sturmlechner
commit: a8c443eafd66555f64443342cf7015222a3cae09
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Mon Jul 31 11:28:06 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Mon Jul 31 11:29:15 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8c443ea

net-im/neochat: Fix build with >=net-libs/libquotient-0.8

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 .../files/neochat-23.04.3-libquotient-0.8-1.patch  | 91 ++
 .../files/neochat-23.04.3-libquotient-0.8-2.patch  | 55 +
 net-im/neochat/neochat-23.04.3.ebuild  |  2 +
 3 files changed, 148 insertions(+)

diff --git a/net-im/neochat/files/neochat-23.04.3-libquotient-0.8-1.patch 
b/net-im/neochat/files/neochat-23.04.3-libquotient-0.8-1.patch
new file mode 100644
index ..9e4aaa3b19df
--- /dev/null
+++ b/net-im/neochat/files/neochat-23.04.3-libquotient-0.8-1.patch
@@ -0,0 +1,91 @@
+From a94f46f90462dce1f817e9f28d24dad454e0dfb4 Mon Sep 17 00:00:00 2001
+From: Tobias Fella 
+Date: Fri, 26 May 2023 17:47:26 +0200
+Subject: [PATCH] Fix build against libQuotient 0.8
+
+---
+ src/controller.cpp | 24 
+ src/login.cpp  |  4 
+ 2 files changed, 24 insertions(+), 4 deletions(-)
+
+diff --git a/src/controller.cpp b/src/controller.cpp
+index dd38ede9b..3835e312b 100644
+--- a/src/controller.cpp
 b/src/controller.cpp
+@@ -109,18 +109,22 @@ Controller::Controller(QObject *parent)
+ }
+ #endif
+ 
++#ifdef QUOTIENT_07
++connect(&Accounts, &AccountRegistry::accountCountChanged, this, 
&Controller::activeConnectionIndexChanged);
++#else
+ connect(&AccountRegistry::instance(), 
&AccountRegistry::accountCountChanged, this, 
&Controller::activeConnectionIndexChanged);
++#endif
+ 
+ #ifdef QUOTIENT_07
+ static int oldAccountCount = 0;
+-connect(&AccountRegistry::instance(), 
&AccountRegistry::accountCountChanged, this, [=]() {
+-if (AccountRegistry::instance().size() > oldAccountCount) {
+-auto connection = 
AccountRegistry::instance().accounts()[AccountRegistry::instance().size() - 1];
++connect(&Accounts, &AccountRegistry::accountCountChanged, this, [=]() {
++if (Accounts.size() > oldAccountCount) {
++auto connection = Accounts.accounts()[Accounts.size() - 1];
+ connect(connection, &Connection::syncDone, this, [=]() {
+ handleNotifications(connection);
+ });
+ }
+-oldAccountCount = AccountRegistry::instance().size();
++oldAccountCount = Accounts.size();
+ });
+ #endif
+ }
+@@ -228,10 +232,18 @@ void Controller::logout(Connection *conn, bool 
serverSideLogout)
+ job.start();
+ loop.exec();
+ 
++#ifdef QUOTIENT_07
++if (Accounts.count() > 1) {
++#else
+ if (AccountRegistry::instance().count() > 1) {
++#endif
+ // Only set the connection if the the account being logged out is 
currently active
+ if (conn == activeConnection()) {
++#ifdef QUOTIENT_07
++setActiveConnection(Accounts.accounts()[0]);
++#else
+ setActiveConnection(AccountRegistry::instance().accounts()[0]);
++#endif
+ }
+ } else {
+ setActiveConnection(nullptr);
+@@ -495,7 +507,11 @@ NeochatChangePasswordJob::NeochatChangePasswordJob(const 
QString &newPassword, b
+ 
+ int Controller::accountCount() const
+ {
++#ifdef QUOTIENT_07
++return Accounts.count();
++#else
+ return AccountRegistry::instance().count();
++#endif
+ }
+ 
+ void Controller::setQuitOnLastWindowClosed()
+diff --git a/src/login.cpp b/src/login.cpp
+index 1121875f9..8b937abaa 100644
+--- a/src/login.cpp
 b/src/login.cpp
+@@ -43,7 +43,11 @@ void Login::init()
+ return;
+ }
+ 
++#ifdef QUOTIENT_07
++m_isLoggedIn = Accounts.isLoggedIn(m_matrixId);
++#else
+ m_isLoggedIn = AccountRegistry::instance().isLoggedIn(m_matrixId);
++#endif
+ Q_EMIT isLoggedInChanged();
+ if (m_isLoggedIn) {
+ return;
+-- 
+GitLab
+

diff --git a/net-im/neochat/files/neochat-23.04.3-libquotient-0.8-2.patch 
b/net-im/neochat/files/neochat-23.04.3-libquotient-0.8-2.patch
new file mode 100644
index ..2bd85146b28f
--- /dev/null
+++ b/net-im/neochat/files/neochat-23.04.3-libquotient-0.8-2.patch
@@ -0,0 +1,55 @@
+From 8f4e5a41c58986b68406251051c26beb059dd9ce Mon Sep 17 00:00:00 2001
+From: Tobias Fella 
+Date: Sun, 28 May 2023 11:22:40 +0200
+Subject: [PATCH] Drop reset*Count invocations
+
+Still coming from Spectral, where they were taken from Quaternion, where they 
were dropped because they don't work as expected.
+Also, soon to be removed from libQuotient itself.
+---
+ src/neochatroom.cpp | 10 --
+ src/neochatroom.h   |  1 -
+ 2 files changed, 11 deletions(-)
+
+diff --git a/src/neochatroom.cpp b/src/neochatroom.cpp
+index a98b6cdbe..101c0fc50 100644
+--- a/src/neochatroom.cpp
 b/src/neochatroom.cpp
+@@ -66,8 +66,6 @@ NeoChatRoom::NeoC

[gentoo-commits] repo/gentoo:master commit in: net-im/neochat/, net-im/neochat/files/

2023-04-30 Thread Andreas Sturmlechner
commit: 0fd003f29fd587864c21be2d39f5adb99418e5f4
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sun Apr 30 13:39:47 2023 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sun Apr 30 13:47:44 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fd003f2

net-im/neochat: drop 22.11-r2

Signed-off-by: Andreas Sturmlechner  gentoo.org>

 net-im/neochat/Manifest|  1 -
 ...hat-22.11-fix-crash-notification-settings.patch | 61 --
 .../neochat-22.11-hide-dev-settings-loading.patch  | 41 ---
 net-im/neochat/neochat-22.11-r2.ebuild | 60 -
 4 files changed, 163 deletions(-)

diff --git a/net-im/neochat/Manifest b/net-im/neochat/Manifest
index 145d910d1707..11fde7426bb8 100644
--- a/net-im/neochat/Manifest
+++ b/net-im/neochat/Manifest
@@ -1,2 +1 @@
-DIST neochat-22.11.tar.xz 465660 BLAKE2B 
bbd391a97cf4ea886042f3983798b766b4bd4fcf75513e4adf808227cc03ae6b533426b0f3ab000dc22593ce0be1ea7d284fac654db5bf66844633001300babd
 SHA512 
7e10d2512dd60b76340a84b2daab1e020d75c0ec9d79c87d5f96ce2c394bf93e557b9c96606abe643a787db1136861c25826f9dc7680d3a43d218654ef864519
 DIST neochat-23.04.0.tar.xz 565520 BLAKE2B 
3ad908f916c5db5326486e2267b26a99dee58348be7f247a27590e8d20cbe3ef3c93c9506416c182215ba0e13ea29d50afe1a445f3fc31def5ad136c250eeae0
 SHA512 
a4098ef9cdf1a59ab8ee6abfeaf3d5533cdf668a43c081d3cd228249530bcdd77a386c2215106c5e3a8efbbd68b7ec3e8b04f34219d6511a9d654ef0c1bb0be4

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
deleted file mode 100644
index 48c65a368fd3..
--- a/net-im/neochat/files/neochat-22.11-fix-crash-notification-settings.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 6b3f44e9232bd1bf49752934a896a9aa3afe5a65 Mon Sep 17 00:00:00 2001
-From: James Graham 
-Date: Sun, 11 Dec 2022 11:53:21 +
-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-loadin

[gentoo-commits] repo/gentoo:master commit in: net-im/neochat/, net-im/neochat/files/

2022-12-18 Thread Andreas Sturmlechner
commit: 29dcad42fad387284ba806eec4219e9e9ba0011f
Author: Andreas Sturmlechner  gentoo  org>
AuthorDate: Sun Dec 18 10:02:34 2022 +
Commit: Andreas Sturmlechner  gentoo  org>
CommitDate: Sun Dec 18 10:04:04 2022 +
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 ..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 +
+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 ..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 +
+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.ScrollablePa