mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-03-03 15:06:58 +00:00
Fix disableUpdateManager not working as advertised
This bug did not affect the automatic disabling of the module when run from the App Store! That one was and is working as advertised.
This commit is contained in:
@@ -163,6 +163,14 @@
|
||||
}
|
||||
|
||||
|
||||
- (void)setDisableUpdateManager:(BOOL)disableUpdateManager {
|
||||
if (_updateManager) {
|
||||
[_updateManager setDisableUpdateManager:disableUpdateManager];
|
||||
}
|
||||
_disableUpdateManager = disableUpdateManager;
|
||||
}
|
||||
|
||||
|
||||
- (void)setUpdateURL:(NSString *)anUpdateURL {
|
||||
// ensure url ends with a trailing slash
|
||||
if (![anUpdateURL hasSuffix:@"/"]) {
|
||||
|
||||
@@ -342,6 +342,7 @@
|
||||
_lastCheck = nil;
|
||||
_uuid = [[self executableUUID] retain];
|
||||
_sendUsageData = YES;
|
||||
_disableUpdateManager = NO;
|
||||
|
||||
// set defaults
|
||||
self.showDirectInstallOption = NO;
|
||||
@@ -494,6 +495,7 @@
|
||||
|
||||
- (void)showCheckForUpdateAlert {
|
||||
if (_isAppStoreEnvironment) return;
|
||||
if ([self isUpdateManagerDisabled]) return;
|
||||
|
||||
if (!_updateAlertShowing) {
|
||||
if ([self hasNewerMandatoryVersion]) {
|
||||
@@ -762,6 +764,7 @@
|
||||
|
||||
- (void)checkForUpdate {
|
||||
if (_isAppStoreEnvironment && !_checkForTracker) return;
|
||||
if ([self isUpdateManagerDisabled]) return;
|
||||
|
||||
if ([self expiryDateReached]) return;
|
||||
|
||||
@@ -884,6 +887,8 @@
|
||||
|
||||
// begin the startup process
|
||||
- (void)startManager {
|
||||
if ([self isUpdateManagerDisabled]) return;
|
||||
|
||||
BITHockeyLog(@"INFO: Start UpdateManager");
|
||||
|
||||
if ([self expiryDateReached]) return;
|
||||
|
||||
@@ -64,6 +64,8 @@
|
||||
// Contains the tracker config if received from server
|
||||
@property (nonatomic, retain) NSDictionary *trackerConfig;
|
||||
|
||||
// used by BITHockeyManager if disable status is changed
|
||||
@property (nonatomic, getter = isUpdateManagerDisabled) BOOL disableUpdateManager;
|
||||
|
||||
- (id)initWithAppIdentifier:(NSString *)appIdentifier isAppStoreEnvironemt:(BOOL)isAppStoreEnvironment;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user