Install-button verschwindet nach abbruch
This commit is contained in:
@@ -61,16 +61,11 @@ export class WordRotatorSettingFragment extends LocalStorageSettingsFragment {
|
||||
this.getSite().startSite(PrivacyPolicySite);
|
||||
});
|
||||
|
||||
InstallManager.setCanInstallListener((e) => {
|
||||
console.log("can install!");
|
||||
InstallManager.setCanInstallListener(() => {
|
||||
let installButton = this.findBy("#install-button");
|
||||
installButton.addEventListener("click", () => {
|
||||
e.prompt();
|
||||
e["userChoice"].then(res => {
|
||||
console.log(res);
|
||||
if (res["outcome"] === 'accepted') {
|
||||
installButton.classList.add("hidden");
|
||||
}
|
||||
InstallManager.prompt().then(() => {
|
||||
installButton.classList.add("hidden");
|
||||
});
|
||||
});
|
||||
installButton.classList.remove("hidden");
|
||||
|
||||
Reference in New Issue
Block a user