Skip to content
This repository has been archived by the owner on Aug 1, 2019. It is now read-only.

[readme] better description of Async Head Prefetching #97

Open
dodikk opened this issue Feb 27, 2017 · 1 comment
Open

[readme] better description of Async Head Prefetching #97

dodikk opened this issue Feb 27, 2017 · 1 comment

Comments

@dodikk
Copy link

dodikk commented Feb 27, 2017

I've enabled doesBatchFetch flag but my func batchFetchContent() never gets called.
The readme lacks the details on "when the method is invoked" and some example of implementing it properly.


As a rule, a chat application involves the following actions :

  1. I have to request the history and subscribe to incoming chat messages in ViewDidLoad.
  2. As new messages arrive I should invoke "sendText()" or other "send__" functions on NMessengerViewController simultaneously (in order to not miss any messages).

I have not figured out yet how to insert the bubbles for past messages to the top. Is "clearALLMessages()" and invoke "send___()" in a loop the only way for doing that? Is it a correct approach? Does NMessenger take care of the unintended "blinking" animation in such case?

My use case might even require inserting messages in the middle of the conversation. Several thousand users per room (text conference) are expected.

So the idea is

Showing "latest N" messages as a new batch arrives and ignore the rest of the batch until the user scrolls up to see those. 

Not sure how to implement that with NMessenger although it seems promising as it's built on top of AsyncDisplayKit.

@dodikk
Copy link
Author

dodikk commented Feb 27, 2017

related to #95

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant