Skip to content

Commit a26c407

Browse files
committed
3.2.201508271530 功能提示根据 build 版本来判断 - 整理语音提示
1 parent 82baee4 commit a26c407

4 files changed

Lines changed: 12 additions & 22 deletions

File tree

Coding_iOS/Coding_iOS-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</dict>
3333
</array>
3434
<key>CFBundleVersion</key>
35-
<string>3.2.201508251030</string>
35+
<string>3.2.201508271530</string>
3636
<key>LSRequiresIPhoneOS</key>
3737
<true/>
3838
<key>NSAppTransportSecurity</key>

Coding_iOS/Util/Manager/FunctionTipsManager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ static NSString *kFunctionTipStr_CommitList = @"Code_CommitList";
1414
static NSString *kFunctionTipStr_Search = @"hasSearch";
1515
static NSString *kFunctionTipStr_HotTopic = @"HotTopic";
1616
static NSString *kFunctionTipStr_TweetTopic = @"TweetTopic";
17+
static NSString *kFunctionTipStr_VoiceMessage = @"VoiceMessage";
1718

1819
#import <Foundation/Foundation.h>
1920

Coding_iOS/Util/Manager/FunctionTipsManager.m

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,17 @@ - (instancetype)init
2929
self = [super init];
3030
if (self) {
3131
_tipsDict = [NSMutableDictionary dictionaryWithContentsOfFile:[self p_cacheFilePath]];
32-
if (![[_tipsDict valueForKey:@"version"] isEqualToString:kVersion_Coding]) {
33-
_tipsDict = [@{kFunctionTipStr_Version: kVersion_Coding,
32+
if (![[_tipsDict valueForKey:@"version"] isEqualToString:kVersionBuild_Coding]) {
33+
_tipsDict = [@{kFunctionTipStr_Version: kVersionBuild_Coding,
3434
//Function Need To Tip
3535
// kFunctionTipStr_MR: @(YES),
3636
// kFunctionTipStr_PR: @(YES),
3737
// kFunctionTipStr_ReadMe: @(YES),
3838
// kFunctionTipStr_CommitList: @(YES),
39-
kFunctionTipStr_Search: @(YES),
40-
kFunctionTipStr_HotTopic: @(YES),
41-
kFunctionTipStr_TweetTopic: @(YES),
39+
// kFunctionTipStr_Search: @(YES),
40+
// kFunctionTipStr_HotTopic: @(YES),
41+
// kFunctionTipStr_TweetTopic: @(YES),
42+
kFunctionTipStr_VoiceMessage: @(YES),
4243
} mutableCopy];
4344
[_tipsDict writeToFile:[self p_cacheFilePath] atomically:YES];
4445
}

Coding_iOS/Views/UIMessageInputView/UIMessageInputView.m

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#import "Coding_FileManager.h"
3333
#import <MBProgressHUD/MBProgressHUD.h>
3434
#import "MJPhotoBrowser.h"
35+
#import "FunctionTipsManager.h"
3536

3637
static NSMutableDictionary *_inputStrDict, *_inputMediaDict;
3738

@@ -521,10 +522,10 @@ - (void)customUIWithType:(UIMessageInputViewContentType)type{
521522
[_voiceButton addTarget:self action:@selector(voiceButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
522523
[self addSubview:_voiceButton];
523524

524-
if ([self needDisplayVoiceButtonRedpoint]) {
525+
if ([[FunctionTipsManager shareManager] needToTip:kFunctionTipStr_VoiceMessage]) {
525526
_voiceRedpointView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 7, 7)];
526527
_voiceRedpointView.center = CGPointMake(31, 5);
527-
_voiceRedpointView.backgroundColor = [UIColor colorWithRGBHex:0xFF3C30];
528+
_voiceRedpointView.backgroundColor = [UIColor colorWithRGBHex:0xf75288];
528529
_voiceRedpointView.layer.cornerRadius = _voiceRedpointView.frame.size.width/2;
529530
[_voiceButton addSubview:_voiceRedpointView];
530531
}
@@ -762,7 +763,7 @@ - (void)voiceButtonClicked:(id)sender {
762763
[_voiceRedpointView removeFromSuperview];
763764
self.voiceRedpointView = nil;
764765

765-
[self noDisplayVoiceButtonRedpoint];
766+
[[FunctionTipsManager shareManager] markTiped:kFunctionTipStr_VoiceMessage];
766767
}
767768
}
768769

@@ -1051,17 +1052,4 @@ - (UIImage *)backSpaceButtonImageForEmojiKeyboardView:(AGEmojiKeyboardView *)emo
10511052
return img;
10521053
}
10531054

1054-
#pragma mark - Redpoint
1055-
1056-
#define kInputViewVoiceButtonRedpoint @"InputViewVoiceButtonRedpoint"
1057-
1058-
- (BOOL)needDisplayVoiceButtonRedpoint {
1059-
return ![[NSUserDefaults standardUserDefaults] boolForKey:kInputViewVoiceButtonRedpoint];
1060-
}
1061-
1062-
- (void)noDisplayVoiceButtonRedpoint {
1063-
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kInputViewVoiceButtonRedpoint];
1064-
[[NSUserDefaults standardUserDefaults] synchronize];
1065-
}
1066-
10671055
@end

0 commit comments

Comments
 (0)