[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:19:32 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=6e159dc
The following commit has been merged in the master branch:
commit 6e159dc6ac4f332fb4c4da3fd0a7584cf9d10282
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Sat Jul 2 13:20:00 2011 +0100
Sanitised code to find the other contact in a 1-1 chat.
REVIEW: 101823
---
lib/chat-widget.cpp | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/lib/chat-widget.cpp b/lib/chat-widget.cpp
index fb5586c..534ee1c 100644
--- a/lib/chat-widget.cpp
+++ b/lib/chat-widget.cpp
@@ -160,7 +160,6 @@ ChatWidget::ChatWidget(const Tp::TextChannelPtr & channel, const Tp::AccountPtr
d->ui.contactsView->setModel(d->contactModel);
AdiumThemeHeaderInfo info;
- Tp::Contacts allContacts = d->channel->groupContacts();
//normal chat - self and one other person.
if (d->isGroupChat) {
@@ -168,17 +167,14 @@ ChatWidget::ChatWidget(const Tp::TextChannelPtr & channel, const Tp::AccountPtr
}
else
{
- //find the other contact which isn't self.
- foreach(const Tp::ContactPtr & it, allContacts) {
- if (it == d->channel->groupSelfContact()) {
- continue;
- } else {
- info.setDestinationDisplayName(it->alias());
- info.setDestinationName(it->id());
- info.setChatName(it->alias());
- info.setIncomingIconPath(it->avatarData().fileName);
- }
- }
+ Tp::ContactPtr otherContact = d->channel->targetContact();
+
+ Q_ASSERT(otherContact);
+
+ info.setDestinationDisplayName(otherContact->alias());
+ info.setDestinationName(otherContact->id());
+ info.setChatName(otherContact->alias());
+ info.setIncomingIconPath(otherContact->avatarData().fileName);
d->ui.contactsView->hide();
}
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list