Skip to content

Commit

Permalink
fix: do not open install screen on firefox pwa
Browse files Browse the repository at this point in the history
  • Loading branch information
gion-andri committed Dec 14, 2023
1 parent 0b12498 commit db284c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,10 @@ export class AppComponent implements OnInit {

if (this.platform.ANDROID) {
if (this.platform.FIREFOX) {
this.openPwaWindow('instructions_android_firefox');
const isInStandaloneMode = ('standalone' in window.navigator) && (window.navigator['standalone']);
if (!isInStandaloneMode) {
this.openPwaWindow('instructions_android_firefox');
}
} else {
window.addEventListener('beforeinstallprompt', (event: any) => {
event.preventDefault();
Expand Down

0 comments on commit db284c1

Please sign in to comment.