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
=== modified file 'indicator/textchannelobserver.cpp'
--- indicator/textchannelobserver.cpp 2014-10-24 18:53:31 +0000
+++ indicator/textchannelobserver.cpp 2015-01-06 16:31:21 +0000
@@ -168,10 +168,10 @@
168 AccountEntry *account = TelepathyHelper::instance()->accountForId(accountId);168 AccountEntry *account = TelepathyHelper::instance()->accountForId(accountId);
169 if (!account || accountId.isEmpty()) {169 if (!account || accountId.isEmpty()) {
170 // fallback to the default account170 // fallback to the default account
171 if (TelepathyHelper::instance()->defaultMessagingAccount() && TelepathyHelper::instance()->accounts().size() > 1) {171 if (TelepathyHelper::instance()->defaultMessagingAccount() && TelepathyHelper::instance()->activeAccounts().size() > 1) {
172 account = TelepathyHelper::instance()->defaultMessagingAccount();172 account = TelepathyHelper::instance()->defaultMessagingAccount();
173 } else if (TelepathyHelper::instance()->accounts().size() > 0) {173 } else if (TelepathyHelper::instance()->activeAccounts().size() > 0) {
174 account = TelepathyHelper::instance()->accounts()[0];174 account = TelepathyHelper::instance()->activeAccounts()[0];
175 }175 }
176 }176 }
177177
@@ -513,7 +513,7 @@
513void TextChannelObserver::onReplyReceived(const QString &phoneNumber, const QString &reply)513void TextChannelObserver::onReplyReceived(const QString &phoneNumber, const QString &reply)
514{514{
515 // FIXME - we need to find a better way to deal with dual sim in the messaging-menu515 // FIXME - we need to find a better way to deal with dual sim in the messaging-menu
516 if (!TelepathyHelper::instance()->defaultMessagingAccount() && TelepathyHelper::instance()->accounts().size() > 1) {516 if (!TelepathyHelper::instance()->defaultMessagingAccount() && TelepathyHelper::instance()->activeAccounts().size() > 1) {
517 NotifyNotification *notification = notify_notification_new(C::gettext("Please, select a SIM card:"),517 NotifyNotification *notification = notify_notification_new(C::gettext("Please, select a SIM card:"),
518 reply.toStdString().c_str(),518 reply.toStdString().c_str(),
519 "");519 "");
@@ -523,7 +523,7 @@
523 data->observer = this;523 data->observer = this;
524 mNotifications.insert(notification, data);524 mNotifications.insert(notification, data);
525525
526 Q_FOREACH(AccountEntry *account, TelepathyHelper::instance()->accounts()) {526 Q_FOREACH(AccountEntry *account, TelepathyHelper::instance()->activeAccounts()) {
527 notify_notification_add_action (notification,527 notify_notification_add_action (notification,
528 account->accountId().toStdString().c_str(),528 account->accountId().toStdString().c_str(),
529 account->displayName().toStdString().c_str(),529 account->displayName().toStdString().c_str(),

Subscribers

People subscribed via source and target branches