D16475: [SMS App] Make requestMoreMessages asynchronous and caching
Simon Redman
noreply at phabricator.kde.org
Sun Oct 28 15:18:47 GMT 2018
sredman added a comment.
In D16475#349763 <https://phabricator.kde.org/D16475#349763>, @nicolasfella wrote:
> Looks ok to me
>
> > show all messages in the conversation when the conversation is first loaded
>
> What's your future plan wrt this?
I don't have a good plan yet... This is the main problem I was trying to fix by making the interface return an array
We could make requestConversation block on a condition variable which is unblocked by some call in addMessages, then only send conversationUpdated for new messages and the actually-requested messages. I just barely thought of this, but it sounds like it's worth trying.
Another thing to try is to add request window size to the Android interface like I have always been planning to do. I want to have this anyway so it would not be a waste of effort. Then, we request only and exactly the messages we want, and conversationUpdated only gets called with the messages we asked for.
The reason this plan is less good is because I was hoping to use the window size to pre-fill the cache in ConversationDbusInterface, thus reduce visible delays for the user
If none of that works, we could make ConvresationModel keep track of which messages it has requested and only display those. That is a bit of a hack...
REPOSITORY
R224 KDE Connect
REVISION DETAIL
https://phabricator.kde.org/D16475
To: sredman, #kde_connect
Cc: 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, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20181028/d11fa2f3/attachment.html>
More information about the KDEConnect
mailing list