Merge lp:~tiagosh/telephony-service/rtm-1389708 into lp:telephony-service/rtm-14.09

Proposed by Tiago Salem Herrmann
Status: Merged
Approved by: Bill Filler
Approved revision: 917
Merged at revision: 917
Proposed branch: lp:~tiagosh/telephony-service/rtm-1389708
Merge into: lp:telephony-service/rtm-14.09
Diff against target: 35 lines (+5/-5)
1 file modified
indicator/textchannelobserver.cpp (+5/-5)
To merge this branch: bzr merge lp:~tiagosh/telephony-service/rtm-1389708
Reviewer Review Type Date Requested Status
Bill Filler (community) Approve
Review via email: mp+245667@code.launchpad.net

Commit message

Use only active accounts to send messages.

Description of the change

Use only active accounts to send messages.

To post a comment you must log in.
Revision history for this message
Bill Filler (bfiller) wrote :

approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'indicator/textchannelobserver.cpp'
2--- indicator/textchannelobserver.cpp 2014-10-24 18:53:31 +0000
3+++ indicator/textchannelobserver.cpp 2015-01-06 16:31:21 +0000
4@@ -168,10 +168,10 @@
5 AccountEntry *account = TelepathyHelper::instance()->accountForId(accountId);
6 if (!account || accountId.isEmpty()) {
7 // fallback to the default account
8- if (TelepathyHelper::instance()->defaultMessagingAccount() && TelepathyHelper::instance()->accounts().size() > 1) {
9+ if (TelepathyHelper::instance()->defaultMessagingAccount() && TelepathyHelper::instance()->activeAccounts().size() > 1) {
10 account = TelepathyHelper::instance()->defaultMessagingAccount();
11- } else if (TelepathyHelper::instance()->accounts().size() > 0) {
12- account = TelepathyHelper::instance()->accounts()[0];
13+ } else if (TelepathyHelper::instance()->activeAccounts().size() > 0) {
14+ account = TelepathyHelper::instance()->activeAccounts()[0];
15 }
16 }
17
18@@ -513,7 +513,7 @@
19 void TextChannelObserver::onReplyReceived(const QString &phoneNumber, const QString &reply)
20 {
21 // FIXME - we need to find a better way to deal with dual sim in the messaging-menu
22- if (!TelepathyHelper::instance()->defaultMessagingAccount() && TelepathyHelper::instance()->accounts().size() > 1) {
23+ if (!TelepathyHelper::instance()->defaultMessagingAccount() && TelepathyHelper::instance()->activeAccounts().size() > 1) {
24 NotifyNotification *notification = notify_notification_new(C::gettext("Please, select a SIM card:"),
25 reply.toStdString().c_str(),
26 "");
27@@ -523,7 +523,7 @@
28 data->observer = this;
29 mNotifications.insert(notification, data);
30
31- Q_FOREACH(AccountEntry *account, TelepathyHelper::instance()->accounts()) {
32+ Q_FOREACH(AccountEntry *account, TelepathyHelper::instance()->activeAccounts()) {
33 notify_notification_add_action (notification,
34 account->accountId().toStdString().c_str(),
35 account->displayName().toStdString().c_str(),

Subscribers

People subscribed via source and target branches