Skip to content

Commit 231918d

Browse files
committed
GA & 提示语中有富文本的 bug & MR 被授权后,作者可以合并 & 话题页面 UI
1 parent c1fe738 commit 231918d

File tree

14 files changed

+121
-79
lines changed

14 files changed

+121
-79
lines changed

Coding_iOS.xcodeproj/project.pbxproj

+20
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
4E0BD8861B6C7F0A0061CAA6 /* TMCacheExtend.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E0BD87F1B6C7F0A0061CAA6 /* TMCacheExtend.m */; };
100100
4E0BD88A1B6C7F5B0061CAA6 /* TopicHotkeyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E0BD8891B6C7F5B0061CAA6 /* TopicHotkeyView.m */; };
101101
4E0EF6EC1BF42E4B00F2FCC8 /* task_activity_icon_update_label@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4E0EF6EB1BF42E4B00F2FCC8 /* task_activity_icon_update_label@2x.png */; };
102+
4E1209FC1C8814A20087BDB3 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 4E1209FB1C8814A20087BDB3 /* GoogleService-Info.plist */; };
102103
4E15C7D01A26D2F000FB8DAD /* FolderToMoveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E15C7CF1A26D2F000FB8DAD /* FolderToMoveViewController.m */; };
103104
4E15C7D61A271A6300FB8DAD /* EaseToolBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E15C7D51A271A6300FB8DAD /* EaseToolBar.m */; };
104105
4E19E7071BCE03CD00C66DC6 /* UIActionSheet+Front.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E19E7061BCE03CD00C66DC6 /* UIActionSheet+Front.m */; };
@@ -1220,6 +1221,7 @@
12201221
4E0BD8881B6C7F5B0061CAA6 /* TopicHotkeyView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TopicHotkeyView.h; sourceTree = "<group>"; };
12211222
4E0BD8891B6C7F5B0061CAA6 /* TopicHotkeyView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TopicHotkeyView.m; sourceTree = "<group>"; };
12221223
4E0EF6EB1BF42E4B00F2FCC8 /* task_activity_icon_update_label@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "task_activity_icon_update_label@2x.png"; sourceTree = "<group>"; };
1224+
4E1209FB1C8814A20087BDB3 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
12231225
4E15C7CE1A26D2F000FB8DAD /* FolderToMoveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FolderToMoveViewController.h; sourceTree = "<group>"; };
12241226
4E15C7CF1A26D2F000FB8DAD /* FolderToMoveViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FolderToMoveViewController.m; sourceTree = "<group>"; };
12251227
4E15C7D41A271A6300FB8DAD /* EaseToolBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EaseToolBar.h; sourceTree = "<group>"; };
@@ -4841,6 +4843,7 @@
48414843
4EE083DB1ADB736800CA342E /* service_terms.html */,
48424844
4E753D471B8DA099003A00B9 /* diff-ios.html */,
48434845
8E1C3DF519E7F4CA00EF3032 /* address.json */,
4846+
4E1209FB1C8814A20087BDB3 /* GoogleService-Info.plist */,
48444847
);
48454848
path = Resources;
48464849
sourceTree = "<group>";
@@ -5364,6 +5367,7 @@
53645367
8E47700D198770E700997D05 /* Frameworks */,
53655368
8E47700E198770E700997D05 /* Resources */,
53665369
96A9263FF11A4AA8B5F6BB6B /* Copy Pods Resources */,
5370+
2BE7A354A6FF9E5410B304BF /* Embed Pods Frameworks */,
53675371
);
53685372
buildRules = (
53695373
);
@@ -5951,6 +5955,7 @@
59515955
D0C447E11C02DB8900DC1C4B /* project_selected@3x.png in Resources */,
59525956
D0C447E51C02DB8900DC1C4B /* tweet_selected@3x.png in Resources */,
59535957
4E6383AC1B3262D300D98648 /* taskPriority3@2x.png in Resources */,
5958+
4E1209FC1C8814A20087BDB3 /* GoogleService-Info.plist in Resources */,
59545959
4E53EB5A1AFB090E0034FE1C /* nav_page_unselected@2x.png in Resources */,
59555960
8BDF9AB91B7474990093BF2C /* user_info_topic@2x.png in Resources */,
59565961
);
@@ -5974,6 +5979,21 @@
59745979
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
59755980
showEnvVarsInLog = 0;
59765981
};
5982+
2BE7A354A6FF9E5410B304BF /* Embed Pods Frameworks */ = {
5983+
isa = PBXShellScriptBuildPhase;
5984+
buildActionMask = 2147483647;
5985+
files = (
5986+
);
5987+
inputPaths = (
5988+
);
5989+
name = "Embed Pods Frameworks";
5990+
outputPaths = (
5991+
);
5992+
runOnlyForDeploymentPostprocessing = 0;
5993+
shellPath = /bin/sh;
5994+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
5995+
showEnvVarsInLog = 0;
5996+
};
59775997
96A9263FF11A4AA8B5F6BB6B /* Copy Pods Resources */ = {
59785998
isa = PBXShellScriptBuildPhase;
59795999
buildActionMask = 2147483647;

Coding_iOS/.DS_Store

0 Bytes
Binary file not shown.

Coding_iOS/AppDelegate.m

+15
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#import <UMengSocial/UMSocialQQHandler.h>
3636
#import <evernote-cloud-sdk-ios/ENSDK/ENSDK.h>
3737
#import "UMSocialSinaSSOHandler.h"
38+
#import <Google/Analytics.h>
3839

3940
#import "Tweet.h"
4041
#import "sys/utsname.h"
@@ -127,6 +128,8 @@ - (void)completionStartAnimationWithOptions:(NSDictionary *)launchOptions{
127128

128129
// UMENG 统计
129130
[MobClick startWithAppkey:kUmeng_AppKey reportPolicy:BATCH channelId:nil];
131+
// Google Analytics
132+
[self registerGA];
130133

131134
// UMENG Social Account
132135
[UMSocialData setAppKey:kUmeng_AppKey];
@@ -171,6 +174,18 @@ - (void)completionStartAnimationWithOptions:(NSDictionary *)launchOptions{
171174
[XGPush handleLaunching:launchOptions];
172175
}
173176

177+
- (void)registerGA{
178+
// Configure tracker from GoogleService-Info.plist.
179+
NSError *configureError;
180+
[[GGLContext sharedInstance] configureWithError:&configureError];
181+
NSAssert(!configureError, @"Error configuring Google services: %@", configureError);
182+
183+
// Optional: configure GAI options.
184+
GAI *gai = [GAI sharedInstance];
185+
gai.trackUncaughtExceptions = YES; // report uncaught exceptions
186+
gai.logger.logLevel = kGAILogLevelError; // remove before app release
187+
}
188+
174189
- (void)applicationWillResignActive:(UIApplication *)application
175190
{
176191
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.

Coding_iOS/Controllers/PRDetailViewController.m

+2-1
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ - (void)viewDidLoad{
8888
}
8989

9090
- (void)configBottomView{
91-
BOOL canAction = _curMRPRInfo.can_edit.boolValue;
9291
BOOL canCancel = [_curMRPRInfo.mrpr.author.global_key isEqualToString:[Login curLoginUser].global_key];
92+
BOOL canAction = _curMRPRInfo.can_edit.boolValue ||(canCancel && _curMRPRInfo.mrpr.granted.boolValue);//有权限 || (作者身份 && 被授权)
93+
9394
BOOL hasBottomView = _curMRPRInfo.mrpr.status <= MRPRStatusCannotMerge && (canAction || canCancel);
9495

9596
if (!hasBottomView) {

Coding_iOS/Controllers/RootControllers/BaseViewController.m

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#import "CSTopicDetailVC.h"
3232
#import "CodeViewController.h"
3333
#import "Ease_2FA.h"
34+
#import <Google/Analytics.h>
3435

3536
#import "UnReadManager.h"
3637

@@ -73,6 +74,10 @@ - (void)viewDidLoad{
7374
&& !([self supportedInterfaceOrientations] & UIInterfaceOrientationMaskLandscapeLeft)) {
7475
[self forceChangeToOrientation:UIInterfaceOrientationPortrait];
7576
}
77+
// GA
78+
id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker];
79+
[tracker set:kGAIScreenName value:[NSString stringWithUTF8String:object_getClassName(self)]];
80+
[tracker send:[[GAIDictionaryBuilder createScreenView] build]];
7681
}
7782

7883
- (void)tabBarItemClicked{

Coding_iOS/Controllers/Topic/CSTopicDetailVC.m

+3-3
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ - (void)refreshTopTweet {
112112
- (void)refreshheader {
113113
[[Coding_NetAPIManager sharedManager]request_TopicDetailsWithTopicID:_topicID block:^(id data, NSError *error) {
114114
if (data) {
115+
self.title = data[@"name"];
116+
115117
[self.tableHeader updateWithTopic:data];
116118
}
117119
}];
@@ -281,8 +283,6 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
281283

282284
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
283285
[tableView deselectRowAtIndexPath:indexPath animated:YES];
284-
285-
286286
if (indexPath.section == 0 && indexPath.row ==0) {
287287
return;
288288
}
@@ -385,7 +385,7 @@ - (void) setupUI {
385385

386386
[self.view addSubview:tableView];
387387

388-
CSTopicHeaderView *header = [[CSTopicHeaderView alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width, 191)];
388+
CSTopicHeaderView *header = [[CSTopicHeaderView alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width, 115)];
389389
header.parentVC = self;
390390
tableView.tableHeaderView = header;
391391
[tableView mas_makeConstraints:^(MASConstraintMaker *make) {

Coding_iOS/Controllers/Topic/CSTopicHeaderView.m

+19-67
Original file line numberDiff line numberDiff line change
@@ -13,59 +13,35 @@
1313

1414
@interface CSTopicHeaderView ()
1515
@property (nonatomic,strong)NSDictionary *refTopic;
16-
@property (nonatomic,strong)UIButton *rightBtn;
16+
//@property (nonatomic,strong)UIButton *rightBtn;
1717
@property (nonatomic,strong)NSMutableArray *avatalist;
1818
@property (nonatomic,assign)BOOL watched;
1919
@end
2020

2121
@implementation CSTopicHeaderView{
22-
UILabel *_nameLabel;
22+
// UILabel *_nameLabel;
2323
UILabel *_userCountLabel;
2424
}
2525

2626
- (id)initWithFrame:(CGRect)frame {
2727
self = [super initWithFrame:frame];
2828
if (self) {
29-
self.backgroundColor = [UIColor colorWithHexString:@"0xeeeeee"];
30-
31-
//count区域
32-
_nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(12, 12, kScreen_Width - 110, 18)];//12
33-
_nameLabel.font = [UIFont boldSystemFontOfSize:15];
34-
_nameLabel.backgroundColor = [UIColor clearColor];
35-
_nameLabel.textColor = [UIColor colorWithHexString:@"0x222222"];
36-
_nameLabel.textAlignment = NSTextAlignmentLeft;
37-
[self addSubview:_nameLabel];
38-
39-
_userCountLabel = [[UILabel alloc] initWithFrame:CGRectMake(12, 36, _nameLabel.width, 12)];
40-
_userCountLabel.font = [UIFont systemFontOfSize:12];
41-
_userCountLabel.backgroundColor = [UIColor clearColor];
42-
_userCountLabel.textColor = [UIColor colorWithHexString:@"0x999999"];
43-
_userCountLabel.textAlignment = NSTextAlignmentLeft;
44-
[self addSubview:_userCountLabel];
45-
46-
_rightBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 80, 32)];
47-
_rightBtn.centerY = 58/2;
48-
_rightBtn.right = kScreen_Width - 13;
49-
[_rightBtn addTarget:self action:@selector(rightBtnClicked) forControlEvents:UIControlEventTouchUpInside];
50-
[self addSubview:_rightBtn];
51-
52-
53-
//头像区域
54-
UIView *subView = [[UIView alloc] initWithFrame:CGRectMake(0, 58, kScreen_Width, 115)];
55-
subView.backgroundColor = [UIColor whiteColor];
56-
[self addSubview:subView];
29+
self.backgroundColor = [UIColor whiteColor];
30+
self.clipsToBounds = YES;
5731

5832
UIView *sepLine = [[UIView alloc] initWithFrame:CGRectMake(12, 41, kScreen_Width - 12, 0.5)];
5933
sepLine.backgroundColor = [UIColor colorWithHexString:@"0xdddddd"];
60-
[subView addSubview:sepLine];
34+
[self addSubview:sepLine];
6135

62-
UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(12, 15, 150, 15)];
63-
label1.font = [UIFont systemFontOfSize:13];
64-
label1.backgroundColor = [UIColor clearColor];
65-
label1.textColor = [UIColor colorWithHexString:@"0x333333"];
66-
label1.textAlignment = NSTextAlignmentLeft;
67-
label1.text = @"热门参与者";
68-
[subView addSubview:label1];
36+
_userCountLabel = ({
37+
UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(12, 15, 150, 15)];
38+
label1.font = [UIFont systemFontOfSize:13];
39+
label1.backgroundColor = [UIColor clearColor];
40+
label1.textColor = [UIColor colorWithHexString:@"0x333333"];
41+
label1.textAlignment = NSTextAlignmentLeft;
42+
[self addSubview:label1];
43+
label1;
44+
});
6945

7046
UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake(0, 15, 100, 15)];
7147
label2.right = kScreen_Width - 25;
@@ -74,17 +50,17 @@ - (id)initWithFrame:(CGRect)frame {
7450
label2.textColor = [UIColor colorWithHexString:@"0x999999"];
7551
label2.textAlignment = NSTextAlignmentRight;
7652
label2.text = @"查看全部";
77-
[subView addSubview:label2];
53+
[self addSubview:label2];
7854

7955
UIImageView *arrow = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"task_icon_arrow"]];
8056
arrow.centerY = label2.centerY;
8157
arrow.right = kScreen_Width - 12;
82-
[subView addSubview:arrow];
58+
[self addSubview:arrow];
8359

8460
UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, kScreen_Width, 42)];
8561
btn.backgroundColor = [UIColor clearColor];
8662
[btn addTarget:self action:@selector(goAllUsers) forControlEvents:UIControlEventTouchUpInside];
87-
[subView addSubview:btn];
63+
[self addSubview:btn];
8864

8965
_avatalist = nil;
9066
}
@@ -97,33 +73,9 @@ - (void)goAllUsers {
9773
[self.parentVC.navigationController pushViewController:vc animated:YES];
9874
}
9975

100-
- (void)rightBtnClicked {
101-
if (!self.refTopic) {
102-
return;
103-
}
104-
105-
NSString *path = [NSString stringWithFormat:@"api/tweet_topic/%@/%@", _refTopic[@"id"], (_watched? @"unwatch":@"watch")];
106-
107-
[[Coding_NetAPIManager sharedManager]request_Topic_DoWatch_WithUrl:path andBlock:^(id data, NSError *error) {
108-
if (data) {
109-
self.watched = !self.watched;
110-
NSString *imageName = self.watched? @"btn_followed_yes":@"btn_followed_not";
111-
[self.rightBtn setImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
112-
}
113-
}];
114-
115-
}
116-
11776
- (void)updateWithTopic:(NSDictionary *)data {
118-
_watched = [data[@"watched"] boolValue];
11977
_refTopic = data;
120-
_nameLabel.text = [NSString stringWithFormat:@"#%@#",data[@"name"]];
121-
122-
_userCountLabel.text = [NSString stringWithFormat:@"%@人参与/%@人关注",data[@"speackers"],data[@"watchers"]];
123-
124-
NSString *imageName = self.watched? @"btn_followed_yes":@"btn_followed_not";
125-
[_rightBtn setImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
126-
78+
_userCountLabel.text = [NSString stringWithFormat:@"%@人参与",data[@"speackers"]];
12779
}
12880

12981
- (void)updateWithJoinedUsers:(NSArray*)userlist {
@@ -132,7 +84,7 @@ - (void)updateWithJoinedUsers:(NSArray*)userlist {
13284

13385
for (int i=0; i<userlist.count; i++) {
13486
User *user = userlist[i];
135-
UIImageView *iconView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 114, 42, 42)];
87+
UIImageView *iconView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 57, 42, 42)];
13688
[iconView doCircleFrame];
13789
iconView.left = 16 + i *(9 + 42);
13890
if (iconView.right > kScreen_Width) {

Coding_iOS/Models/MRPR.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ typedef NS_ENUM(NSInteger, MRPRStatus) {
1818
};
1919

2020
@interface MRPR : NSObject
21-
@property (strong, nonatomic) NSNumber *id, *iid, *srcExist, *comment_count;
21+
@property (strong, nonatomic) NSNumber *id, *iid, *srcExist, *comment_count, *granted;
2222
@property (strong, nonatomic) NSString *title, *path, *srcBranch, *desBranch, *merge_status, *src_owner_name,*source_branch,*target_branch;
2323
@property (strong, nonatomic) NSString *des_owner_name, *des_project_name;
2424
@property (strong, nonatomic) User *author, *action_author;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>TRACKING_ID</key>
6+
<string>UA-65952334-2</string>
7+
<key>PLIST_VERSION</key>
8+
<string>1</string>
9+
<key>BUNDLE_ID</key>
10+
<string>net.coding.CodingForiOS</string>
11+
<key>IS_ADS_ENABLED</key>
12+
<false/>
13+
<key>IS_ANALYTICS_ENABLED</key>
14+
<true/>
15+
<key>IS_APPINVITE_ENABLED</key>
16+
<false/>
17+
<key>IS_GCM_ENABLED</key>
18+
<false/>
19+
<key>IS_SIGNIN_ENABLED</key>
20+
<false/>
21+
<key>GOOGLE_APP_ID</key>
22+
<string>1:659730986911:ios:54eaa91e4b6886da</string>
23+
<key>PROJECT_ID</key>
24+
<string>coding-ios</string>
25+
</dict>
26+
</plist>

Coding_iOS/Util/Manager/Coding_NetAPIManager.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -1443,8 +1443,8 @@ - (void)request_ChangeWatcher:(User *)watcher ofTask:(Task *)task andBlock:(void
14431443

14441444
#pragma mark User
14451445
- (void)request_AddUser:(User *)user ToProject:(Project *)project andBlock:(void (^)(id data, NSError *error))block{
1446-
// 一次添加多个成员(逗号分隔):users=102,4
1447-
[[CodingNetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"api/project/%ld/members/add", project.id.longValue] withParams:@{@"users" : user.id} withMethodType:Post andBlock:^(id data, NSError *error) {
1446+
// 一次添加多个成员(逗号分隔):users=102,4 (以后只支持 gk,不支持 id 了)
1447+
[[CodingNetAPIClient sharedJsonClient] requestJsonDataWithPath:[NSString stringWithFormat:@"api/project/%ld/members/add", project.id.longValue] withParams:@{@"users" : user.global_key} withMethodType:Post andBlock:^(id data, NSError *error) {
14481448
if (data) {
14491449
[MobClick event:kUmeng_Event_Request_ActionOfServer label:@"项目_添加成员"];
14501450

Coding_iOS/Util/OC_Category/NSObject+Common.m

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ + (NSString *)tipFromError:(NSError *)error{
2828
NSUInteger num = [msgArray count];
2929
for (int i = 0; i < num; i++) {
3030
NSString *msgStr = [msgArray objectAtIndex:i];
31+
HtmlMedia *media = [HtmlMedia htmlMediaWithString:msgStr showType:MediaShowTypeAll];
32+
msgStr = media.contentDisplay;
3133
if (i+1 < num) {
3234
[tipStr appendString:[NSString stringWithFormat:@"%@\n", msgStr]];
3335
}else{

Coding_iOS/Views/Cell/TweetCell.m

+4-3
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
213213
}
214214
- (void)setTweet:(Tweet *)tweet needTopView:(BOOL)needTopView{
215215
_tweet = tweet;
216-
_like_reward_users = [_tweet like_reward_users];
217216
_needTopView = needTopView;
218-
219217
if (!_tweet) {
220218
return;
221219
}
220+
221+
_like_reward_users = [_tweet like_reward_users];
222222
BOOL isMineTweet = [_tweet.owner.global_key isEqualToString:[Login curLoginUser].global_key];
223223

224224
self.topView.hidden = !_needTopView;
@@ -263,7 +263,8 @@ - (void)setTweet:(Tweet *)tweet needTopView:(BOOL)needTopView{
263263
if (_tweet.htmlMedia.imageItems.count > 0) {
264264

265265
CGFloat mediaHeight = [TweetCell contentMediaHeightWithTweet:_tweet];
266-
[self.mediaView setFrame:CGRectMake(kTweetCell_PadingLeft, curBottomY, kTweetCell_ContentWidth, mediaHeight)];
266+
CGFloat mediaWidth = _tweet.htmlMedia.imageItems.count == 4? kTweetCell_ContentWidth - [TweetMediaItemCCell ccellSizeWithObj:_tweet.htmlMedia.imageItems.firstObject].width: kTweetCell_ContentWidth;
267+
[self.mediaView setFrame:CGRectMake(kTweetCell_PadingLeft, curBottomY, mediaWidth, mediaHeight)];
267268
[self.mediaView reloadData];
268269
self.mediaView.hidden = NO;
269270
curBottomY += mediaHeight;

Podfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ pod 'UMengSocial', '4.2.3'
2626
pod 'evernote-cloud-sdk-ios', '2.0.2'
2727
pod 'UMengAnalytics', '3.5.10'
2828

29-
pod 'FLEX', '~> 2.0', :configurations => ['Debug']
29+
pod 'FLEX', '~> 2.0', :configurations => ['Debug']
30+
pod 'Google/Analytics', '~> 1.0.0'

0 commit comments

Comments
 (0)