Skip to content

Commit 0ca1745

Browse files
author
panshiyu
committed
bugfix
1 parent 5a8348d commit 0ca1745

5 files changed

Lines changed: 24 additions & 4 deletions

File tree

Coding_iOS.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,7 @@
778778
FEC419251B53A39B00C498F5 /* CSSearchVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FEC419241B53A39B00C498F5 /* CSSearchVC.m */; };
779779
FEC419281B53A92600C498F5 /* CSSearchModel.m in Sources */ = {isa = PBXBuildFile; fileRef = FEC419271B53A92600C498F5 /* CSSearchModel.m */; };
780780
FEC4192B1B53A9E300C498F5 /* TMCacheExtend.m in Sources */ = {isa = PBXBuildFile; fileRef = FEC4192A1B53A9E300C498F5 /* TMCacheExtend.m */; };
781+
FEDC99451B6B3D6900C51EA7 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = FEDC99441B6B3D6900C51EA7 /* [email protected] */; };
781782
FEF35EC71B56A4A50000280F /* CSHotTopicVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FEF35EC61B56A4A50000280F /* CSHotTopicVC.m */; };
782783
FEF35ECA1B56A4B40000280F /* CSMyTopicVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FEF35EC91B56A4B40000280F /* CSMyTopicVC.m */; };
783784
FEF35ECD1B56A8B70000280F /* CSTopicModel.m in Sources */ = {isa = PBXBuildFile; fileRef = FEF35ECC1B56A8B70000280F /* CSTopicModel.m */; };
@@ -1979,6 +1980,7 @@
19791980
FEC419271B53A92600C498F5 /* CSSearchModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSSearchModel.m; sourceTree = "<group>"; };
19801981
FEC419291B53A9E300C498F5 /* TMCacheExtend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TMCacheExtend.h; sourceTree = "<group>"; };
19811982
FEC4192A1B53A9E300C498F5 /* TMCacheExtend.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TMCacheExtend.m; sourceTree = "<group>"; };
1983+
FEDC99441B6B3D6900C51EA7 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
19821984
FEF35EC51B56A4A50000280F /* CSHotTopicVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSHotTopicVC.h; sourceTree = "<group>"; };
19831985
FEF35EC61B56A4A50000280F /* CSHotTopicVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSHotTopicVC.m; sourceTree = "<group>"; };
19841986
FEF35EC81B56A4B40000280F /* CSMyTopicVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSMyTopicVC.h; sourceTree = "<group>"; };
@@ -3347,6 +3349,7 @@
33473349
8ED2AAF919F60D5200607A1D /* [email protected] */,
33483350
8EF6433B19FE696B00F7EEB0 /* [email protected] */,
33493351
8EF6434F19FF4E1600F7EEB0 /* [email protected] */,
3352+
FEDC99441B6B3D6900C51EA7 /* [email protected] */,
33503353
4E4D6ABF1B252CD400FD2E49 /* [email protected] */,
33513354
4E4D6AC01B252CD400FD2E49 /* [email protected] */,
33523355
4EA679171A14BFA0001A0324 /* [email protected] */,
@@ -4426,6 +4429,7 @@
44264429
8E97CE621A0A3424006F9AD7 /* [email protected] in Resources */,
44274430
4E217F131A70EDC700F6DF88 /* SVWebViewControllerActivitySafari-iPad.png in Resources */,
44284431
8EF6435019FF4E1600F7EEB0 /* [email protected] in Resources */,
4432+
FEDC99451B6B3D6900C51EA7 /* [email protected] in Resources */,
44294433
4E94C5091B4D334B00EB668A /* [email protected] in Resources */,
44304434
8EA6D18519E240C40076D59C /* [email protected] in Resources */,
44314435
8EA6D18219E240C40076D59C /* [email protected] in Resources */,

Coding_iOS/Controllers/Topic/CSHotTopicVC.m

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
119119
NSDictionary *data = _topiclist[indexPath.row - 1];
120120
CSTopicCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier_TopicCell forIndexPath:indexPath];
121121
[cell updateDisplayByTopic:data];
122-
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:75];
122+
[tableView addLineforPlainCell:cell forRowAtIndexPath:indexPath withLeftSpace:12];
123123
return cell;
124124
}
125125

@@ -256,8 +256,16 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
256256

257257
- (void)updateDisplayByTopic:(NSDictionary*)data {
258258

259+
NSString *peopleCount = data[@"speackers"];
260+
if (!peopleCount) {
261+
peopleCount = data[@"speakers"];
262+
}
263+
if (!peopleCount) {
264+
peopleCount = @"0";
265+
}
266+
259267
_nameLabel.text = [NSString stringWithFormat:@"#%@#",data[@"name"]];
260-
_userCountLabel.text = [NSString stringWithFormat:@"%@人参与",(data[@"speackers"]?data[@"speackers"]:@(0))];
268+
_userCountLabel.text = [NSString stringWithFormat:@"%@人参与",peopleCount];
261269

262270
if (data[@"hot_tweet"]) {
263271
Tweet *tweet = [NSObject objectOfClass:@"Tweet" fromJSON:data[@"hot_tweet"]];

Coding_iOS/Controllers/Topic/CSTopicDetailVC.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,12 @@ - (void)sendTweet{
352352
@implementation CSTopTweetDescCell
353353

354354
- (void)updateUI {
355+
self.imageView.frame = CGRectMake(12, 0, 15, 15);
356+
self.imageView.image = [UIImage imageNamed:@"icon_topic_hotTop"];
357+
self.imageView.centerY = 18;
358+
355359
self.textLabel.backgroundColor = [UIColor clearColor];
356-
self.textLabel.frame = CGRectMake(12, 0, 100, 36);
360+
self.textLabel.frame = CGRectMake(30, 0, 100, 36);
357361
self.textLabel.font = [UIFont systemFontOfSize:12];
358362
self.textLabel.textColor = [UIColor colorWithHexString:@"0x666666"];
359363
self.textLabel.text = @"置顶话题";
1.15 KB
Loading

Coding_iOS/Util/Manager/Coding_NetAPIManager.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2090,7 +2090,11 @@ - (void)request_WatchedTopicsWithUserGK:(NSString *)userGK page:(NSInteger)page
20902090
}
20912091

20922092
- (void)request_Topic_DoWatch_WithUrl:(NSString *)url andBlock:(void (^)(id data, NSError *error))block{
2093-
[[CodingNetAPIClient sharedJsonClient] requestJsonDataWithPath:url withParams:nil withMethodType:Post andBlock:^(id data, NSError *error) {
2093+
2094+
BOOL isUnwatched = [url hasPrefix:@"unwatched"];
2095+
NetworkMethod method = isUnwatched ? Delete : Post;
2096+
2097+
[[CodingNetAPIClient sharedJsonClient] requestJsonDataWithPath:url withParams:nil withMethodType:method andBlock:^(id data, NSError *error) {
20942098
if (data) {
20952099
block(data, nil);
20962100
}else{

0 commit comments

Comments
 (0)