From 680e62a11e8591f5681008869ecef7614b07d7ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E4=BE=AF=E7=BA=A2=E5=8B=8B?= <houhongxun@kylinos.cn>
Date: Mon, 22 Apr 2024 09:49:50 +0800
Subject: [PATCH] ukui-greeter: don't add redundant comma
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

when not need to

Signed-off-by: 侯红勋 <houhongxun@kylinos.cn>
---
 ukui-greeter/greeter/loginwindow.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ukui-greeter/greeter/loginwindow.cpp b/ukui-greeter/greeter/loginwindow.cpp
index 4ab27b7..c6b2dd5 100644
--- a/ukui-greeter/greeter/loginwindow.cpp
+++ b/ukui-greeter/greeter/loginwindow.cpp
@@ -757,7 +757,10 @@ void LoginWindow::onShowMessage(QString text, QLightDM::Greeter::MessageType typ
     unacknowledged_messages = true;
     if (!m_preStrMessage.isEmpty() && m_preStrMessageType != type && m_preStrMessageType != -1)
     {
-        text = m_preStrMessage + "," + text;
+	if (m_preStrMessage.endsWith("。") || m_preStrMessage.endsWith("."))
+            text = m_preStrMessage + text;
+	else
+            text = m_preStrMessage + "," + text;
     }
 
     qDebug()<<"unacknowledged_messages = true";
-- 
2.43.0

