mirror of
				https://github.com/zulip/zulip-desktop.git
				synced 2025-11-04 05:53:21 +00:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			v5.4.0
			...
			auto-updat
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					8ad74081c4 | ||
| 
						 | 
					6163ad85e0 | 
@@ -30,7 +30,9 @@ function appUpdater(updateFromMenu = false) {
 | 
			
		||||
	autoUpdater.logger = log;
 | 
			
		||||
 | 
			
		||||
	// Handle auto updates for beta/pre releases
 | 
			
		||||
	autoUpdater.allowPrerelease = ConfigUtil.getConfigItem('betaUpdate') || false;
 | 
			
		||||
	const isBetaUpdate = ConfigUtil.getConfigItem('betaUpdate');
 | 
			
		||||
 | 
			
		||||
	autoUpdater.allowPrerelease = isBetaUpdate || false;
 | 
			
		||||
 | 
			
		||||
	const eventsListenerRemove = ['update-available', 'update-not-available'];
 | 
			
		||||
	autoUpdater.on('update-available', info => {
 | 
			
		||||
 
 | 
			
		||||
@@ -161,7 +161,9 @@ app.on('ready', () => {
 | 
			
		||||
 | 
			
		||||
	page.once('did-frame-finish-load', () => {
 | 
			
		||||
		// Initate auto-updates on MacOS and Windows
 | 
			
		||||
		appUpdater();
 | 
			
		||||
		if (ConfigUtil.getConfigItem('autoUpdate')) {
 | 
			
		||||
			appUpdater();
 | 
			
		||||
		}
 | 
			
		||||
		crashHandler();
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -89,6 +89,7 @@ class ServerManagerView {
 | 
			
		||||
			startMinimized: false,
 | 
			
		||||
			enableSpellchecker: true,
 | 
			
		||||
			showNotification: true,
 | 
			
		||||
			autoUpdate: true,
 | 
			
		||||
			betaUpdate: false,
 | 
			
		||||
			silent: false,
 | 
			
		||||
			lastActiveTab: 0,
 | 
			
		||||
 
 | 
			
		||||
@@ -48,7 +48,11 @@ class GeneralSection extends BaseSection {
 | 
			
		||||
					</div>
 | 
			
		||||
				</div>
 | 
			
		||||
				<div class="title">App Updates</div>
 | 
			
		||||
                <div class="settings-card">
 | 
			
		||||
				<div class="settings-card">
 | 
			
		||||
				<div class="setting-row" id="autoupdate-option">
 | 
			
		||||
						<div class="setting-description">Enable auto updates</div>
 | 
			
		||||
						<div class="setting-control"></div>
 | 
			
		||||
					</div>
 | 
			
		||||
					<div class="setting-row" id="betaupdate-option">
 | 
			
		||||
						<div class="setting-description">Get beta updates</div>
 | 
			
		||||
						<div class="setting-control"></div>
 | 
			
		||||
@@ -104,7 +108,8 @@ class GeneralSection extends BaseSection {
 | 
			
		||||
		this.updateTrayOption();
 | 
			
		||||
		this.updateBadgeOption();
 | 
			
		||||
		this.updateSilentOption();
 | 
			
		||||
		this.updateUpdateOption();
 | 
			
		||||
		this.autoUpdateOption();
 | 
			
		||||
		this.betaUpdateOption();
 | 
			
		||||
		this.updateSidebarOption();
 | 
			
		||||
		this.updateStartAtLoginOption();
 | 
			
		||||
		this.updateResetDataOption();
 | 
			
		||||
@@ -160,14 +165,26 @@ class GeneralSection extends BaseSection {
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	updateUpdateOption() {
 | 
			
		||||
	autoUpdateOption() {
 | 
			
		||||
		this.generateSettingOption({
 | 
			
		||||
			$element: document.querySelector('#autoupdate-option .setting-control'),
 | 
			
		||||
			value: ConfigUtil.getConfigItem('autoUpdate', true),
 | 
			
		||||
			clickHandler: () => {
 | 
			
		||||
				const newValue = !ConfigUtil.getConfigItem('autoUpdate');
 | 
			
		||||
				ConfigUtil.setConfigItem('autoUpdate', newValue);
 | 
			
		||||
				this.autoUpdateOption();
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	betaUpdateOption() {
 | 
			
		||||
		this.generateSettingOption({
 | 
			
		||||
			$element: document.querySelector('#betaupdate-option .setting-control'),
 | 
			
		||||
			value: ConfigUtil.getConfigItem('betaUpdate', false),
 | 
			
		||||
			clickHandler: () => {
 | 
			
		||||
				const newValue = !ConfigUtil.getConfigItem('betaUpdate');
 | 
			
		||||
				ConfigUtil.setConfigItem('betaUpdate', newValue);
 | 
			
		||||
				this.updateUpdateOption();
 | 
			
		||||
				this.betaUpdateOption();
 | 
			
		||||
			}
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user