17
17
#import " SVPullToRefresh.h"
18
18
#import " WebViewController.h"
19
19
#import " ProjectTweetSendViewController.h"
20
+ #import " EaseUserHeaderView.h"
20
21
21
22
@interface UserOrProjectTweetsViewController ()
22
23
@property (nonatomic , strong , readwrite ) UITableView *myTableView;
@@ -151,7 +152,7 @@ - (void)deleteTweet:(Tweet *)curTweet outTweetsIndex:(NSInteger)outTweetsIndex{
151
152
if (data) {
152
153
[_self.curTweets.list removeObject: curTweet];
153
154
[_self.myTableView reloadData ];
154
- [_self.view configBlankPage: ([[Login curLoginUser ] isSameToUser: _self.curTweets.curUser]? EaseBlankPageTypeTweet: EaseBlankPageTypeTweetOther) hasData: (_self.curTweets.list.count > 0 ) hasError: NO reloadButtonBlock: ^(id sender) {
155
+ [_self.view configBlankPage: ([[Login curLoginUser ] isSameToUser: _self.curTweets.curUser]? EaseBlankPageTypeTweet: EaseBlankPageTypeTweetOther) hasData: (_self.curTweets.list.count > 0 ) hasError: NO offsetY: [_self blankPageOffsetY ] reloadButtonBlock: ^(id sender) {
155
156
ESStrongSelf;
156
157
[_self sendRequest ];
157
158
}];
@@ -207,12 +208,19 @@ - (void)sendRequest{
207
208
[weakSelf.myTableView reloadData ];
208
209
weakSelf.myTableView .showsInfiniteScrolling = weakSelf.curTweets .canLoadMore ;
209
210
}
210
- [weakSelf.view configBlankPage: ([[Login curLoginUser ] isSameToUser: self .curTweets.curUser]? EaseBlankPageTypeTweet: EaseBlankPageTypeTweetOther) hasData: (weakSelf.curTweets.list.count > 0 ) hasError: (error != nil ) reloadButtonBlock: ^(id sender) {
211
+ [weakSelf.view configBlankPage: ([[Login curLoginUser ] isSameToUser: self .curTweets.curUser]? EaseBlankPageTypeTweet: EaseBlankPageTypeTweetOther) hasData: (weakSelf.curTweets.list.count > 0 ) hasError: (error != nil ) offsetY: [weakSelf blankPageOffsetY ] reloadButtonBlock: ^(id sender) {
211
212
[weakSelf sendRequest ];
212
213
}];
213
214
}];
214
215
}
215
216
217
+ - (CGFloat )blankPageOffsetY {// MeDisplayViewController
218
+ CGFloat offsetY = 0 ;
219
+ if ([self isMemberOfClass: NSClassFromString (@" MeDisplayViewController" )]) {
220
+ offsetY = [(EaseUserHeaderView *)[self valueForKey: @" eaV" ] originalHeight ] + 60 ;
221
+ }
222
+ return offsetY;
223
+ }
216
224
217
225
- (void )refreshCurUser {
218
226
__weak typeof (self) weakSelf = self;
@@ -223,7 +231,7 @@ - (void)refreshCurUser{
223
231
[weakSelf sendRequest ];
224
232
}else {
225
233
[weakSelf.view endLoading ];
226
- [weakSelf.view configBlankPage: ([[Login curLoginUser ] isSameToUser: self .curTweets.curUser]? EaseBlankPageTypeTweet: EaseBlankPageTypeTweetOther) hasData: (weakSelf.curTweets.list.count > 0 ) hasError: YES reloadButtonBlock: ^(id sender) {
234
+ [weakSelf.view configBlankPage: ([[Login curLoginUser ] isSameToUser: self .curTweets.curUser]? EaseBlankPageTypeTweet: EaseBlankPageTypeTweetOther) hasData: (weakSelf.curTweets.list.count > 0 ) hasError: YES offsetY: [weakSelf blankPageOffsetY ] reloadButtonBlock: ^(id sender) {
227
235
[weakSelf sendRequest ];
228
236
}];
229
237
}
@@ -328,7 +336,7 @@ - (void)goToDetailWithTweet:(Tweet *)curTweet{
328
336
vc.deleteTweetBlock = ^(Tweet *toDeleteTweet){
329
337
[weakSelf.curTweets.list removeObject: toDeleteTweet];
330
338
[weakSelf.myTableView reloadData ];
331
- [weakSelf.view configBlankPage: ([[Login curLoginUser ] isSameToUser: self .curTweets.curUser]? EaseBlankPageTypeTweet: EaseBlankPageTypeTweetOther) hasData: (weakSelf.curTweets.list.count > 0 ) hasError: NO reloadButtonBlock: ^(id sender) {
339
+ [weakSelf.view configBlankPage: ([[Login curLoginUser ] isSameToUser: self .curTweets.curUser]? EaseBlankPageTypeTweet: EaseBlankPageTypeTweetOther) hasData: (weakSelf.curTweets.list.count > 0 ) hasError: NO offsetY: [weakSelf blankPageOffsetY ] reloadButtonBlock: ^(id sender) {
332
340
[weakSelf sendRequest ];
333
341
}];
334
342
};
0 commit comments