From 20a7f59842e18eb182abd5e0f06f81b039823bc3 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sat, 30 Nov 2024 02:36:15 -0500 Subject: [PATCH] contactdata --- src/app/store/contacts-data.service.ts | 31 +++++++++++++++++--------- 1 file changed, 21 insertions(+), 10 deletions(-) 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