Fixed install extension toast appearing even when extension is installed
This commit is contained in:
@@ -641,6 +641,7 @@
|
|||||||
import intializePwa from "../assets/js/pwa"
|
import intializePwa from "../assets/js/pwa"
|
||||||
import * as version from "../.postwoman/version.json"
|
import * as version from "../.postwoman/version.json"
|
||||||
import { hasExtensionInstalled } from "../functions/strategies/ExtensionStrategy"
|
import { hasExtensionInstalled } from "../functions/strategies/ExtensionStrategy"
|
||||||
|
import { hasChromeExtensionInstalled } from "../functions/strategies/ChromeStrategy"
|
||||||
import firebase from "firebase/app"
|
import firebase from "firebase/app"
|
||||||
import { fb } from "../functions/fb"
|
import { fb } from "../functions/fb"
|
||||||
|
|
||||||
@@ -702,7 +703,6 @@ export default {
|
|||||||
showExtensions: false,
|
showExtensions: false,
|
||||||
showShortcuts: false,
|
showShortcuts: false,
|
||||||
showSupport: false,
|
showSupport: false,
|
||||||
extensionInstalled: hasExtensionInstalled(),
|
|
||||||
fb,
|
fb,
|
||||||
navigatorShare: navigator.share,
|
navigatorShare: navigator.share,
|
||||||
}
|
}
|
||||||
@@ -762,8 +762,8 @@ export default {
|
|||||||
// Just return if showExtensionsToast is "no"
|
// Just return if showExtensionsToast is "no"
|
||||||
if (!showExtensionsToast) return
|
if (!showExtensionsToast) return
|
||||||
|
|
||||||
if (!this.extensionInstalled) {
|
setTimeout(() => {
|
||||||
setTimeout(() => {
|
if (!(hasExtensionInstalled() || hasChromeExtensionInstalled())) {
|
||||||
this.$toast.show(this.$t("extensions_info2"), {
|
this.$toast.show(this.$t("extensions_info2"), {
|
||||||
icon: "extension",
|
icon: "extension",
|
||||||
duration: 5000,
|
duration: 5000,
|
||||||
@@ -790,8 +790,8 @@ export default {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
}, 15000)
|
}
|
||||||
}
|
}, 15000)
|
||||||
|
|
||||||
this._keyListener = function(e) {
|
this._keyListener = function(e) {
|
||||||
if (e.key === "Escape") {
|
if (e.key === "Escape") {
|
||||||
|
|||||||
Reference in New Issue
Block a user