From 7cc8302a9e5ae265000851e6ff94246e837c8ecf Mon Sep 17 00:00:00 2001 From: chisj Date: Sat, 1 Dec 2012 13:38:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E8=AE=A2reload=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=B8=A6=E5=8F=82=E6=95=B0=E4=BD=86=E6=98=AF=E5=9C=A8=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E6=97=B6=E8=B0=83=E7=94=A8=E4=B8=8D=E4=BC=A0=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E7=9A=84=E4=B8=8D=E8=A7=84=E8=8C=83=E7=94=A8=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E5=AF=BC=E8=87=B4noRefresh=E5=80=BC?= =?UTF-8?q?=E9=9A=8F=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oschina/ActivesView.m | 2 +- oschina/FavoritesView.m | 2 +- oschina/FriendsView.m | 2 +- oschina/MessageSystemView.m | 2 +- oschina/MessageView.m | 2 +- oschina/NewsView.m | 2 +- oschina/PostsView.m | 2 +- oschina/TwitterView.m | 2 +- oschina/UserBlogsView.m | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/oschina/ActivesView.m b/oschina/ActivesView.m index c691f72..615b20f 100644 --- a/oschina/ActivesView.m +++ b/oschina/ActivesView.m @@ -422,7 +422,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath if ([Config Instance].isCookie) { if (!isLoading) { - [self performSelector:@selector(reload:)]; + [self reload:YES]; } } else { diff --git a/oschina/FavoritesView.m b/oschina/FavoritesView.m index 9a1eccd..a0d6534 100644 --- a/oschina/FavoritesView.m +++ b/oschina/FavoritesView.m @@ -243,7 +243,7 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath * int row = indexPath.row; if (row >= favorites.count) { if (!isLoading && !isLoadOver) { - [self performSelector:@selector(reload:)]; + [self reload:YES]; } } else diff --git a/oschina/FriendsView.m b/oschina/FriendsView.m index 2ea9d7e..46ce270 100644 --- a/oschina/FriendsView.m +++ b/oschina/FriendsView.m @@ -261,7 +261,7 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath * int row = [indexPath row]; if (row >= friends.count) { if (!isLoading) { - [self performSelector:@selector(reload:)]; + [self reload:YES]; } } diff --git a/oschina/MessageSystemView.m b/oschina/MessageSystemView.m index cfc1114..85f5ec9 100644 --- a/oschina/MessageSystemView.m +++ b/oschina/MessageSystemView.m @@ -631,7 +631,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath int row = [indexPath row]; if (row >= [comments count]) { if (!isLoading) { - [self performSelector:@selector(reload:)]; + [self reload:YES]; } } else { diff --git a/oschina/MessageView.m b/oschina/MessageView.m index 710045e..317d3ae 100644 --- a/oschina/MessageView.m +++ b/oschina/MessageView.m @@ -390,7 +390,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath else { if (!isLoading) { - [self performSelector:@selector(reload:)]; + [self reload:YES]; } } } diff --git a/oschina/NewsView.m b/oschina/NewsView.m index fb2366c..fd74c68 100644 --- a/oschina/NewsView.m +++ b/oschina/NewsView.m @@ -231,7 +231,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath int row = [indexPath row]; if (row >= [news count]) { if (!isLoading) { - [self performSelector:@selector(reload:)]; + [self reload:YES]; } } else { diff --git a/oschina/PostsView.m b/oschina/PostsView.m index c41381c..bef6020 100644 --- a/oschina/PostsView.m +++ b/oschina/PostsView.m @@ -314,7 +314,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath if (row >= [posts count]) { if (!isLoading) { - [self performSelector:@selector(reload:)]; + [self reload:YES]; } } else diff --git a/oschina/TwitterView.m b/oschina/TwitterView.m index e8a9a13..c296a15 100644 --- a/oschina/TwitterView.m +++ b/oschina/TwitterView.m @@ -407,7 +407,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath if (row >= [tweets count]) { //启动刷新 if (!isLoading) { - [self performSelector:@selector(reload:)]; + [self reload:YES]; } } else { diff --git a/oschina/UserBlogsView.m b/oschina/UserBlogsView.m index 99dec87..78c8a01 100644 --- a/oschina/UserBlogsView.m +++ b/oschina/UserBlogsView.m @@ -180,7 +180,7 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath * int row = [indexPath row]; if (row >= [blogs count]) { if (!isLoading) { - [self performSelector:@selector(reload:)]; + [self reload:YES]; } } else { From bb91b645a2c24ea6b8d5313f23685d097cc94197 Mon Sep 17 00:00:00 2001 From: chisj Date: Thu, 6 Dec 2012 17:12:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=E4=B8=8A=E4=B8=80=E6=AC=A1=E7=9A=84comm?= =?UTF-8?q?it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oschina/ActivesView.m | 7 ++++++- oschina/FavoritesView.m | 7 ++++++- oschina/FriendsView.m | 6 +++++- oschina/MessageSystemView.m | 7 ++++++- oschina/MessageView.m | 7 ++++++- oschina/NewsView.m | 7 ++++++- oschina/PostsView.m | 7 ++++++- oschina/TwitterView.m | 7 ++++++- oschina/UserBlogsView.m | 6 +++++- 9 files changed, 52 insertions(+), 9 deletions(-) diff --git a/oschina/ActivesView.m b/oschina/ActivesView.m index 615b20f..75c1392 100644 --- a/oschina/ActivesView.m +++ b/oschina/ActivesView.m @@ -107,6 +107,11 @@ - (void)clear [imageDownloadsInProgress removeAllObjects]; [tweetDownloadsInProgress removeAllObjects]; } + +- (void)reloadData:(id)noRefresh { + [self reload:[(NSNumber *)noRefresh boolValue]]; +} + - (void)reload:(BOOL)noRefresh { if (isLoading || isLoadOver) { @@ -422,7 +427,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath if ([Config Instance].isCookie) { if (!isLoading) { - [self reload:YES]; + [self performSelector:@selector(reloadData:) withObject:[NSNumber numberWithBool:YES]]; } } else { diff --git a/oschina/FavoritesView.m b/oschina/FavoritesView.m index a0d6534..6c1e825 100644 --- a/oschina/FavoritesView.m +++ b/oschina/FavoritesView.m @@ -50,6 +50,11 @@ -(void)clear [favorites removeAllObjects]; isLoadOver = NO; } + +- (void)reloadData:(id)noRefresh { + [self reload:[(NSNumber *)noRefresh boolValue]]; +} + -(void)reload:(BOOL)noRefresh { //如果有网络连接 @@ -243,7 +248,7 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath * int row = indexPath.row; if (row >= favorites.count) { if (!isLoading && !isLoadOver) { - [self reload:YES]; + [self performSelector:@selector(reloadData:) withObject:[NSNumber numberWithBool:YES]]; } } else diff --git a/oschina/FriendsView.m b/oschina/FriendsView.m index 46ce270..809fbe4 100644 --- a/oschina/FriendsView.m +++ b/oschina/FriendsView.m @@ -76,6 +76,10 @@ - (void)viewDidUnload [super viewDidUnload]; } +- (void)reloadData:(id)noRefresh { + [self reload:[(NSNumber *)noRefresh boolValue]]; +} + -(void)reload:(BOOL)noRefresh { if (isLoadOver) { @@ -261,7 +265,7 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath * int row = [indexPath row]; if (row >= friends.count) { if (!isLoading) { - [self reload:YES]; + [self performSelector:@selector(reloadData:) withObject:[NSNumber numberWithBool:YES]]; } } diff --git a/oschina/MessageSystemView.m b/oschina/MessageSystemView.m index 85f5ec9..5c71af9 100644 --- a/oschina/MessageSystemView.m +++ b/oschina/MessageSystemView.m @@ -161,6 +161,11 @@ - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger { [Tool processLoginNotice:actionSheet andButtonIndex:buttonIndex andNav:self.parentViewController.navigationController andParent:self]; } + +- (void)reloadData:(id)noRefresh { + [self reload:[(NSNumber *)noRefresh boolValue]]; +} + - (void)reload:(BOOL)noRefresh { if (isLoading || isLoadOver) { @@ -631,7 +636,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath int row = [indexPath row]; if (row >= [comments count]) { if (!isLoading) { - [self reload:YES]; + [self performSelector:@selector(reloadData:) withObject:[NSNumber numberWithBool:YES]]; } } else { diff --git a/oschina/MessageView.m b/oschina/MessageView.m index 317d3ae..6641b9e 100644 --- a/oschina/MessageView.m +++ b/oschina/MessageView.m @@ -84,6 +84,11 @@ - (void)didReceiveMemoryWarning m.imgData = nil; } } + +- (void)reloadData:(id)noRefresh { + [self reload:[(NSNumber *)noRefresh boolValue]]; +} + - (void)reload:(BOOL)noRefresh { if (isLoading || isLoadOver) { @@ -390,7 +395,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath else { if (!isLoading) { - [self reload:YES]; + [self performSelector:@selector(reloadData:) withObject:[NSNumber numberWithBool:YES]]; } } } diff --git a/oschina/NewsView.m b/oschina/NewsView.m index fd74c68..5a31036 100644 --- a/oschina/NewsView.m +++ b/oschina/NewsView.m @@ -73,6 +73,11 @@ - (void)clear [news removeAllObjects]; isLoadOver = NO; } + +- (void)reloadData:(id)noRefresh { + [self reload:[(NSNumber *)noRefresh boolValue]]; +} + - (void)reload:(BOOL)noRefresh { //如果有网络连接 @@ -231,7 +236,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath int row = [indexPath row]; if (row >= [news count]) { if (!isLoading) { - [self reload:YES]; + [self performSelector:@selector(reloadData:) withObject:[NSNumber numberWithBool:YES]]; } } else { diff --git a/oschina/PostsView.m b/oschina/PostsView.m index bef6020..420d058 100644 --- a/oschina/PostsView.m +++ b/oschina/PostsView.m @@ -121,6 +121,11 @@ - (void)viewDidDisappear:(BOOL)animated [allDownloads makeObjectsPerformSelector:@selector(cancelDownload)]; } } + +- (void)reloadData:(id)noRefresh { + [self reload:[(NSNumber *)noRefresh boolValue]]; +} + - (void)reload:(BOOL)noRefresh { if ([Config Instance].isNetworkRunning) { @@ -314,7 +319,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath if (row >= [posts count]) { if (!isLoading) { - [self reload:YES]; + [self performSelector:@selector(reloadData:) withObject:[NSNumber numberWithBool:YES]]; } } else diff --git a/oschina/TwitterView.m b/oschina/TwitterView.m index c296a15..58d5355 100644 --- a/oschina/TwitterView.m +++ b/oschina/TwitterView.m @@ -106,6 +106,11 @@ - (void)clear [tweetDownloadsInProgress removeAllObjects]; isLoadOver = NO; } + +- (void)reloadData:(id)noRefresh { + [self reload:[(NSNumber *)noRefresh boolValue]]; +} + - (void)reload:(BOOL)noRefresh { if (isLoading || isLoadOver) @@ -407,7 +412,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath if (row >= [tweets count]) { //启动刷新 if (!isLoading) { - [self reload:YES]; + [self performSelector:@selector(reloadData:) withObject:[NSNumber numberWithBool:YES]]; } } else { diff --git a/oschina/UserBlogsView.m b/oschina/UserBlogsView.m index 78c8a01..6b99627 100644 --- a/oschina/UserBlogsView.m +++ b/oschina/UserBlogsView.m @@ -52,6 +52,10 @@ -(void)clear isLoadOver = NO; } +- (void)reloadData:(id)noRefresh { + [self reload:[(NSNumber *)noRefresh boolValue]]; +} + -(void)reload:(BOOL)noRefresh { //如果有网络连接 @@ -180,7 +184,7 @@ -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath * int row = [indexPath row]; if (row >= [blogs count]) { if (!isLoading) { - [self reload:YES]; + [self performSelector:@selector(reloadData:) withObject:[NSNumber numberWithBool:YES]]; } } else {