mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 06:08:07 +00:00
call: fix stats view being refreshed twice when opened
This commit is contained in:
parent
bc9b1c9322
commit
39799eeaae
1 changed files with 11 additions and 4 deletions
|
|
@ -18,9 +18,16 @@
|
|||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
updateTimer =
|
||||
[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(updateStats) userInfo:nil repeats:YES];
|
||||
[self updateStats];
|
||||
if (updateTimer != nil) {
|
||||
[updateTimer invalidate];
|
||||
}
|
||||
updateTimer = [NSTimer scheduledTimerWithTimeInterval:1
|
||||
target:self
|
||||
selector:@selector(updateStats:)
|
||||
userInfo:nil
|
||||
repeats:YES];
|
||||
|
||||
[self updateStats:nil];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
|
|
@ -126,7 +133,7 @@
|
|||
return result;
|
||||
}
|
||||
|
||||
- (void)updateStats {
|
||||
- (void)updateStats:(NSTimer *)timer {
|
||||
LinphoneCall *call = linphone_core_get_current_call([LinphoneManager getLc]);
|
||||
|
||||
if (!call) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue