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

Tiago Salem Herrmann tiago.herrmann at canonical.com
Thu Nov 26 12:46:00 UTC 2015


Review: Needs Fixing



Diff comments:

> 
> === modified file 'src/qml/Messages.qml'
> --- src/qml/Messages.qml	2015-11-25 21:04:13 +0000
> +++ src/qml/Messages.qml	2015-11-25 21:04:13 +0000
> @@ -1025,6 +1026,22 @@
>          }
>      }
>  
> +    Image {
> +        height: units.gu(20)
> +        width: units.gu(20)
> +        anchors.centerIn: messageList
> +        visible: source !== ""
> +        source: {
> +            // FIXME - get the info from the provided accounts
> +            var accountId = "ofono/ofono/account0"

Better find a better way to get this fallback accountId before we merge.

> +            if (presenceRequest.type != PresenceRequest.PresenceTypeUnknown
> +                    && presenceRequest.type != PresenceRequest.PresenceTypeUnset) {
> +                accountId = presenceRequest.accountId
> +            }
> +            return telepathyHelper.accountForId(accountId).protocolInfo.backgroundFile
> +        }
> +    }
> +
>      KeyboardRectangle {
>          id: keyboard
>      }
> 
> === modified file 'src/qml/ThreadDelegate.qml'
> --- src/qml/ThreadDelegate.qml	2015-10-23 20:41:36 +0000
> +++ src/qml/ThreadDelegate.qml	2015-11-25 21:04:13 +0000
> @@ -310,6 +334,35 @@
>              }
>          }
>  
> +        // FIXME: there is another instance of PresenceRequest in Messages.qml,
> +        // we have to reuse the same instance when possible
> +        PresenceRequest {

I believe we have to add this to a Component and load it dynamically in case presenceRequest is not passed to the Messages.qml.

> +            id: presenceRequest
> +            accountId: {
> +                // if this is a regular sms chat, try requesting the presence on
> +                // a multimedia account
> +                if (!telepathyHelper.ready) {
> +                    return ""
> +                }
> +                var account = telepathyHelper.accountForId(model.accountId)
> +                if (!account) {
> +                    return ""
> +                }
> +                if (account.type == AccountEntry.PhoneAccount) {
> +                    for (var i in telepathyHelper.accounts) {
> +                        var tmpAccount = telepathyHelper.accounts[i]
> +                        if (tmpAccount.type == AccountEntry.MultimediaAccount) {
> +                            return tmpAccount.accountId
> +                        }
> +                    }
> +                    return ""
> +                }
> +                return account.accountId
> +            }
> +            // we just request presence on 1-1 chats
> +            identifier: !groupChat ? participant.identifier : ""
> +        }
> +
>          function updateSubTypeLabel() {
>              var subLabel = "";
>              if (participant && participant.phoneNumber) {


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



More information about the Ubuntu-reviews mailing list