Skip to content

Commit

Permalink
Remove donate button on iOS to match the Apple guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmayer-dev committed Apr 21, 2024
1 parent 83ef1c5 commit e67f249
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/app/pages/home/home.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
<ion-footer>
<ion-toolbar>
<ion-text class="ms-3">{{version}} | Client Id: {{clientId}}</ion-text>
<ion-buttons slot="primary">
<ion-buttons *ngIf="showDonateButton()" slot="primary">
<ion-button (click)="openDonate()" fill="solid">
Donate
<ion-icon slot="end" name="heart-outline"></ion-icon>
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-footer>

7 changes: 6 additions & 1 deletion src/app/pages/home/home.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export class HomePage implements OnInit {

constructor(private settingsService: SettingsService,
private diagnosticService: DiagnosticService,
private modalController: ModalController) {
private modalController: ModalController,
private diagnosticsService: DiagnosticService) {
}

async ngOnInit() {
Expand All @@ -40,6 +41,10 @@ export class HomePage implements OnInit {
await modal.present();
}

showDonateButton() {
return !this.diagnosticsService.isiOS();
}

openDonate() {
window.open("https://ko-fi.com/manuelmayer", "_blank");
}
Expand Down

0 comments on commit e67f249

Please sign in to comment.