diff options
author | 2021-12-24 13:02:29 +0100 | |
---|---|---|
committer | 2021-12-24 13:02:29 +0100 | |
commit | c65bec3e5ccfaa8cdd8a864a7f9b70aba9ddab1e (patch) | |
tree | e8d89cad355d0faa62a0163ed53c18870892903a /src | |
parent | docs: add leofiore as a contributor for bug (#2360) (diff) | |
download | ferdium-app-c65bec3e5ccfaa8cdd8a864a7f9b70aba9ddab1e.tar.gz ferdium-app-c65bec3e5ccfaa8cdd8a864a7f9b70aba9ddab1e.tar.zst ferdium-app-c65bec3e5ccfaa8cdd8a864a7f9b70aba9ddab1e.zip |
#2359 Disable available updates behaviour based on automaticUpdates
Diffstat (limited to 'src')
-rw-r--r-- | src/components/layout/AppLayout.js | 4 | ||||
-rw-r--r-- | src/components/layout/Sidebar.js | 14 | ||||
-rw-r--r-- | src/stores/AppStore.js | 4 |
3 files changed, 12 insertions, 10 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index eb36ea431..4474fe0f4 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -126,7 +126,7 @@ class AppLayout extends Component { | |||
126 | 126 | ||
127 | const { intl } = this.props; | 127 | const { intl } = this.props; |
128 | 128 | ||
129 | const { locked } = settings.app; | 129 | const { locked, automaticUpdates } = settings.app; |
130 | if (locked) { | 130 | if (locked) { |
131 | return <LockedScreen />; | 131 | return <LockedScreen />; |
132 | } | 132 | } |
@@ -191,7 +191,7 @@ class AppLayout extends Component { | |||
191 | {intl.formatMessage(messages.servicesUpdated)} | 191 | {intl.formatMessage(messages.servicesUpdated)} |
192 | </InfoBar> | 192 | </InfoBar> |
193 | )} | 193 | )} |
194 | {appUpdateIsDownloaded && this.state.shouldShowAppUpdateInfoBar && ( | 194 | {automaticUpdates && appUpdateIsDownloaded && this.state.shouldShowAppUpdateInfoBar && ( |
195 | <AppUpdateInfoBar | 195 | <AppUpdateInfoBar |
196 | onInstallUpdate={installAppUpdate} | 196 | onInstallUpdate={installAppUpdate} |
197 | onHide={() => { | 197 | onHide={() => { |
diff --git a/src/components/layout/Sidebar.js b/src/components/layout/Sidebar.js index e3df9c2ea..1cbdcfe46 100644 --- a/src/components/layout/Sidebar.js +++ b/src/components/layout/Sidebar.js | |||
@@ -233,12 +233,14 @@ class Sidebar extends Component { | |||
233 | )} (${settingsShortcutKey(false)})`} | 233 | )} (${settingsShortcutKey(false)})`} |
234 | > | 234 | > |
235 | <Icon icon={mdiCog} size={1.5} /> | 235 | <Icon icon={mdiCog} size={1.5} /> |
236 | {(this.props.stores.app.updateStatus === | 236 | { |
237 | this.props.stores.app.updateStatusTypes.AVAILABLE || | 237 | (this.props.stores.settings.app.automaticUpdates && |
238 | this.props.stores.app.updateStatus === | 238 | (this.props.stores.app.updateStatus === this.props.stores.app.updateStatusTypes.AVAILABLE || |
239 | this.props.stores.app.updateStatusTypes.DOWNLOADED) && ( | 239 | this.props.stores.app.updateStatus === this.props.stores.app.updateStatusTypes.DOWNLOADED) |
240 | <span className="update-available">•</span> | 240 | ) && ( |
241 | )} | 241 | <span className="update-available">•</span> |
242 | ) | ||
243 | } | ||
242 | </button> | 244 | </button> |
243 | {this.state.tooltipEnabled && ( | 245 | {this.state.tooltipEnabled && ( |
244 | <ReactTooltip place="right" type="dark" effect="solid" /> | 246 | <ReactTooltip place="right" type="dark" effect="solid" /> |
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index eca347153..2698749fc 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -164,7 +164,7 @@ export default class AppStore extends Store { | |||
164 | ipcRenderer.on('autoUpdate', (event, data) => { | 164 | ipcRenderer.on('autoUpdate', (event, data) => { |
165 | if (data.available) { | 165 | if (data.available) { |
166 | this.updateStatus = this.updateStatusTypes.AVAILABLE; | 166 | this.updateStatus = this.updateStatusTypes.AVAILABLE; |
167 | if (isMac) { | 167 | if (isMac && this.stores.settings.app.automaticUpdates) { |
168 | app.dock.bounce(); | 168 | app.dock.bounce(); |
169 | } | 169 | } |
170 | } | 170 | } |
@@ -175,7 +175,7 @@ export default class AppStore extends Store { | |||
175 | 175 | ||
176 | if (data.downloaded) { | 176 | if (data.downloaded) { |
177 | this.updateStatus = this.updateStatusTypes.DOWNLOADED; | 177 | this.updateStatus = this.updateStatusTypes.DOWNLOADED; |
178 | if (isMac) { | 178 | if (isMac && this.stores.settings.app.automaticUpdates) { |
179 | app.dock.bounce(); | 179 | app.dock.bounce(); |
180 | } | 180 | } |
181 | } | 181 | } |