diff --git a/src/app/store/contacts-data.service.ts b/src/app/store/contacts-data.service.ts index f3fc034..be8487b 100644 --- a/src/app/store/contacts-data.service.ts +++ b/src/app/store/contacts-data.service.ts @@ -42,13 +42,14 @@ export class ContactsDataService { raw_contacts : string mmode: number, csize:number, - pcount: number + pcount: number, + part_lenght:number }; pPesult:any; async cacheContactsForAccount(contactResult){ const loading = await this.loadingCtrl.create({ - message: 'Refresing...', + message: 'Refreshing...', duration: 7000, }); const myString = JSON.stringify(contactResult.contacts); @@ -56,15 +57,25 @@ export class ContactsDataService { // alert(myString); await loading.present(); const chunkSize = 3000; - for(let ic=0; ic< myString.length; ic=ic+chunkSize){ + var chunkArray =[]; + var count_l=0; + for(let ic=0; ic<= myString.length; ic=ic+chunkSize){ + chunkArray[count_l]= myString.substring(ic,ic+chunkSize); + count_l=count_l+1; + } + + + for(let ic=0; ic