mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 03:40:18 +00:00
New property to disable the StoreUpdateAlert
This commit is contained in:
parent
b23e5134bc
commit
f4e9c8724d
@ -131,6 +131,34 @@ typedef enum {
|
|||||||
@property (nonatomic, assign, getter=isCheckingForUpdateOnLaunch) BOOL checkForUpdateOnLaunch;
|
@property (nonatomic, assign, getter=isCheckingForUpdateOnLaunch) BOOL checkForUpdateOnLaunch;
|
||||||
|
|
||||||
|
|
||||||
|
///-----------------------------------------------------------------------------
|
||||||
|
/// @name User Interface
|
||||||
|
///-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Flag that determines if the integrated update alert should be used
|
||||||
|
|
||||||
|
If enabled, the integrated UIAlert based update notification will be used to inform
|
||||||
|
the user about a new update being available in the App Store.
|
||||||
|
|
||||||
|
If disabled, you need to implement the `BITStoreUpdateManagerDelegate` protocol with
|
||||||
|
the method `[BITStoreUpdateManagerDelegate detectUpdateFromStoreUpdateManager:version:]`
|
||||||
|
to be notified about new version and proceed yourself.
|
||||||
|
The manager will consider this identical to an `Ignore` user action using the alert
|
||||||
|
and not inform about this particular version any more, unless the app is updated
|
||||||
|
and this very same version shows up at a later time again as a new version.
|
||||||
|
|
||||||
|
*Default*: _YES_
|
||||||
|
|
||||||
|
@warning If the HockeySDKResources bundle is missing in the application package, then the internal
|
||||||
|
update alert is also disabled and be treated identical to manually disabling this
|
||||||
|
property.
|
||||||
|
@see updateSetting
|
||||||
|
*/
|
||||||
|
@property (nonatomic, assign, getter=isUpdateUIEnabled) BOOL updateUIEnabled;
|
||||||
|
|
||||||
|
|
||||||
// manually start an update check
|
// manually start an update check
|
||||||
/**
|
/**
|
||||||
Check for an update
|
Check for an update
|
||||||
|
|||||||
@ -87,6 +87,7 @@
|
|||||||
_enableStoreUpdateManager = NO;
|
_enableStoreUpdateManager = NO;
|
||||||
_didSetupDidBecomeActiveNotifications = NO;
|
_didSetupDidBecomeActiveNotifications = NO;
|
||||||
_updateAlertShowing = NO;
|
_updateAlertShowing = NO;
|
||||||
|
_updateUIEnabled = YES;
|
||||||
_newStoreVersion = nil;
|
_newStoreVersion = nil;
|
||||||
_appStoreURL = nil;
|
_appStoreURL = nil;
|
||||||
_currentUUID = [[self executableUUID] copy];
|
_currentUUID = [[self executableUUID] copy];
|
||||||
@ -271,8 +272,12 @@
|
|||||||
[self.delegate detectedUpdateFromStoreUpdateManager:self newVersion:_newStoreVersion];
|
[self.delegate detectedUpdateFromStoreUpdateManager:self newVersion:_newStoreVersion];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BITHockeyBundle()) {
|
if (self.updateUIEnabled && BITHockeyBundle()) {
|
||||||
[self showUpdateAlert];
|
[self showUpdateAlert];
|
||||||
|
} else {
|
||||||
|
// Ignore this version
|
||||||
|
[self.userDefaults setObject:_newStoreVersion forKey:kBITStoreUpdateIgnoreVersion];
|
||||||
|
[self.userDefaults synchronize];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user