mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
bug fix :
-display/hide call stats when clicking on the network quality icon in the status bar of the Active Call View
This commit is contained in:
parent
f8f9b99718
commit
2301a26758
6 changed files with 30 additions and 9 deletions
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="onSideMenuClick:" destination="-1" eventType="touchUpInside" id="iOC-wy-MPP"/>
|
||||
<action selector="onQualityClick:" destination="-1" eventType="touchUpInside" id="Pir-Ib-ywJ"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
@property(weak, nonatomic) IBOutlet UIView *outcallView;
|
||||
|
||||
- (IBAction)onSecurityClick:(id)sender;
|
||||
- (IBAction)onQualityClick:(id)sender;
|
||||
- (IBAction)onSideMenuClick:(id)sender;
|
||||
- (IBAction)onRegistrationStateClick:(id)sender;
|
||||
+ (UIImage *)imageForState:(LinphoneRegistrationState)state;
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#import "LinphoneManager.h"
|
||||
#import "PhoneMainView.h"
|
||||
#import <UserNotifications/UserNotifications.h>
|
||||
#import "linphoneapp-Swift.h"
|
||||
|
||||
@implementation StatusBarView {
|
||||
|
||||
|
|
@ -400,6 +401,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (IBAction)onQualityClick:(id)sender {
|
||||
CallStatsViewModel* stats = [[CallStatsViewModel alloc]init];
|
||||
[stats toggleVisibility];
|
||||
}
|
||||
|
||||
- (IBAction)onSideMenuClick:(id)sender {
|
||||
UICompositeView *cvc = PhoneMainView.instance.mainViewController;
|
||||
[cvc hideSideMenu:(cvc.sideMenuView.frame.origin.x == 0)];
|
||||
|
|
|
|||
|
|
@ -271,3 +271,19 @@ class ControlsViewModel {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
@objc class CallStatsViewModel: NSObject {
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
}
|
||||
|
||||
@objc
|
||||
func toggleVisibility() -> Void {
|
||||
if (ControlsViewModel.shared.callStatsVisible.value == true) {
|
||||
ControlsViewModel.shared.callStatsVisible.value = false
|
||||
} else {
|
||||
ControlsViewModel.shared.callStatsVisible.value = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,8 +256,7 @@ import linphonesw
|
|||
self.numpadView?.removeFromSuperview()
|
||||
self.shadingMask.isHidden = false
|
||||
self.numpadView = NumpadView(superView: self.view,callData: CallsViewModel.shared.currentCallData.value!!,marginTop:self.currentCallView?.centerSection.frame.origin.y ?? 0.0, onDismissAction: {
|
||||
self.numpadView?.removeFromSuperview()
|
||||
self.shadingMask.isHidden = true
|
||||
ControlsViewModel.shared.numpadVisible.value = false
|
||||
})
|
||||
} else {
|
||||
self.numpadView?.removeFromSuperview()
|
||||
|
|
@ -272,8 +271,7 @@ import linphonesw
|
|||
self.currentCallStatsVew?.removeFromSuperview()
|
||||
self.shadingMask.isHidden = false
|
||||
self.currentCallStatsVew = CallStatsView(superView: self.view,callData: CallsViewModel.shared.currentCallData.value!!,marginTop:self.currentCallView?.centerSection.frame.origin.y ?? 0.0, onDismissAction: {
|
||||
self.currentCallStatsVew?.removeFromSuperview()
|
||||
self.shadingMask.isHidden = true
|
||||
ControlsViewModel.shared.callStatsVisible.value = false
|
||||
})
|
||||
} else {
|
||||
self.currentCallStatsVew?.removeFromSuperview()
|
||||
|
|
|
|||
|
|
@ -60,12 +60,12 @@ class VoipExtraButtonsView: UIStackView {
|
|||
|
||||
// First row
|
||||
let numpad = VoipExtraButton(text: VoipTexts.call_action_numpad, buttonTheme: VoipTheme.call_action("voip_call_numpad"),onClickAction: {
|
||||
ControlsViewModel.shared.numpadVisible.notifyAllObservers(with: true)
|
||||
ControlsViewModel.shared.numpadVisible.value = true
|
||||
})
|
||||
row1.addArrangedSubview(numpad)
|
||||
|
||||
let stats = VoipExtraButton(text: VoipTexts.call_action_statistics, buttonTheme: VoipTheme.call_action("voip_call_stats"),onClickAction: {
|
||||
ControlsViewModel.shared.callStatsVisible.notifyAllObservers(with: true)
|
||||
ControlsViewModel.shared.callStatsVisible.value = true
|
||||
})
|
||||
row1.addArrangedSubview(stats)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue