D15979: [SMS App] Allow scrolling up to load and display older messages

Aleix Pol Gonzalez noreply at phabricator.kde.org
Sun Oct 28 23:34:47 GMT 2018


apol requested changes to this revision.
apol added a comment.
This revision now requires changes to proceed.


  Looking good!

INLINE COMMENTS

> conversationsdbusinterface.cpp:69
>  {
> -    const auto messagesList = m_conversations[conversationID].values();
> +    auto messagesList = m_conversations[conversationID].values();
>  

Use `m_conversations.value(conversationID)`. Otherwise, if conversationId doesn't exist, it will create the entry and leave it empty.

> conversationsdbusinterface.cpp:76
>  
> -    // TODO: Check local cache before requesting new messages
> -    // TODO: Make Android interface capable of requesting small window of messages
> -    m_smsInterface.requestConversation(conversationID);
> +    if (!(messagesList.length() > end)) {
> +        // If we don't have enough messages in cache, go get some more

`messagesList.length() <= end`

> smsplugin.cpp:80
>  {
> +    qint32 threadID = conversationID.toInt();
>      NetworkPacket np(PACKET_TYPE_SMS_REQUEST_CONVERSATION);

Why this change?

> smsplugin.cpp:86
> +
> +    return;
>  }

Definitely not.

> smsplugin.h:113
> +     *
> +     * TODO: Make interface capable of requesting limited window of messages
>       */

Would it be very hard to just do it now?

REPOSITORY
  R224 KDE Connect

REVISION DETAIL
  https://phabricator.kde.org/D15979

To: sredman, #kde_connect, apol
Cc: apol, nicolasfella, kdeconnect, skymoore, wistak, dvalencia, rmenezes, julioc, Leptopoda, timothyc, jdvr, yannux, Danial0_0, johnq, Pitel, adeen-s, SemperPeritus, daniel.z.tg, jeanv, seebauer, bugzy, MayeulC, menasshock, tctara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20181028/9e107134/attachment.html>


More information about the KDEConnect mailing list