Thanks for quick response: I can move forward now but few query for now. See in-line
On Tue, Apr 15, 2014 at 5:57 AM, Jens Alfke <[email protected]> wrote: > > On Apr 14, 2014, at 11:04 AM, Ami Kapadia <[email protected]> wrote: > > So, If I write logic of refreshing list in window.dbChanged(), it will > refresh list thousand times. > > > It’s better to put in a delay so you don’t refresh the list more often > than once or twice a second. > Yes, It's good. Here is the logic which I am writing. My applications have 3 main list and many sub list. config.db.changes({since : config.info.update_seq}, function(err, change){ if(change == undefined || change == null) { lastSeq = 0; } else { lastSeq = change.seq $("#lblSyncStatus").text("Records sync : " + lastSeq); //I can fetch document id, rev and seq here //So I am fetching each doc from CBL and checking it's type, and there is some delay logic and updating associated liist which worked, I will move this logic to window.dbChanged later on } window.dbChanged(); }) > > Can you tell me is there any flag which tells that synchronization is now > done. So, I can refresh list there. > > > Are you sure you want to wait that long? If syncing takes a while, your > list would be out of date with the database. > Yes, on login time (first time when user installed application), I am first downloading all documents and then I want to create native views and calling it from JS, After finishing it I navigate to main screen of App which have list. All codes are already ready and working well after first pull. So I just want to know when first pull finished. > > —Jens > Thanks, Ami > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/mobile-couchbase/96B0E4F3-99DD-440B-883C-704CA86ECE7E%40couchbase.com<https://groups.google.com/d/msgid/mobile-couchbase/96B0E4F3-99DD-440B-883C-704CA86ECE7E%40couchbase.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/CALA2sAbSTcOoxCnK9WM2pYgPNmD6EOeN2wRc1aB0brjJV%2BtPKg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
