mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
Allow BITFeedbackActivity title and image to be customized
This commit is contained in:
parent
b9a6369ed2
commit
1bc0c2db64
@ -47,12 +47,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)activityTitle {
|
- (NSString *)activityTitle {
|
||||||
|
if ([BITHockeyManager sharedHockeyManager].feedbackManager.activityTitle)
|
||||||
|
return [BITHockeyManager sharedHockeyManager].feedbackManager.activityTitle;
|
||||||
|
|
||||||
NSString *appName = bit_appName(BITHockeyLocalizedString(@"HockeyFeedbackActivityAppPlaceholder"));
|
NSString *appName = bit_appName(BITHockeyLocalizedString(@"HockeyFeedbackActivityAppPlaceholder"));
|
||||||
|
|
||||||
return [NSString stringWithFormat:BITHockeyLocalizedString(@"HockeyFeedbackActivityButtonTitle"), appName];
|
return [NSString stringWithFormat:BITHockeyLocalizedString(@"HockeyFeedbackActivityButtonTitle"), appName];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (UIImage *)activityImage {
|
- (UIImage *)activityImage {
|
||||||
|
if ([BITHockeyManager sharedHockeyManager].feedbackManager.activityImage)
|
||||||
|
return [BITHockeyManager sharedHockeyManager].feedbackManager.activityImage;
|
||||||
|
|
||||||
return bit_imageNamed(@"feedbackActiviy.png", BITHOCKEYSDK_BUNDLE);
|
return bit_imageNamed(@"feedbackActiviy.png", BITHOCKEYSDK_BUNDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,4 +92,30 @@ typedef enum {
|
|||||||
*/
|
*/
|
||||||
- (BITFeedbackComposeViewController *)feedbackComposeViewController;
|
- (BITFeedbackComposeViewController *)feedbackComposeViewController;
|
||||||
|
|
||||||
|
|
||||||
|
///-----------------------------------------------------------------------------
|
||||||
|
/// @name BITFeedbackActivity settings
|
||||||
|
///-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Define the image shown when using `BITFeedbackActivity`
|
||||||
|
|
||||||
|
If not set a default icon is being used.
|
||||||
|
|
||||||
|
@see activityTitle
|
||||||
|
*/
|
||||||
|
@property (nonatomic, retain) UIImage *activityImage;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Define the title shown when using `BITFeedbackActivity`
|
||||||
|
|
||||||
|
If not set, a default string is shown by using the apps name
|
||||||
|
and adding the localized string "Feedback" to it.
|
||||||
|
|
||||||
|
@see activityImage
|
||||||
|
*/
|
||||||
|
@property (nonatomic, retain) NSString *activityTitle;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -79,6 +79,9 @@
|
|||||||
_token = nil;
|
_token = nil;
|
||||||
_lastMessageID = nil;
|
_lastMessageID = nil;
|
||||||
|
|
||||||
|
_activityImage = nil;
|
||||||
|
_activityTitle = nil;
|
||||||
|
|
||||||
self.feedbackList = [NSMutableArray array];
|
self.feedbackList = [NSMutableArray array];
|
||||||
|
|
||||||
_fileManager = [[NSFileManager alloc] init];
|
_fileManager = [[NSFileManager alloc] init];
|
||||||
@ -124,6 +127,9 @@
|
|||||||
[_feedbackDir release], _feedbackDir = nil;
|
[_feedbackDir release], _feedbackDir = nil;
|
||||||
[_settingsFile release], _settingsFile = nil;
|
[_settingsFile release], _settingsFile = nil;
|
||||||
|
|
||||||
|
[_activityImage release];
|
||||||
|
[_activityTitle release];
|
||||||
|
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user