Remember the matrixId during login when moving back from password

Remember the matrixId during login when moving back from password

BUG: 489976
This commit is contained in:
James Graham
2025-05-05 13:48:23 +01:00
parent f6b3f3ac80
commit 41e96fca70
2 changed files with 2 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ LoginStep {
FormCard.FormTextFieldDelegate {
id: matrixIdField
label: i18n("Matrix ID:")
text: LoginHelper.matrixId
placeholderText: "@user:example.org"
Accessible.name: i18n("Matrix ID")
onTextChanged: {

View File

@@ -135,7 +135,7 @@ QString LoginHelper::matrixId() const
void LoginHelper::setMatrixId(const QString &matrixId)
{
m_matrixId = matrixId;
if (!m_matrixId.startsWith(QLatin1Char('@'))) {
if (!m_matrixId.isEmpty() && !m_matrixId.startsWith(QLatin1Char('@'))) {
m_matrixId.prepend(QLatin1Char('@'));
}
Q_EMIT matrixIdChanged();