Skip to content

Commit

Permalink
not show get android app in mobile
Browse files Browse the repository at this point in the history
Signed-off-by: chengkangzai <[email protected]>
  • Loading branch information
chengkangzai committed Mar 11, 2021
1 parent 9f24e69 commit f793f2a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion WhatToEat/src/app/pages/more/more.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

</ion-content>

<ion-footer>
<ion-footer *ngIf="isPhone === false">
<ion-toolbar class="ion-align-items-center ion-text-center">
<ion-button href="https://play.google.com/store/apps/details?id=app.web.whattoeathuh" fill="outline">
<ion-icon name="logo-android" slot="start"></ion-icon>
Expand Down
12 changes: 10 additions & 2 deletions WhatToEat/src/app/pages/more/more.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Component, OnDestroy, OnInit} from '@angular/core';
import {Router} from '@angular/router';
import {AuthService} from '../../services/auth.service';
import {RoleService} from '../../services/role.service';
import {AlertController, ModalController, ToastController} from '@ionic/angular';
import {AlertController, ModalController, ToastController, Platform} from '@ionic/angular';
import {Subscription} from 'rxjs';
import {AboutComponent} from '../../components/about/about.component';
import {AngularFireFunctions} from '@angular/fire/functions';
Expand All @@ -15,6 +15,7 @@ import {AngularFireFunctions} from '@angular/fire/functions';
export class MorePage implements OnInit, OnDestroy {
isMaster = false;
isMaster$: Subscription;
isPhone = false;

constructor(
private router: Router,
Expand All @@ -23,11 +24,18 @@ export class MorePage implements OnInit, OnDestroy {
private alertController: AlertController,
private modalController: ModalController,
private functions: AngularFireFunctions,
private toaster: ToastController
private toaster: ToastController,
private platform: Platform
) {
}

ngOnInit() {
if (
this.platform.is('hybrid') &&
(this.platform.is('android') || this.platform.is('ios'))
) {
this.isPhone = true;
}
this.isMaster$ = this.role.isMaster().subscribe(master => {
this.isMaster = master;
});
Expand Down

0 comments on commit f793f2a

Please sign in to comment.