diff options
author | 2021-09-26 17:59:54 +0200 | |
---|---|---|
committer | 2021-09-26 16:59:54 +0100 | |
commit | 0a82fed4beb0ae48042fc9e20bac82d3c9d03298 (patch) | |
tree | 86aee34cd8e24e32337f5de2695a4926fe869f16 | |
parent | Make services update infobar dismissable (#1992) (diff) | |
download | ferdium-app-0a82fed4beb0ae48042fc9e20bac82d3c9d03298.tar.gz ferdium-app-0a82fed4beb0ae48042fc9e20bac82d3c9d03298.tar.zst ferdium-app-0a82fed4beb0ae48042fc9e20bac82d3c9d03298.zip |
Fix Slack connection with Google SSO (#1991)
-rw-r--r-- | src/models/UserAgent.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/models/UserAgent.js b/src/models/UserAgent.js index 8ec274aa5..33bf9d072 100644 --- a/src/models/UserAgent.js +++ b/src/models/UserAgent.js | |||
@@ -47,25 +47,24 @@ export default class UserAgent { | |||
47 | return defaultUserAgent(); | 47 | return defaultUserAgent(); |
48 | } | 48 | } |
49 | 49 | ||
50 | @computed get userAgentWithChromeVersion() { | 50 | @computed get serviceUserAgentPref() { |
51 | if (typeof this.userAgentPref === 'string') { | 51 | if (typeof this.userAgentPref === 'string') { |
52 | const trimmed = this.userAgentPref.trim(); | 52 | const trimmed = this.userAgentPref.trim(); |
53 | if (trimmed !== '') { | 53 | if (trimmed !== '') { |
54 | return trimmed; | 54 | return trimmed; |
55 | } | 55 | } |
56 | } | 56 | } |
57 | return this.defaultUserAgent; | 57 | return null; |
58 | } | 58 | } |
59 | 59 | ||
60 | @computed get userAgentWithoutChromeVersion() { | 60 | @computed get userAgentWithoutChromeVersion() { |
61 | const withChrome = this.userAgentWithChromeVersion; | 61 | const withChrome = this.defaultUserAgent; |
62 | return withChrome.replace(/Chrome\/[\d.]+/, 'Chrome'); | 62 | return withChrome.replace(/Chrome\/[\d.]+/, 'Chrome'); |
63 | } | 63 | } |
64 | 64 | ||
65 | @computed get userAgent() { | 65 | @computed get userAgent() { |
66 | return this.chromelessUserAgent | 66 | return this.serviceUserAgentPref |
67 | ? this.userAgentWithoutChromeVersion | 67 | || (this.chromelessUserAgent ? this.userAgentWithoutChromeVersion : this.defaultUserAgent); |
68 | : this.userAgentWithChromeVersion; | ||
69 | } | 68 | } |
70 | 69 | ||
71 | @action setWebviewReference(webview) { | 70 | @action setWebviewReference(webview) { |