From 67b3de15dce8cae7311f999c6c3d7eca82eabd3c Mon Sep 17 00:00:00 2001
From: sultanmyrza <sultanmyrza@gmail.com>
Date: Wed, 18 May 2022 16:38:54 +0800
Subject: [PATCH 1/5] open sertificate with temporary token

---
 src/app/features/home/details/details.page.ts | 22 +++++++++++++----
 .../dia-backend-asset-repository.service.ts   | 24 +++++++++++++++++++
 src/app/utils/url.ts                          |  7 ++++++
 3 files changed, 48 insertions(+), 5 deletions(-)

diff --git a/src/app/features/home/details/details.page.ts b/src/app/features/home/details/details.page.ts
index fd472a92c..024888e29 100644
--- a/src/app/features/home/details/details.page.ts
+++ b/src/app/features/home/details/details.page.ts
@@ -38,7 +38,7 @@ import {
   switchTap,
   VOID$,
 } from '../../../utils/rx-operators/rx-operators';
-import { getAssetProfileUrl } from '../../../utils/url';
+import { getAssetProfileUrlWithTmpToken } from '../../../utils/url';
 import {
   DetailedCapture,
   InformationSessionService,
@@ -177,6 +177,15 @@ export class DetailsPage {
     )
   );
 
+  readonly activeDetailedCaptureTmpShareToken$ =
+    this._activeDetailedCapture$.pipe(
+      distinctUntilChanged(),
+      concatMap(({ id }) => {
+        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+        return this.diaBackendAssetRepository.createTemporaryShareToken$(id!);
+      })
+    );
+
   readonly isFromSeriesPage$ = this.type$.pipe(map(type => type === 'series'));
 
   constructor(
@@ -467,15 +476,18 @@ export class DetailsPage {
   openCertificate() {
     combineLatest([
       this.activeDetailedCapture$,
-      this.diaBackendAuthService.token$,
+      this.activeDetailedCaptureTmpShareToken$,
     ])
       .pipe(
         first(),
-        concatMap(([detailedCapture, token]) =>
+        concatMap(([detailedCapture, tmpShareToken]) =>
           defer(() =>
             Browser.open({
-              // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
-              url: getAssetProfileUrl(detailedCapture.id!, token),
+              url: getAssetProfileUrlWithTmpToken(
+                // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+                detailedCapture.id!,
+                tmpShareToken
+              ),
               toolbarColor: '#564dfc',
             })
           )
diff --git a/src/app/shared/dia-backend/asset/dia-backend-asset-repository.service.ts b/src/app/shared/dia-backend/asset/dia-backend-asset-repository.service.ts
index 4d30334cb..e418ee614 100644
--- a/src/app/shared/dia-backend/asset/dia-backend-asset-repository.service.ts
+++ b/src/app/shared/dia-backend/asset/dia-backend-asset-repository.service.ts
@@ -259,6 +259,22 @@ export class DiaBackendAssetRepository {
     );
   }
 
+  createTemporaryShareToken$(id: string) {
+    const formData = new FormData();
+    const secondsInDay = 86400;
+    formData.append('expiration_seconds', `${secondsInDay}`);
+    return defer(() => this.authService.getAuthHeaders()).pipe(
+      concatMap(headers =>
+        this.httpClient.post<CreateTmpShareTokenResponse>(
+          `${BASE_URL}/api/v3/assets/${id}/private-share/`,
+          formData,
+          { headers }
+        )
+      ),
+      map(response => response.tmp_token)
+    );
+  }
+
   removeCaptureById$(id: string) {
     return defer(() => this.authService.getAuthHeaders()).pipe(
       concatMap(headers =>
@@ -349,6 +365,14 @@ export type AssetDownloadField =
 type CreateAssetResponse = DiaBackendAsset;
 type UpdateAssetResponse = DiaBackendAsset;
 
+export interface CreateTmpShareTokenResponse extends Tuple {
+  tmp_token: string;
+  url: string;
+  expiration_seconds: number;
+  created_at: string;
+  expired_at: string;
+}
+
 // eslint-disable-next-line @typescript-eslint/no-empty-interface
 interface DeleteAssetResponse {}
 
diff --git a/src/app/utils/url.ts b/src/app/utils/url.ts
index d6ad28bad..969c647a4 100644
--- a/src/app/utils/url.ts
+++ b/src/app/utils/url.ts
@@ -10,3 +10,10 @@ export function getAssetProfileUrl(id: string, token?: string) {
   }
   return `https://authmedia.net/asset-profile?cid=${id}`;
 }
+
+export function getAssetProfileUrlWithTmpToken(id: string, tmpToken?: string) {
+  if (tmpToken) {
+    return `https://authmedia.net/asset-profile?cid=${id}&tmp_token=${tmpToken}`;
+  }
+  return `https://authmedia.net/asset-profile?cid=${id}`;
+}

From 8323b044992b6e0a765a0930f496b335e67f7616 Mon Sep 17 00:00:00 2001
From: sultanmyrza <sultanmyrza@gmail.com>
Date: Tue, 24 May 2022 12:56:45 +0800
Subject: [PATCH 2/5] temporarely hide in-app user guide

---
 src/app/shared/user-guide/user-guide.service.ts | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/app/shared/user-guide/user-guide.service.ts b/src/app/shared/user-guide/user-guide.service.ts
index 36ecf44be..4fd5fdddc 100644
--- a/src/app/shared/user-guide/user-guide.service.ts
+++ b/src/app/shared/user-guide/user-guide.service.ts
@@ -31,6 +31,8 @@ export class UserGuideService {
   }
 
   async showUserGuidesOnHomePage() {
+    // Temporarely disable in app user guide for HomePage
+    return;
     if (
       (await this.hasOpenedCustomCameraPage()) === false ||
       (await this.hasCapturePhotoOrVideoWithCustomCamera()) === false
@@ -75,6 +77,8 @@ export class UserGuideService {
   }
 
   async showUserGuidesOnCustomCameraPage() {
+    // Temporarely disable in app user guide for CustomCameraPage
+    return;
     if ((await this.hasOpenedCustomCameraPage()) === false) {
       const avarageTimeToGetCameraPermissions = 1400;
       await this.delayBeforeStartTour(avarageTimeToGetCameraPermissions);
@@ -97,6 +101,8 @@ export class UserGuideService {
   }
 
   async showUserGuidesOnActivitiesPage() {
+    // Temporarely disable in app user guide for ActivitiesPage
+    return;
     if ((await this.hasOpenedActivitiesPage()) === false) {
       await this.delayBeforeStartTour();
       this.joyrideService.startTour({
@@ -111,6 +117,8 @@ export class UserGuideService {
   }
 
   async showUserGuidesOnDetailsPage() {
+    // Temporarely disable in app user guide for DetailsPage
+    return;
     if ((await this.hasClickedDetailsPageOptionsMenu()) === false) {
       await this.delayBeforeStartTour();
       this.joyrideService.startTour({
@@ -123,6 +131,8 @@ export class UserGuideService {
   }
 
   async showUserGuidesOnInboxTab() {
+    // Temporarely disable in app user guide for InboxTab
+    return;
     if ((await this.hasOpenedInboxTab()) === false) {
       await this.delayBeforeStartTour();
       this.joyrideService.startTour({

From f30407317fdaac61df4072ac859cceb133f2cca1 Mon Sep 17 00:00:00 2001
From: sultanmyrza <sultanmyrza@gmail.com>
Date: Tue, 24 May 2022 19:14:00 +0800
Subject: [PATCH 3/5] fix(user-guide): show user guide based on platform On iOS
 show old user guide (with slider in the app start) On Web and Android show
 new user guide

---
 src/app/features/home/home.page.ts            | 18 ++++++++++++--
 .../shared/user-guide/user-guide.service.ts   | 24 ++++++++++---------
 2 files changed, 29 insertions(+), 13 deletions(-)

diff --git a/src/app/features/home/home.page.ts b/src/app/features/home/home.page.ts
index 6876be7ff..88132ead8 100644
--- a/src/app/features/home/home.page.ts
+++ b/src/app/features/home/home.page.ts
@@ -2,7 +2,11 @@ import { ChangeDetectorRef, Component } from '@angular/core';
 import { MatDialog } from '@angular/material/dialog';
 import { ActivatedRoute, Router } from '@angular/router';
 import { Browser } from '@capacitor/browser';
-import { ActionSheetController, AlertController } from '@ionic/angular';
+import {
+  ActionSheetController,
+  AlertController,
+  Platform,
+} from '@ionic/angular';
 import { TranslocoService } from '@ngneat/transloco';
 import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
 import { combineLatest, defer, EMPTY, iif, of } from 'rxjs';
@@ -71,7 +75,8 @@ export class HomePage {
     private readonly alertController: AlertController,
     private readonly goProBluetoothService: GoProBluetoothService,
     private readonly diaBackendWalletService: DiaBackendWalletService,
-    private readonly userGuideService: UserGuideService
+    private readonly userGuideService: UserGuideService,
+    private readonly platform: Platform
   ) {
     this.downloadExpiredPostCaptures();
   }
@@ -92,6 +97,15 @@ export class HomePage {
   }
 
   private async onboardingRedirect() {
+    if (
+      this.platform.is('ios') &&
+      (await this.onboardingService.hasShownTutorialVersion()) === ''
+    ) {
+      return this.router.navigate(['tutorial'], {
+        relativeTo: this.route,
+      });
+    }
+
     this.onboardingService.isNewLogin = false;
 
     if (!(await this.onboardingService.hasCreatedOrImportedIntegrityWallet())) {
diff --git a/src/app/shared/user-guide/user-guide.service.ts b/src/app/shared/user-guide/user-guide.service.ts
index 4fd5fdddc..49912cd79 100644
--- a/src/app/shared/user-guide/user-guide.service.ts
+++ b/src/app/shared/user-guide/user-guide.service.ts
@@ -1,4 +1,5 @@
 import { Injectable } from '@angular/core';
+import { Platform } from '@ionic/angular';
 import { TranslocoService } from '@ngneat/transloco';
 import { JoyrideService } from 'ngx-joyride';
 import { PreferenceManager } from '../preference-manager/preference-manager.service';
@@ -15,7 +16,8 @@ export class UserGuideService {
   constructor(
     private readonly preferenceManager: PreferenceManager,
     private readonly joyrideService: JoyrideService,
-    private readonly translocoService: TranslocoService
+    private readonly translocoService: TranslocoService,
+    private readonly platform: Platform
   ) {}
 
   // eslint-disable-next-line class-methods-use-this
@@ -31,8 +33,8 @@ export class UserGuideService {
   }
 
   async showUserGuidesOnHomePage() {
-    // Temporarely disable in app user guide for HomePage
-    return;
+    if (this.platform.is('ios')) return;
+
     if (
       (await this.hasOpenedCustomCameraPage()) === false ||
       (await this.hasCapturePhotoOrVideoWithCustomCamera()) === false
@@ -77,8 +79,8 @@ export class UserGuideService {
   }
 
   async showUserGuidesOnCustomCameraPage() {
-    // Temporarely disable in app user guide for CustomCameraPage
-    return;
+    if (this.platform.is('ios')) return;
+
     if ((await this.hasOpenedCustomCameraPage()) === false) {
       const avarageTimeToGetCameraPermissions = 1400;
       await this.delayBeforeStartTour(avarageTimeToGetCameraPermissions);
@@ -101,8 +103,8 @@ export class UserGuideService {
   }
 
   async showUserGuidesOnActivitiesPage() {
-    // Temporarely disable in app user guide for ActivitiesPage
-    return;
+    if (this.platform.is('ios')) return;
+
     if ((await this.hasOpenedActivitiesPage()) === false) {
       await this.delayBeforeStartTour();
       this.joyrideService.startTour({
@@ -117,8 +119,8 @@ export class UserGuideService {
   }
 
   async showUserGuidesOnDetailsPage() {
-    // Temporarely disable in app user guide for DetailsPage
-    return;
+    if (this.platform.is('ios')) return;
+
     if ((await this.hasClickedDetailsPageOptionsMenu()) === false) {
       await this.delayBeforeStartTour();
       this.joyrideService.startTour({
@@ -131,8 +133,8 @@ export class UserGuideService {
   }
 
   async showUserGuidesOnInboxTab() {
-    // Temporarely disable in app user guide for InboxTab
-    return;
+    if (this.platform.is('ios')) return;
+
     if ((await this.hasOpenedInboxTab()) === false) {
       await this.delayBeforeStartTour();
       this.joyrideService.startTour({

From 7ee3259a132451c094243b3e6bd43dbf44cb75bb Mon Sep 17 00:00:00 2001
From: sultanmyrza <sultanmyrza@gmail.com>
Date: Tue, 24 May 2022 19:59:26 +0800
Subject: [PATCH 4/5] fix(user-guide): don't force users to go through each
 step

---
 src/app/features/home/details/details.page.ts |  1 +
 .../settings/user-guide/user-guide.page.html  | 24 +++++
 .../settings/user-guide/user-guide.page.ts    | 24 +++++
 .../shared/user-guide/user-guide.service.ts   | 95 +++++++++++++++----
 4 files changed, 123 insertions(+), 21 deletions(-)

diff --git a/src/app/features/home/details/details.page.ts b/src/app/features/home/details/details.page.ts
index fd472a92c..da52c92f9 100644
--- a/src/app/features/home/details/details.page.ts
+++ b/src/app/features/home/details/details.page.ts
@@ -208,6 +208,7 @@ export class DetailsPage {
   async ionViewDidEnter() {
     await this.userGuideService.showUserGuidesOnDetailsPage();
     await this.userGuideService.setHasOpenedDetailsPage(true);
+    await this.userGuideService.setHasClickedDetailsPageOptionsMenu(true);
   }
 
   // eslint-disable-next-line class-methods-use-this
diff --git a/src/app/features/settings/user-guide/user-guide.page.html b/src/app/features/settings/user-guide/user-guide.page.html
index c6a909220..b770b305f 100644
--- a/src/app/features/settings/user-guide/user-guide.page.html
+++ b/src/app/features/settings/user-guide/user-guide.page.html
@@ -7,6 +7,14 @@
 
 <ion-content>
   <ion-list>
+    <ion-item>
+      <ion-label text-wrap>Has Highlighted Camera Tab</ion-label>
+      <ion-checkbox
+        slot="end"
+        [checked]="hasHighlightedCameraTab$ | ngrxPush"
+        (ionChange)="setHasHighlightedCameraTab($event)"
+      ></ion-checkbox>
+    </ion-item>
     <ion-item>
       <ion-label text-wrap>Has Opened Camera Page</ion-label>
       <ion-checkbox
@@ -47,6 +55,14 @@
         (ionChange)="setHasClickedDetailsPageOptionsMenu($event)"
       ></ion-checkbox>
     </ion-item>
+    <ion-item>
+      <ion-label text-wrap>Has Highligted Activity Button</ion-label>
+      <ion-checkbox
+        slot="end"
+        [checked]="hasHighligtedActivityButton$ | ngrxPush"
+        (ionChange)="setHasHighligtedActivityButton($event)"
+      ></ion-checkbox>
+    </ion-item>
     <ion-item>
       <ion-label text-wrap>Has Opened Activities Page</ion-label>
       <ion-checkbox
@@ -55,6 +71,14 @@
         (ionChange)="setHasOpenedActivitiesPage($event)"
       ></ion-checkbox>
     </ion-item>
+    <ion-item>
+      <ion-label text-wrap>Has Hightlighted Inbox Tab</ion-label>
+      <ion-checkbox
+        slot="end"
+        [checked]="hasHightlightedInboxTab$ | ngrxPush"
+        (ionChange)="setHasHightlightedInboxTab($event)"
+      ></ion-checkbox>
+    </ion-item>
     <ion-item>
       <ion-label text-wrap>Has Opened Inbox Tab</ion-label>
       <ion-checkbox
diff --git a/src/app/features/settings/user-guide/user-guide.page.ts b/src/app/features/settings/user-guide/user-guide.page.ts
index 8582cb0ff..d5143f2c6 100644
--- a/src/app/features/settings/user-guide/user-guide.page.ts
+++ b/src/app/features/settings/user-guide/user-guide.page.ts
@@ -7,6 +7,9 @@ import { UserGuideService } from '../../../shared/user-guide/user-guide.service'
   styleUrls: ['./user-guide.page.scss'],
 })
 export class UserGuidePage {
+  readonly hasHighlightedCameraTab$ =
+    this.userGuideService.hasHighlightedCameraTab$();
+
   readonly hasOpenedCustomCameraPage$ =
     this.userGuideService.hasOpenedCustomCameraPage$();
 
@@ -22,13 +25,23 @@ export class UserGuidePage {
   readonly hasClickedDetailsPageOptionsMenu$ =
     this.userGuideService.hasClickedDetailsPageOptionsMenu$();
 
+  readonly hasHighligtedActivityButton$ =
+    this.userGuideService.hasHighligtedActivityButton$();
+
   readonly hasOpenedActivitiesPage$ =
     this.userGuideService.hasOpenedActivitiesPage$();
 
+  readonly hasHightlightedInboxTab$ =
+    this.userGuideService.hasHightlightedInboxTab$();
+
   readonly hasOpenedInboxTab$ = this.userGuideService.hasOpenedInboxTab$();
 
   constructor(private readonly userGuideService: UserGuideService) {}
 
+  setHasHighlightedCameraTab(event: any) {
+    this.userGuideService.setHasHighlightedCameraTab(event.detail.checked);
+  }
+
   setHasOpenedCustomCameraPage(event: any) {
     this.userGuideService.setHasOpenedCustomCameraPage(event.detail.checked);
   }
@@ -55,22 +68,33 @@ export class UserGuidePage {
     );
   }
 
+  setHasHighligtedActivityButton(event: any) {
+    this.userGuideService.setHasHighligtedActivityButton(event.detail.checked);
+  }
+
   setHasOpenedActivitiesPage(event: any) {
     this.userGuideService.setHasOpenedActivitiesPage(event.detail.checked);
   }
 
+  setHasHightlightedInboxTab(event: any) {
+    this.userGuideService.setHasHightlightedInboxTab(event.detail.checked);
+  }
+
   setHasOpenedInboxTab(event: any) {
     this.userGuideService.setHasOpenedInboxTab(event.detail.checked);
   }
 
   resetAll() {
+    this.userGuideService.setHasHighlightedCameraTab(false);
     this.userGuideService.setHasOpenedCustomCameraPage(false);
     this.userGuideService.setHasOpenedCustomCameraPage(false);
     this.userGuideService.setHasCapturedPhotoWithCustomCamera(false);
     this.userGuideService.setHasCapturedVideoWithCustomCamera(false);
     this.userGuideService.setHasOpenedDetailsPage(false);
     this.userGuideService.setHasClickedDetailsPageOptionsMenu(false);
+    this.userGuideService.setHasHighligtedActivityButton(false);
     this.userGuideService.setHasOpenedActivitiesPage(false);
+    this.userGuideService.setHasHightlightedInboxTab(false);
     this.userGuideService.setHasOpenedInboxTab(false);
   }
 }
diff --git a/src/app/shared/user-guide/user-guide.service.ts b/src/app/shared/user-guide/user-guide.service.ts
index 49912cd79..916c03a07 100644
--- a/src/app/shared/user-guide/user-guide.service.ts
+++ b/src/app/shared/user-guide/user-guide.service.ts
@@ -35,20 +35,15 @@ export class UserGuideService {
   async showUserGuidesOnHomePage() {
     if (this.platform.is('ios')) return;
 
-    if (
-      (await this.hasOpenedCustomCameraPage()) === false ||
-      (await this.hasCapturePhotoOrVideoWithCustomCamera()) === false
-    ) {
+    if ((await this.hasHighlightedCameraTab()) === false) {
       await this.delayBeforeStartTour();
       this.joyrideService.startTour({
         steps: ['highlightCaptureButton'],
         showCounter: this.showCounter,
         customTexts: this.customTexts,
       });
-    } else if (
-      (await this.hasOpenedDetailsPage()) === false &&
-      (await this.hasCapturePhotoOrVideoWithCustomCamera()) === true
-    ) {
+      this.setHasHighlightedCameraTab(true);
+    } else if ((await this.hasOpenedDetailsPage()) === false) {
       await this.delayBeforeStartTour();
       this.joyrideService.startTour({
         steps: ['highlightFirstCapture'],
@@ -57,7 +52,7 @@ export class UserGuideService {
       });
     } else if (
       (await this.hasClickedDetailsPageOptionsMenu()) === true &&
-      (await this.hasOpenedActivitiesPage()) === false
+      (await this.hasHighligtedActivityButton()) === false
     ) {
       await this.delayBeforeStartTour();
       this.joyrideService.startTour({
@@ -65,9 +60,10 @@ export class UserGuideService {
         showCounter: this.showCounter,
         customTexts: this.customTexts,
       });
+      this.setHasHighligtedActivityButton(true);
     } else if (
-      (await this.hasClickedDetailsPageOptionsMenu()) === true &&
-      (await this.hasOpenedInboxTab()) === false
+      (await this.hasOpenedActivitiesPage()) === true &&
+      (await this.hasHightlightedInboxTab()) === false
     ) {
       await this.delayBeforeStartTour();
       this.joyrideService.startTour({
@@ -75,6 +71,7 @@ export class UserGuideService {
         showCounter: this.showCounter,
         customTexts: this.customTexts,
       });
+      this.setHasHightlightedInboxTab(true);
     }
   }
 
@@ -92,13 +89,6 @@ export class UserGuideService {
         ],
         customTexts: this.customTexts,
       });
-    } else if (!(await this.hasCapturePhotoOrVideoWithCustomCamera())) {
-      await this.delayBeforeStartTour();
-      this.joyrideService.startTour({
-        steps: ['highlightCustomCameraCaptureButton'],
-        showCounter: this.showCounter,
-        customTexts: this.customTexts,
-      });
     }
   }
 
@@ -109,7 +99,6 @@ export class UserGuideService {
       await this.delayBeforeStartTour();
       this.joyrideService.startTour({
         customTexts: this.customTexts,
-
         steps: [
           'highlightCaptureTransactionsTab',
           'highlightNetworkActionsTab',
@@ -125,7 +114,6 @@ export class UserGuideService {
       await this.delayBeforeStartTour();
       this.joyrideService.startTour({
         customTexts: this.customTexts,
-
         steps: ['highlightDetailsPageOptionsMenu'],
         showCounter: this.showCounter,
       });
@@ -139,12 +127,32 @@ export class UserGuideService {
       await this.delayBeforeStartTour();
       this.joyrideService.startTour({
         customTexts: this.customTexts,
-
         steps: ['highlightImageView', 'highlightCollectionView'],
       });
     }
   }
 
+  hasHighlightedCameraTab$() {
+    return this.preferences.getBoolean$(
+      PrefKeys.HAS_HIGHLIGHTED_CAMERA_TAB,
+      false
+    );
+  }
+
+  async hasHighlightedCameraTab() {
+    return this.preferences.getBoolean(
+      PrefKeys.HAS_HIGHLIGHTED_CAMERA_TAB,
+      false
+    );
+  }
+
+  async setHasHighlightedCameraTab(value: boolean) {
+    return this.preferences.setBoolean(
+      PrefKeys.HAS_HIGHLIGHTED_CAMERA_TAB,
+      value
+    );
+  }
+
   hasOpenedCustomCameraPage$() {
     return this.preferences.getBoolean$(
       PrefKeys.HAS_OPENED_CUSTOM_CAMERA_PAGE,
@@ -256,6 +264,27 @@ export class UserGuideService {
       value
     );
   }
+
+  hasHighligtedActivityButton$() {
+    return this.preferences.getBoolean$(
+      PrefKeys.HAS_HIGHLIGHTED_ACTIVITY_BUTTON,
+      false
+    );
+  }
+
+  async hasHighligtedActivityButton() {
+    return this.preferences.getBoolean(
+      PrefKeys.HAS_HIGHLIGHTED_ACTIVITY_BUTTON,
+      false
+    );
+  }
+  async setHasHighligtedActivityButton(value: boolean) {
+    return this.preferences.setBoolean(
+      PrefKeys.HAS_HIGHLIGHTED_ACTIVITY_BUTTON,
+      value
+    );
+  }
+
   hasOpenedActivitiesPage$() {
     return this.preferences.getBoolean$(
       PrefKeys.HAS_OPENED_ACTIVITIES_PAGE,
@@ -276,6 +305,27 @@ export class UserGuideService {
     );
   }
 
+  hasHightlightedInboxTab$() {
+    return this.preferences.getBoolean$(
+      PrefKeys.HAS_HIGHLIGHTED_INBOX_TAB,
+      false
+    );
+  }
+
+  async hasHightlightedInboxTab() {
+    return await this.preferences.getBoolean(
+      PrefKeys.HAS_HIGHLIGHTED_INBOX_TAB,
+      false
+    );
+  }
+
+  async setHasHightlightedInboxTab(value: boolean) {
+    return this.preferences.setBoolean(
+      PrefKeys.HAS_HIGHLIGHTED_INBOX_TAB,
+      value
+    );
+  }
+
   hasOpenedInboxTab$() {
     return this.preferences.getBoolean$(PrefKeys.HAS_OPENED_INBOX_TAB, false);
   }
@@ -309,11 +359,14 @@ export interface UserGuide {
 }
 
 const enum PrefKeys {
+  HAS_HIGHLIGHTED_CAMERA_TAB = 'HAS_HIGHLIGHTED_CAMERA_TAB',
   HAS_OPENED_CUSTOM_CAMERA_PAGE = 'HAS_OPENED_CUSTOM_CAMERA_PAGE',
   HAS_CAPTURED_PHOTO_WITH_CUSTOM_CAMERA = 'HAS_CAPTURED_PHOTO_WITH_CUSTOM_CAMERA',
   HAS_CAPTURED_VIDEO_WITH_CUSTOM_CAMERA = 'HAS_CAPTURED_VIDEO_WITH_CUSTOM_CAMERA',
   HAS_OPENED_DETAILS_PAGE = 'HAS_OPENED_DETAILS_PAGE',
   HAS_CLICKED_DETAILS_PAGE_OPTIONS_MENU = 'HAS_CLICKED_DETAILS_PAGE_OPTIONS_MENU',
   HAS_OPENED_ACTIVITIES_PAGE = 'HAS_OPENED_ACTIVITIES_PAGE',
+  HAS_HIGHLIGHTED_ACTIVITY_BUTTON = 'HAS_HIGHLIGHTED_ACTIVITY_BUTTON',
+  HAS_HIGHLIGHTED_INBOX_TAB = 'HAS_HIGHLIGHTED_INBOX_TAB',
   HAS_OPENED_INBOX_TAB = 'HAS_OPENED_INBOX_TAB',
 }

From e7445931c257351bdcbfa1ea5e5e6a1f8bb9dec1 Mon Sep 17 00:00:00 2001
From: sultanmyrza <sultanmyrza@gmail.com>
Date: Tue, 24 May 2022 23:44:33 +0800
Subject: [PATCH 5/5] build: bump to 0.57.2

---
 CHANGELOG.md             | 7 +++++++
 android/app/build.gradle | 4 ++--
 package-lock.json        | 4 ++--
 package.json             | 2 +-
 4 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index bf96c1a1a..1bbfe5786 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
 
+## 0.57.2 - 2022-05-24
+
+### Fixed
+
+- Show old user guide for iOS
+- Show new user guide for Android, Web
+
 ## 0.57.1 - 2022-05-19
 
 ### Fixed
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 79270e01e..bf23722a6 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -6,8 +6,8 @@ android {
         applicationId "io.numbersprotocol.capturelite"
         minSdkVersion rootProject.ext.minSdkVersion
         targetSdkVersion rootProject.ext.targetSdkVersion
-        versionCode 394
-        versionName "0.57.1"
+        versionCode 395
+        versionName "0.57.2"
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     }
     buildFeatures {
diff --git a/package-lock.json b/package-lock.json
index 4abf5a46c..c604b953c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "capture-lite",
-  "version": "0.57.1",
+  "version": "0.57.2",
   "lockfileVersion": 2,
   "requires": true,
   "packages": {
     "": {
       "name": "capture-lite",
-      "version": "0.57.1",
+      "version": "0.57.2",
       "dependencies": {
         "@angular/animations": "^12.2.4",
         "@angular/cdk": "^12.2.4",
diff --git a/package.json b/package.json
index a92648fc8..3c70de591 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "capture-lite",
-  "version": "0.57.1",
+  "version": "0.57.2",
   "author": "numbersprotocol",
   "homepage": "https://numbersprotocol.io/",
   "scripts": {