[Merge] lp:~boiko/messaging-app/acknowledge_removed_messages into lp:messaging-app

Tiago Salem Herrmann tiago.herrmann at canonical.com
Mon Sep 14 16:50:29 UTC 2015


Review: Needs Fixing



Diff comments:

> === modified file 'src/qml/ThreadDelegate.qml'
> --- src/qml/ThreadDelegate.qml	2015-04-08 22:00:19 +0000
> +++ src/qml/ThreadDelegate.qml	2015-09-03 21:27:40 +0000
> @@ -95,6 +95,19 @@
>          iconName: "delete"
>          text: i18n.tr("Delete")
>          onTriggered: {
> +            // extract the participant IDs from one of the threads
> +            var thread = model.threads[0];
> +            var participants = [];
> +
> +            for (var i in thread.participants) {
> +                participants.push(thread.participants[i].identifier);

I think you have to remove the .identifier, otherwise we get this on dbus:

method call sender=:1.114 -> dest=com.canonical.TelephonyServiceHandler serial=3
25 path=/com/canonical/TelephonyServiceHandler; interface=com.canonical.Telephon
yServiceHandler; member=AcknowledgeAllMessages
   array [
      string "undefined"
   ]
   string "ofono/ofono/account0"

> +            }
> +            // and acknowledge all messages for the threads to be removed
> +            for (var i in model.threads) {
> +                chatManager.acknowledgeAllMessages(participants, model.threads[i].accountId)
> +            }
> +
> +            // at last remove the threads
>              threadModel.removeThreads(model.threads);
>          }
>      }


-- 
https://code.launchpad.net/~boiko/messaging-app/acknowledge_removed_messages/+merge/270120
Your team Ubuntu Phablet Team is subscribed to branch lp:messaging-app.



More information about the Ubuntu-reviews mailing list