How to integrate JSQMessageViewController with couchbase backed chat application? Since JSQMessageViewController uses its own data source so we can use Couchbase lite with it?
On Friday, June 23, 2017 at 1:46:52 AM UTC+5:30, Jens Alfke wrote: > > > On Jun 22, 2017, at 10:19 AM, Parvez Qureshi <parvez....@decurtis.com > <javascript:>> wrote: > > In the KCBLDatabaseChanfed notification's userinfo property we receive a > field with key "external". What it means? > > > It means that one or more of the changes (in the “changes” property) come > from a pull replication, as opposed to being locally-made changes. > > How we can know from " rows" property of CBLLIVEQUERY that what is changed > in the database? > > > There’s no built-in support for this; CBLLiveQuery just re-runs the query > after a database change and notifies you when the results are different > from the previous results. Internally it’s just calling [newResults > isEqual: oldResults], so there’s no detail about what the differences are. > > Most of the time you can do without the details. Just redraw the whole > table view and it works OK. > > There is a somewhat experimental internal class called CBLArrayDiff that > you can find in the source tree. It takes two arrays and tells you how they > differ in terms of a series of insertions/deletions/substitutions. This is > very useful if you want to animate a table view, for instance. The > implementation of this is kind of complex, based on the Wagner-Fischer > algorithm <https://en.wikipedia.org/wiki/Wagner%E2%80%93Fischer_algorithm> > that’s > commonly used in ‘diff’ tools. It can become slow with large data sets but > it generally behaves pretty well. > > —Jens > -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to mobile-couchbase+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/e5820c6c-9159-4fc0-9761-d0893fe5bad1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.