mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Clean up private properties and methods in BITUpdateViewController
This commit is contained in:
parent
1f7ff28f9c
commit
2257950c99
@ -35,6 +35,7 @@
|
|||||||
#import "HockeySDKPrivate.h"
|
#import "HockeySDKPrivate.h"
|
||||||
|
|
||||||
#import "BITUpdateManagerPrivate.h"
|
#import "BITUpdateManagerPrivate.h"
|
||||||
|
#import "BITUpdateViewControllerPrivate.h"
|
||||||
#import "BITAppVersionMetaInfo.h"
|
#import "BITAppVersionMetaInfo.h"
|
||||||
|
|
||||||
#import "NSString+BITHockeyAdditions.h"
|
#import "NSString+BITHockeyAdditions.h"
|
||||||
|
@ -32,17 +32,10 @@
|
|||||||
|
|
||||||
@class PSStoreButton;
|
@class PSStoreButton;
|
||||||
@class PSAppStoreHeader;
|
@class PSAppStoreHeader;
|
||||||
@class BITUpdateManager;
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
AppStoreButtonStateOffline,
|
|
||||||
AppStoreButtonStateCheck,
|
|
||||||
AppStoreButtonStateSearching,
|
|
||||||
AppStoreButtonStateUpdate,
|
|
||||||
AppStoreButtonStateInstalling
|
|
||||||
} AppStoreButtonState;
|
|
||||||
|
|
||||||
@interface BITUpdateViewController : UITableViewController {
|
@interface BITUpdateViewController : UITableViewController {
|
||||||
|
@private
|
||||||
BOOL _kvoRegistered;
|
BOOL _kvoRegistered;
|
||||||
BOOL _showAllVersions;
|
BOOL _showAllVersions;
|
||||||
UIStatusBarStyle _statusBarStyle;
|
UIStatusBarStyle _statusBarStyle;
|
||||||
@ -56,11 +49,4 @@ typedef enum {
|
|||||||
BOOL _isAppStoreEnvironment;
|
BOOL _isAppStoreEnvironment;
|
||||||
}
|
}
|
||||||
|
|
||||||
@property (nonatomic, retain) BITUpdateManager *updateManager;
|
|
||||||
@property (nonatomic, readwrite) BOOL modal;
|
|
||||||
@property (nonatomic, readwrite) BOOL modalAnimated;
|
|
||||||
|
|
||||||
- (id)init:(BITUpdateManager *)newUpdateManager modal:(BOOL)newModal;
|
|
||||||
- (id)init;
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -40,24 +40,17 @@
|
|||||||
#import "HockeySDKPrivate.h"
|
#import "HockeySDKPrivate.h"
|
||||||
|
|
||||||
#import "BITUpdateManagerPrivate.h"
|
#import "BITUpdateManagerPrivate.h"
|
||||||
|
#import "BITUpdateViewControllerPrivate.h"
|
||||||
|
|
||||||
|
|
||||||
#define BIT_RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]
|
#define BIT_RGBCOLOR(r,g,b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]
|
||||||
#define kWebCellIdentifier @"PSWebTableViewCell"
|
#define kWebCellIdentifier @"PSWebTableViewCell"
|
||||||
#define kAppStoreViewHeight 90
|
#define kAppStoreViewHeight 90
|
||||||
|
|
||||||
@interface BITUpdateViewController()<PSStoreButtonDelegate>
|
|
||||||
// updates the whole view
|
|
||||||
- (void)showPreviousVersionAction;
|
|
||||||
- (void)redrawTableView;
|
|
||||||
@property (nonatomic, assign) AppStoreButtonState appStoreButtonState;
|
|
||||||
- (void)setAppStoreButtonState:(AppStoreButtonState)anAppStoreButtonState animated:(BOOL)animated;
|
|
||||||
@end
|
|
||||||
|
|
||||||
|
|
||||||
@implementation BITUpdateViewController
|
@implementation BITUpdateViewController
|
||||||
|
|
||||||
@synthesize appStoreButtonState = appStoreButtonState_;
|
@synthesize appStoreButtonState = _appStoreButtonState;
|
||||||
@synthesize modal = _modal;
|
@synthesize modal = _modal;
|
||||||
@synthesize modalAnimated = _modalAnimated;
|
@synthesize modalAnimated = _modalAnimated;
|
||||||
|
|
||||||
@ -570,7 +563,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)setAppStoreButtonState:(AppStoreButtonState)anAppStoreButtonState animated:(BOOL)animated {
|
- (void)setAppStoreButtonState:(AppStoreButtonState)anAppStoreButtonState animated:(BOOL)animated {
|
||||||
appStoreButtonState_ = anAppStoreButtonState;
|
_appStoreButtonState = anAppStoreButtonState;
|
||||||
|
|
||||||
switch (anAppStoreButtonState) {
|
switch (anAppStoreButtonState) {
|
||||||
case AppStoreButtonStateOffline:
|
case AppStoreButtonStateOffline:
|
||||||
@ -594,7 +587,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)storeButtonFired:(PSStoreButton *)button {
|
- (void)storeButtonFired:(PSStoreButton *)button {
|
||||||
switch (appStoreButtonState_) {
|
switch (_appStoreButtonState) {
|
||||||
case AppStoreButtonStateCheck:
|
case AppStoreButtonStateCheck:
|
||||||
[_updateManager checkForUpdateShowFeedback:YES];
|
[_updateManager checkForUpdateShowFeedback:YES];
|
||||||
break;
|
break;
|
||||||
|
58
Classes/BITUpdateViewControllerPrivate.h
Normal file
58
Classes/BITUpdateViewControllerPrivate.h
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* Author: Andreas Linde <mail@andreaslinde.de>
|
||||||
|
* Peter Steinberger
|
||||||
|
*
|
||||||
|
* Copyright (c) 2012 HockeyApp, Bit Stadium GmbH.
|
||||||
|
* Copyright (c) 2011 Andreas Linde, Peter Steinberger.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person
|
||||||
|
* obtaining a copy of this software and associated documentation
|
||||||
|
* files (the "Software"), to deal in the Software without
|
||||||
|
* restriction, including without limitation the rights to use,
|
||||||
|
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following
|
||||||
|
* conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be
|
||||||
|
* included in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||||
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||||
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
AppStoreButtonStateOffline,
|
||||||
|
AppStoreButtonStateCheck,
|
||||||
|
AppStoreButtonStateSearching,
|
||||||
|
AppStoreButtonStateUpdate,
|
||||||
|
AppStoreButtonStateInstalling
|
||||||
|
} AppStoreButtonState;
|
||||||
|
|
||||||
|
|
||||||
|
@class BITUpdateManager;
|
||||||
|
|
||||||
|
@protocol PSStoreButtonDelegate;
|
||||||
|
|
||||||
|
@interface BITUpdateViewController() <PSStoreButtonDelegate> {
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (nonatomic, retain) BITUpdateManager *updateManager;
|
||||||
|
@property (nonatomic, readwrite) BOOL modal;
|
||||||
|
@property (nonatomic, readwrite) BOOL modalAnimated;
|
||||||
|
|
||||||
|
@property (nonatomic, assign) AppStoreButtonState appStoreButtonState;
|
||||||
|
|
||||||
|
- (id)init:(BITUpdateManager *)newUpdateManager modal:(BOOL)newModal;
|
||||||
|
- (id)init;
|
||||||
|
|
||||||
|
@end
|
@ -9,6 +9,7 @@
|
|||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
1E01118115BB6311007002AC /* BITUpdateManagerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E01118015BB62FE007002AC /* BITUpdateManagerPrivate.h */; };
|
1E01118115BB6311007002AC /* BITUpdateManagerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E01118015BB62FE007002AC /* BITUpdateManagerPrivate.h */; };
|
||||||
1E01118215BB6314007002AC /* BITCrashManagerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E01117E15BB6228007002AC /* BITCrashManagerPrivate.h */; };
|
1E01118215BB6314007002AC /* BITCrashManagerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E01117E15BB6228007002AC /* BITCrashManagerPrivate.h */; };
|
||||||
|
1E01118D15BB83FB007002AC /* BITUpdateViewControllerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E01118C15BB83F6007002AC /* BITUpdateViewControllerPrivate.h */; };
|
||||||
1E27EF2515BB5033000AE995 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; };
|
1E27EF2515BB5033000AE995 /* HockeySDK.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1E59555F15B6F80E00A03429 /* HockeySDK.strings */; };
|
||||||
1E40BCB515A3487500BD64D9 /* BITCrashManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB415A3487500BD64D9 /* BITCrashManagerDelegate.h */; settings = {ATTRIBUTES = (); }; };
|
1E40BCB515A3487500BD64D9 /* BITCrashManagerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB415A3487500BD64D9 /* BITCrashManagerDelegate.h */; settings = {ATTRIBUTES = (); }; };
|
||||||
1E40BCB915A3494400BD64D9 /* BITCrashReportTextFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB715A3494400BD64D9 /* BITCrashReportTextFormatter.h */; };
|
1E40BCB915A3494400BD64D9 /* BITCrashReportTextFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E40BCB715A3494400BD64D9 /* BITCrashReportTextFormatter.h */; };
|
||||||
@ -163,6 +164,7 @@
|
|||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
1E01117E15BB6228007002AC /* BITCrashManagerPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BITCrashManagerPrivate.h; sourceTree = "<group>"; };
|
1E01117E15BB6228007002AC /* BITCrashManagerPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BITCrashManagerPrivate.h; sourceTree = "<group>"; };
|
||||||
1E01118015BB62FE007002AC /* BITUpdateManagerPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BITUpdateManagerPrivate.h; sourceTree = "<group>"; };
|
1E01118015BB62FE007002AC /* BITUpdateManagerPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BITUpdateManagerPrivate.h; sourceTree = "<group>"; };
|
||||||
|
1E01118C15BB83F6007002AC /* BITUpdateViewControllerPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BITUpdateViewControllerPrivate.h; sourceTree = "<group>"; };
|
||||||
1E40BCB415A3487500BD64D9 /* BITCrashManagerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITCrashManagerDelegate.h; sourceTree = "<group>"; };
|
1E40BCB415A3487500BD64D9 /* BITCrashManagerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITCrashManagerDelegate.h; sourceTree = "<group>"; };
|
||||||
1E40BCB715A3494400BD64D9 /* BITCrashReportTextFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITCrashReportTextFormatter.h; sourceTree = "<group>"; };
|
1E40BCB715A3494400BD64D9 /* BITCrashReportTextFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BITCrashReportTextFormatter.h; sourceTree = "<group>"; };
|
||||||
1E40BCB815A3494400BD64D9 /* BITCrashReportTextFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITCrashReportTextFormatter.m; sourceTree = "<group>"; };
|
1E40BCB815A3494400BD64D9 /* BITCrashReportTextFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BITCrashReportTextFormatter.m; sourceTree = "<group>"; };
|
||||||
@ -347,6 +349,7 @@
|
|||||||
1E5955D515B72ED500A03429 /* BITUpdateManager.m */,
|
1E5955D515B72ED500A03429 /* BITUpdateManager.m */,
|
||||||
1E5955EE15B7752200A03429 /* BITUpdateManagerDelegate.h */,
|
1E5955EE15B7752200A03429 /* BITUpdateManagerDelegate.h */,
|
||||||
1E5955E215B751ED00A03429 /* BITUpdateViewController.h */,
|
1E5955E215B751ED00A03429 /* BITUpdateViewController.h */,
|
||||||
|
1E01118C15BB83F6007002AC /* BITUpdateViewControllerPrivate.h */,
|
||||||
1E5955E615B751FB00A03429 /* BITUpdateViewController.m */,
|
1E5955E615B751FB00A03429 /* BITUpdateViewController.m */,
|
||||||
1E5955D115B72E5300A03429 /* BITCrashManager.h */,
|
1E5955D115B72E5300A03429 /* BITCrashManager.h */,
|
||||||
1E01117E15BB6228007002AC /* BITCrashManagerPrivate.h */,
|
1E01117E15BB6228007002AC /* BITCrashManagerPrivate.h */,
|
||||||
@ -407,6 +410,7 @@
|
|||||||
1E01118115BB6311007002AC /* BITUpdateManagerPrivate.h in Headers */,
|
1E01118115BB6311007002AC /* BITUpdateManagerPrivate.h in Headers */,
|
||||||
1E01118215BB6314007002AC /* BITCrashManagerPrivate.h in Headers */,
|
1E01118215BB6314007002AC /* BITCrashManagerPrivate.h in Headers */,
|
||||||
1E5955F215B77F5100A03429 /* NSString+BITHockeyAdditions.h in Headers */,
|
1E5955F215B77F5100A03429 /* NSString+BITHockeyAdditions.h in Headers */,
|
||||||
|
1E01118D15BB83FB007002AC /* BITUpdateViewControllerPrivate.h in Headers */,
|
||||||
1E5955F315B77F5600A03429 /* PSAppStoreHeader.h in Headers */,
|
1E5955F315B77F5600A03429 /* PSAppStoreHeader.h in Headers */,
|
||||||
1E5954B615B6E17700A03429 /* PSStoreButton.h in Headers */,
|
1E5954B615B6E17700A03429 /* PSStoreButton.h in Headers */,
|
||||||
1E5955F415B77F5E00A03429 /* PSWebTableViewCell.h in Headers */,
|
1E5955F415B77F5E00A03429 /* PSWebTableViewCell.h in Headers */,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user