[network/ruqola] src/core: add pendingAttachmentInfos in asPendingMessageTyped()

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 95f881030d0b950adc259dc18016d1f2d736a896 by Laurent Montel.
Committed on 27/07/2026 at 21:18.
Pushed by mlaurent into branch 'master'.

add pendingAttachmentInfos in asPendingMessageTyped()

M  +1    -1    src/core/accountroomsettings.cpp
M  +1    -1    src/core/autotests/accountroomsettingstest.cpp

https://invent.kde.org/network/ruqola/-/commit/95f881030d0b950adc259dc18016d1f2d736a896

diff --git a/src/core/accountroomsettings.cpp b/src/core/accountroomsettings.cpp
index 37cc3e0bf1..8953b3ae99 100644
--- a/src/core/accountroomsettings.cpp
+++ b/src/core/accountroomsettings.cpp
@@ -61,7 +61,7 @@ void AccountRoomSettings::setPendingTypedTexts(const QMap<QByteArray, PendingTyp
 
 bool AccountRoomSettings::PendingTypedInfo::hasPendingMessageTyped() const
 {
-    return !text.isEmpty();
+    return !text.isEmpty() || !pendingAttachmentInfos.isEmpty();
 }
 
 bool AccountRoomSettings::PendingTypedInfo::operator==(const AccountRoomSettings::PendingTypedInfo &other) const
diff --git a/src/core/autotests/accountroomsettingstest.cpp b/src/core/autotests/accountroomsettingstest.cpp
index 5bc200ed76..12efa5397a 100644
--- a/src/core/autotests/accountroomsettingstest.cpp
+++ b/src/core/autotests/accountroomsettingstest.cpp
@@ -72,7 +72,7 @@ void AccountRoomSettingsTest::shouldChangePendingTypedInfo()
         });
         info.pendingAttachmentInfos = lst;
         QVERIFY(info.isValid());
-        QVERIFY(!info.hasPendingMessageTyped());
+        QVERIFY(info.hasPendingMessageTyped());
     }
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.