diff --git a/Calling/src/app/App.tsx b/Calling/src/app/App.tsx index 6a2bb5f..67da8d1 100644 --- a/Calling/src/app/App.tsx +++ b/Calling/src/app/App.tsx @@ -68,15 +68,15 @@ const App = (): JSX.Element => { } }, [isMobileSession, isLandscapeSession]); + if (isMobileSession && isAppAlreadyRunningInAnotherTab) { + return ; + } + const supportedBrowser = !isOnIphoneAndNotSafari(); if (!supportedBrowser) { return ; } - if (isMobileSession && isAppAlreadyRunningInAnotherTab) { - return ; - } - switch (page) { case 'home': { document.title = `home - ${WEB_APP_TITLE}`; diff --git a/Calling/src/app/utils/AppUtils.test.ts b/Calling/src/app/utils/AppUtils.test.ts index 05e393f..d5894a6 100644 --- a/Calling/src/app/utils/AppUtils.test.ts +++ b/Calling/src/app/utils/AppUtils.test.ts @@ -27,4 +27,3 @@ describe('ContosoUtils tests', () => { test('createRandomDisplayName should return a valid string for a user id', () => expect(createRandomDisplayName()).toBeTruthy()); }); -export {}; /*The above line is generated by conditional compilation, when no export detected after CC.*/ diff --git a/Calling/src/app/utils/AppUtils.ts b/Calling/src/app/utils/AppUtils.ts index 2e02c05..7e1f7ad 100644 --- a/Calling/src/app/utils/AppUtils.ts +++ b/Calling/src/app/utils/AppUtils.ts @@ -62,4 +62,6 @@ export const isLandscape = (): boolean => window.innerWidth < window.innerHeight export const navigateToHomePage = (): void => { window.location.href = window.location.href.split('?')[0]; -}; \ No newline at end of file +}; + +export const WEB_APP_TITLE = document.title; \ No newline at end of file