forked from cubewang/NewsReader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SettingViewController.m
709 lines (549 loc) · 22.8 KB
/
SettingViewController.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
//
// SettingViewController.m
// EnglishFun
//
// Created by curer on 12-1-4.
// Copyright 2012 iKnow Team. All rights reserved.
//
#import "SettingViewController.h"
#import "MainViewController.h"
#import "LeftViewController.h"
#import "XMPPiKnowUserModule.h"
#import "MemberCoreDataObject.h"
#import "SettingCell.h"
#import "VisualDownloader.h"
#import "SDImageCache.h"
#import "ASIDownloadCache.h"
#import "ArticleDownloader.h"
#import "GuideViewController.h"
#import "PasswordViewController.h"
#define TABLEVIEW_SECTION0_IMAGE_PATH @"setting_section.png"
#define TABLEVIEW_SECTION1_IMAGE_PATH @"recommendation_section.png"
#define TABLEVIEW_CELL_SUGGESTION_IMAGE_PATH @"iKnow.png"
#define ARTICLE_DOWNLOADER_KEY @"text"
#define OFFLINE_DOWNLOAD_TIME_KEY @"offlineDownloadTime"
#define SETTINGITEMCOUNT 5
@implementation SettingViewController
@synthesize nickTextField;
@synthesize nickName;
@synthesize tableView;
@synthesize suggestionView;
@synthesize textPictureDownloader;
@synthesize audioDownloader;
@synthesize navBar;
@synthesize backButton;
- (XMPPiKnowUserModule *)getUserModule
{
return[[[EnglishFunAppDelegate sharedAppDelegate] getXMPPClient] xmppiKnowUserModule];
}
- (IBAction)close:(id)sender {
[self.viewDeckController toggleLeftView];
}
- (void)back
{
[MBProgressHUD hideHUDForView:self.view animated:YES];
[[ArticleDownloader shareInstance] cancel];
MainViewController *mainVc = [[MainViewController alloc] init];
CGRect rc = mainVc.view.frame;
rc.origin.y = 0;
mainVc.view.frame = rc;
self.viewDeckController.centerController = [[EnglishFunAppDelegate sharedAppDelegate] centerViewController];
[self.viewDeckController toggleLeftView];
}
- (void)showChangePassword
{
PasswordViewController *viewController = [[PasswordViewController alloc] initWithNibName:@"PasswordView" bundle:nil];
[self presentModalViewController:viewController animated:YES];
[viewController release];
}
- (void)Loginout
{
[[[EnglishFunAppDelegate sharedAppDelegate] getXMPPClient] loginout];
[self back];
}
- (void)clearData
{
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.labelText = nil;
dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
[[ASIDownloadCache sharedCache] clearCachedResponsesForStoragePolicy:ASICachePermanentlyCacheStoragePolicy];
[[SDImageCache sharedImageCache] cleanDisk];
hud.customView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"37x-Checkmark.png"]] autorelease];
hud.mode = MBProgressHUDModeCustomView;
sleep(.8f);
dispatch_async(dispatch_get_main_queue(), ^{
[MBProgressHUD hideHUDForView:self.view animated:YES];
fileSizeInBytes = 0;
[self.tableView reloadData];
});
});
}
- (void)sumCacheFileSize
{
long long n = [StringUtils getFileSize:[[SDImageCache sharedImageCache] getDiskCachePath]];
long long n2 = [StringUtils getFileSize:[[ASIDownloadCache sharedCache] storagePath]];
n += n2;
fileSizeInBytes = n;
}
- (void)downloadAudioItem:(NSString *)url andText:(NSString *)text
{
if ([url length] == 0 || [text length] == 0) {
return;
}
NSString* localFilePath;
localFilePath = [AUDIO_CACHE_FOLDER stringByAppendingPathComponent:[[StringUtils md5:url] lowercaseString]];
if ([[url lowercaseString] hasSuffix:@".mp3"]) {
localFilePath = [NSString stringWithFormat:@"%@.mp3", localFilePath];
}
if (localFilePath != nil)
{
if(![[NSFileManager defaultManager] fileExistsAtPath:localFilePath])
{
self.audioDownloader = [[VisualDownloader alloc]init];
audioDownloader.title = text;
audioDownloader.fileURL = [NSURL URLWithString:[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
audioDownloader.fileName = localFilePath;
audioDownloader.delegate = self;
audioDownloader.tag = 2;
[audioDownloader start];
[self.audioDownloader release];
[[ArticleDownloader shareInstance].audioList removeLastObject];
}
else {
[[ArticleDownloader shareInstance].audioList removeLastObject];
[self downloadAudio];
}
}
}
- (void)downloadAudio
{
int iCount = [[ArticleDownloader shareInstance].audioList count];
if (iCount) {
NSArray *urlList = [ArticleDownloader shareInstance].audioList;
NSString *titleText = [NSString stringWithFormat:NSLocalizedString(@"剩余%d个音频下载", @""), iCount];
[self downloadAudioItem:[urlList lastObject] andText:titleText];
}
}
- (void)downloadOffline:(BOOL)bAudio
{
[[ArticleDownloader shareInstance] reset];
[ArticleDownloader shareInstance].delegate = self;
[ArticleDownloader shareInstance].bDownLoadAudio = bAudio;
if (self.textPictureDownloader == nil) {
self.textPictureDownloader = [[VisualDownloader alloc] init];
[self.textPictureDownloader release];
}
[self.textPictureDownloader createProgressAlertWithMessage:NSLocalizedString(@"正在离线列表中的文章", @"")];
self.textPictureDownloader.delegate = self;
dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_LOW,
0), ^{
BOOL bSuccess = NO;
[ArticleDownloader shareInstance].userInfo =
[NSDictionary dictionaryWithObject:NSLocalizedString(@"正在下载", @"")
forKey:ARTICLE_DOWNLOADER_KEY];
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
bSuccess = [[ArticleDownloader shareInstance] downloadSync:IKNOW_TAG];
[pool drain];
if (bSuccess) {
//反转 audioList
NSArray *arr = [[[ArticleDownloader shareInstance].audioList reverseObjectEnumerator] allObjects];
[ArticleDownloader shareInstance].audioList = [NSMutableArray arrayWithArray:arr];
}
dispatch_async(dispatch_get_main_queue(), ^{
[self.textPictureDownloader close];
if (bAudio) {
[self downloadAudio];
}
[self sumCacheFileSize];
if (bSuccess) {
[[NSUserDefaults standardUserDefaults] setObject:[NSDate date]
forKey:OFFLINE_DOWNLOAD_TIME_KEY];
}
[self.tableView reloadData];
});
});
}
#pragma mark -
#pragma mark Initialization
/*
- (id)initWithStyle:(UITableViewStyle)style {
// Override initWithStyle: if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
self = [super initWithStyle:style];
if (self) {
// Custom initialization.
}
return self;
}
*/
#pragma mark -
#pragma mark View lifecycle
- (void)showLeft
{
[MBProgressHUD hideHUDForView:self.view animated:YES];
[[ArticleDownloader shareInstance] cancel];
[self.viewDeckController toggleLeftView];
}
- (void)viewDidLoad {
[super viewDidLoad];
self.navBar.tintColor = NAV_BAR_ITEM_COLOR;
if ([self.navBar respondsToSelector:@selector(setBackgroundImage:forBarMetrics:)]){
[ self.navBar setBackgroundImage:[UIImage imageNamed:@"NavBar_ios5.png"] forBarMetrics:UIBarMetricsDefault];
}
self.navBar.layer.shadowColor = [[UIColor blackColor] CGColor];
self.navBar.layer.shadowOffset = CGSizeMake(1.0f, 1.0f);
self.navBar.layer.shadowRadius = 3.0f;
self.navBar.layer.shadowOpacity = 0.8f;
self.navBar.topItem.title = NSLocalizedString(@"设置", @"");
CGRect rc = self.view.frame;
rc.origin.y = 0;
rc.size.height = 460 - 44;
self.view.frame = rc;
UIButton *buttonLeft = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 48, 30)];
[buttonLeft setImage:[UIImage imageNamed:@"ButtonMenu"] forState:UIControlStateNormal];
[buttonLeft addTarget:self action:@selector(showLeft) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *itemLeft = [[UIBarButtonItem alloc] initWithCustomView:buttonLeft];
self.navigationItem.leftBarButtonItem = itemLeft;
[itemLeft release];
[[self getUserModule] addDelegate:self delegateQueue:dispatch_get_main_queue()];
self.tableView.delegate = self;
self.tableView.dataSource = self;
[self.view addSubview:tableView];
// Configure the table view.
self.view.backgroundColor = self.tableView.backgroundColor = CELL_BACKGROUND;
self.tableView.userInteractionEnabled = YES;
self.tableView.alpha = 1;
if (self.suggestionView == nil) {
self.suggestionView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:TABLEVIEW_CELL_SUGGESTION_IMAGE_PATH]] autorelease];
self.suggestionView.frame = CGRectMake(0, 0, 320, 100);
UITextView *recommendText = [[UITextView alloc] initWithFrame:CGRectMake(78,15,235,100)];
recommendText.textAlignment = UITextAlignmentLeft;
recommendText.backgroundColor = [UIColor clearColor];
recommendText.textColor = [UIColor darkGrayColor];
recommendText.font = [UIFont systemFontOfSize:12.0];
recommendText.text =NSLocalizedString(@"推荐iKnow",@"");
[self.suggestionView addSubview:recommendText];
[recommendText release];
}
[self sumCacheFileSize];
}
/*
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
}
*/
/*
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
}
*/
/*
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
}
*/
/*
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
}
*/
/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations.
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/
#pragma mark -
#pragma mark Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
// Return the number of sections.
return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
if (section == 0) {
return 6;
}
return 1;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
{
if (section == 0) {
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:TABLEVIEW_SECTION0_IMAGE_PATH]];
UILabel *lable = [[[UILabel alloc] initWithFrame:CGRectMake(42, 7, 200, 20)] autorelease];
lable.textAlignment = UITextAlignmentLeft;
lable.backgroundColor = [UIColor clearColor];
lable.font = [UIFont systemFontOfSize:19.0];
lable.textColor = [UIColor whiteColor];
lable.text = NSLocalizedString(@"系统设置", @"");
[imageView addSubview:lable];
return [imageView autorelease];
}
else {
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:TABLEVIEW_SECTION1_IMAGE_PATH]];
UILabel *lable = [[[UILabel alloc] initWithFrame:CGRectMake(42, 7, 200, 20)] autorelease];
lable.textAlignment = UITextAlignmentLeft;
lable.backgroundColor = [UIColor clearColor];
lable.font = [UIFont systemFontOfSize:19.0];
lable.textColor = [UIColor whiteColor];
lable.text = NSLocalizedString(@"精品推荐",@"");
[imageView addSubview:lable];
return [imageView autorelease];
}
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
if (section == 0) {
return [UIImage imageNamed:TABLEVIEW_SECTION0_IMAGE_PATH].size.height;
}
else if (section == 1)
{
return [UIImage imageNamed:TABLEVIEW_SECTION1_IMAGE_PATH].size.height;
}
return 0;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.section == 0) {
return 42;
}
return 90;
}
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"SettingCell";
SettingCell *cell = (SettingCell *)[self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[SettingCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
if (indexPath.row == 0 && indexPath.section == 0) {
CGRect rc = cell.frame;
rc.size.width -= 180;
rc.size.height = 20;
rc.origin.x += 100;
rc.origin.y += 10;
self.nickTextField = [[UITextField alloc] initWithFrame:rc];
self.nickTextField.clearButtonMode = UITextFieldViewModeWhileEditing;
self.nickTextField.returnKeyType = UIReturnKeyDone;
self.nickTextField.placeholder = NSLocalizedString(@"点击设置昵称", @"");
self.nickTextField.delegate = self;
[cell.contentView addSubview:self.nickTextField];
}
cell.detailTextLabel.backgroundColor = CELL_BACKGROUND;
cell.textLabel.backgroundColor = CELL_BACKGROUND;
}
if (indexPath.section == 0 ) {
NSDictionary *userInfo = [[self getUserModule] queryLocalUserInfo];
if (indexPath.row == 0) {
cell.textLabel.text = NSLocalizedString(@"昵称", @"");
self.nickTextField.text = [userInfo objectForKey:@"nickName"];
self.nickName = self.nickTextField.text;
}
else if (indexPath.row == 1){
if ([Client userHasRegistered]) {
cell.textLabel.text = NSLocalizedString(@"退出登录", @"");
cell.detailTextLabel.text = [userInfo objectForKey:@"email"];
}
else {
cell.textLabel.text = NSLocalizedString(@"登录", @"");
}
}
else if (indexPath.row == 2){
cell.textLabel.text = NSLocalizedString(@"清除缓存", @"");
cell.detailTextLabel.text =
[NSString stringWithFormat:@"%lld M", fileSizeInBytes / (1014 *1024)];
}
else if (indexPath.row == 3) {
cell.textLabel.text = NSLocalizedString(@"修改密码", @"");
}
else if (indexPath.row == 4){
cell.textLabel.text = NSLocalizedString(@"离线下载", @"");
NSDate *date = [[NSUserDefaults standardUserDefaults]
objectForKey:OFFLINE_DOWNLOAD_TIME_KEY];
if (date) {
NSString *time = [StringUtils intervalSinceTime:date
andTime:[NSDate date]];
cell.detailTextLabel.text = time;
}
}
else if (indexPath.row == 5){
cell.textLabel.text = NSLocalizedString(@"新手指引", @"");
}
}
else {
//[cell.contentView addSubview:self.suggestionView];
[cell addSubview:self.suggestionView];
}
return cell;
}
#pragma mark -
#pragma mark Table view delegate
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
self.nickTextField.text = self.nickName;
[self.nickTextField resignFirstResponder];
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[self.tableView deselectRowAtIndexPath:indexPath animated:NO];
if (indexPath.section == 0) {
if (indexPath.row == 2) {
[self clearData];
}
else if (indexPath.row == 3) {
if ([Client userHasRegistered])
{
[self showChangePassword];
}
}
else if (indexPath.row == 1) {
if ([Client userHasRegistered]) {
UIAlertView *view = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"提示", @"")
message:NSLocalizedString(@"确定退出登录么?退出登录将不能云收藏,评论为匿名", @"")
delegate:self
cancelButtonTitle:NSLocalizedString(@"取消", @"")
otherButtonTitles:NSLocalizedString(@"退出登录", @""),nil];
[view show];
[view release];
}
else {
[[EnglishFunAppDelegate sharedAppDelegate] loginOrRegisterUser:self];
}
}
else if (indexPath.row == 4) {
UIAlertView *view = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"离线下载", @"")
message:NSLocalizedString(@"需要下载文章中附带的音频么", @"")
delegate:self
cancelButtonTitle:NSLocalizedString(@"取消", @"")
otherButtonTitles:NSLocalizedString(@"下载", @""),NSLocalizedString(@"不下载", @""),nil];
view.tag = 1;
[view show];
[view release];
}
else if (indexPath.row == 5) {
GuideViewController *guiderViewController = [[GuideViewController alloc] init];
guiderViewController.isChangeAction = YES;
[self presentModalViewController:guiderViewController animated:YES];
[guiderViewController release];
}
}
else {
//goto iKnow英语 appstore
NSString *buyString = NSLocalizedString (@"iKnowurl",@"");
NSURL *url = [NSURL URLWithString:buyString];
[[UIApplication sharedApplication] openURL:url];
}
}
#pragma mark UITextField
- (void)textFieldDidEndEditing:(UITextField *)textField
{
if (!bChangeNickname) {
return;
}
bChangeNickname = NO;
[[self getUserModule] setUserInfoWithObject:self.nickName
andKey:@"nickName"];
[[[EnglishFunAppDelegate sharedAppDelegate] getClient] showPopProgress:self.view
andText:@""];
return;
}
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
if (![Client userHasRegistered]) {
[[EnglishFunAppDelegate sharedAppDelegate] loginOrRegisterUser:self];
return NO;
}
self.nickName = textField.text;
return YES;
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
self.nickName = textField.text;
bChangeNickname = YES;
[textField resignFirstResponder];
return YES;
}
#pragma mark -
#pragma mark Memory management
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Relinquish ownership any cached data, images, etc. that aren't in use.
}
- (void)viewDidUnload {
// Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.
// For example: self.myOutlet = nil;
}
- (void)dealloc {
[[self getUserModule] removeDelegate:self];
[nickTextField release];
[nickName release];
[tableView release];
[suggestionView release];
[navBar release];
[backButton release];
[super dealloc];
}
#pragma mark alertView
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (alertView.tag == 1) {
if (buttonIndex == 1) {
[self downloadOffline:YES];
}
else if (buttonIndex == 2) {
[self downloadOffline:NO];
}
return;
}
if (buttonIndex == 1) {
[self Loginout];
}
return;
}
#pragma mark ArticleDownloader
- (void) visualDownloaderCancel
{
[[ArticleDownloader shareInstance] cancel];
[self.textPictureDownloader.progressAlertView dismissWithClickedButtonIndex:0 animated:YES];
}
- (void)visualDownloaderDidFinish:(NSString *)fileName
download:(VisualDownloader *)aDownloader
{
if (aDownloader.tag ==2 && [[ArticleDownloader shareInstance].audioList count])
{
[self downloadAudio];
}
}
- (void)downloadArticleFinished:(NSInteger)index
withSum:(NSInteger)sum
{
dispatch_async(dispatch_get_main_queue(), ^{
float rate = (float)index / sum;
self.textPictureDownloader.progressView.progress = rate;
NSString *str = [[ArticleDownloader shareInstance].userInfo
objectForKey:ARTICLE_DOWNLOADER_KEY];
if ([str length]) {
self.textPictureDownloader.label.text =
[NSString stringWithFormat:@"%@ %.2f%", str,100*rate];
}
else {
self.textPictureDownloader.label.text =
[NSString stringWithFormat:@"%.2f%", 100*rate];
}
});
}
#pragma mark XMPPiKnowUserModule
- (void)xmppiKnowUserModule:(XMPPiKnowUserModule *)sender
userInfoChanged:(MemberCoreDataObject *)memberCoreDataObject
{
if ([memberCoreDataObject.userId isEqualToString:[[iKnowXMPPClient getJID] user]]) {
[[[EnglishFunAppDelegate sharedAppDelegate] getClient] hidePopProgress:YES
andText:@""];
}
}
- (void)xmppiKnowUserModule:(XMPPiKnowUserModule *)sender
queryFinish:(NSDictionary *)userDic
{
if ([[userDic objectForKey:@"user_id"] isEqualToString:[[iKnowXMPPClient getJID] user]]) {
[self.tableView reloadData];
}
}
@end