mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
call: remove timers in pause and conference tables
This commit is contained in:
parent
619784bfad
commit
0c0c9b2acb
6 changed files with 12 additions and 43 deletions
|
|
@ -8,9 +8,8 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface CallConferenceTableView : UITableViewController {
|
||||
@private
|
||||
NSTimer *updateTime;
|
||||
}
|
||||
@interface CallConferenceTableView : UITableViewController
|
||||
|
||||
- (void)update;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -24,22 +24,6 @@
|
|||
|
||||
@implementation CallConferenceTableView
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
updateTime =
|
||||
[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(update) userInfo:nil repeats:YES];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
if (updateTime != nil) {
|
||||
[updateTime invalidate];
|
||||
updateTime = nil;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UI change
|
||||
|
||||
- (void)update {
|
||||
|
|
|
|||
|
|
@ -19,9 +19,8 @@
|
|||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface CallPausedTableView : UITableViewController {
|
||||
@private
|
||||
NSTimer *updateTime;
|
||||
}
|
||||
@interface CallPausedTableView : UITableViewController
|
||||
|
||||
- (void)update;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -24,22 +24,6 @@
|
|||
|
||||
@implementation CallPausedTableView
|
||||
|
||||
#pragma mark - ViewController Functions
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
updateTime =
|
||||
[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(update) userInfo:nil repeats:YES];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
if (updateTime != nil) {
|
||||
[updateTime invalidate];
|
||||
updateTime = nil;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UI change
|
||||
|
||||
- (void)update {
|
||||
|
|
|
|||
|
|
@ -415,6 +415,9 @@ static void hideSpinner(LinphoneCall *call, void *user_data) {
|
|||
int duration =
|
||||
linphone_core_get_current_call(LC) ? linphone_call_get_duration(linphone_core_get_current_call(LC)) : 0;
|
||||
_durationLabel.text = [LinphoneUtils durationToString:duration];
|
||||
|
||||
[_pausedCallsTable update];
|
||||
[_conferenceCallsTable update];
|
||||
}
|
||||
|
||||
- (void)onCurrentCallChange {
|
||||
|
|
@ -513,8 +516,8 @@ static void hideSpinner(LinphoneCall *call, void *user_data) {
|
|||
}
|
||||
|
||||
// Update tables
|
||||
[_pausedCallsTable.tableView reloadData];
|
||||
[_conferenceCallsTable.tableView reloadData];
|
||||
[_pausedCallsTable update];
|
||||
[_conferenceCallsTable update];
|
||||
|
||||
static LinphoneCall *currentCall = NULL;
|
||||
if (!currentCall || linphone_core_get_current_call(LC) != currentCall) {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>4</string>
|
||||
<string>5</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIApplicationExitsOnSuspend</key>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue