Skip to content

Commit 8ec159d

Browse files
committed
Store last joined channel in .tt file
Same as "rememberLastChannel" in Android client.
1 parent 76f5038 commit 8ec159d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Client/qtTeamTalk/utilxml.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ void processJoinXML(const QDomElement& hostElement, HostEntry& entry)
6868
tmp = join.firstChildElement("password");
6969
if (!tmp.isNull())
7070
entry.chanpasswd = tmp.text();
71+
tmp = join.firstChildElement("join-last-channel");
72+
if (!tmp.isNull())
73+
entry.lastChan = tmp.text() == "true";
7174
}
7275
}
7376

@@ -279,13 +282,16 @@ QByteArray generateTTFile(const HostEntry& entry)
279282

280283
QDomElement channel = doc.createElement("channel");
281284
channel.appendChild(doc.createTextNode(entry.channel));
285+
join.appendChild(channel);
282286

283287
QDomElement password = doc.createElement("password");
284288
password.appendChild(doc.createTextNode(entry.chanpasswd));
285-
286-
join.appendChild(channel);
287289
join.appendChild(password);
288290

291+
QDomElement joinlast = doc.createElement("join-last-channel");
292+
joinlast.appendChild(doc.createTextNode(entry.lastChan ? "true" : "false"));
293+
join.appendChild(joinlast);
294+
289295
host.appendChild(join);
290296
}
291297

0 commit comments

Comments
 (0)