Skip to content

Commit 6d429fd

Browse files
committedJan 20, 2020
Set jid/nick/passw for mucjoindlg after it was fully initialized
This avoids accidental data change on account/favorites updates
1 parent 500a9f5 commit 6d429fd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed
 

‎src/conferencebookmark.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ConferenceBookmark::ConferenceBookmark(const QString &name, const XMPP::Jid &jid
3434
{
3535
}
3636

37-
ConferenceBookmark::ConferenceBookmark(const QDomElement &el) : auto_join_(Never) { fromXml(el); }
37+
ConferenceBookmark::ConferenceBookmark(const QDomElement &el) { fromXml(el); }
3838

3939
QStringList ConferenceBookmark::joinTypeNames()
4040
{

‎src/psiaccount.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -3547,12 +3547,11 @@ void PsiAccount::actionJoin(const ConferenceBookmark &bookmark, bool connectImme
35473547
#ifdef GROUPCHAT
35483548
MUCJoinDlg *w = new MUCJoinDlg(psi(), this);
35493549

3550+
if (reason != MucAutoJoin || !PsiOptions::instance()->getOption("options.ui.muc.hide-on-autojoin").toBool())
3551+
w->show();
35503552
w->setJid(bookmark.jid());
35513553
w->setNick(bookmark.nick().isEmpty() ? JIDUtil::nickOrJid(this->nick(), d->jid.node()) : bookmark.nick());
35523554
w->setPassword(bookmark.password());
3553-
3554-
if (reason != MucAutoJoin || !PsiOptions::instance()->getOption("options.ui.muc.hide-on-autojoin").toBool())
3555-
w->show();
35563555
if (connectImmediately) {
35573556
w->doJoin(reason);
35583557
}

0 commit comments

Comments
 (0)
Please sign in to comment.