Fix swiftlint warnings

This commit is contained in:
QuentinArguillere 2024-01-02 17:33:54 +01:00
parent d0ae11c880
commit bcf4eefe35
12 changed files with 20 additions and 26 deletions

View file

@ -272,7 +272,7 @@ extension ProviderDelegate: CXProviderDelegate {
// attempt to resume another one. // attempt to resume another one.
action.fulfill() action.fulfill()
} else { } else {
if call?.conference != nil && core.callsNb ?? 0 > 1 {/* if call?.conference != nil && core.callsNb > 1 {/*
try TelecomManager.shared.lc?.enterConference() try TelecomManager.shared.lc?.enterConference()
action.fulfill() action.fulfill()
NotificationCenter.default.post(name: Notification.Name("LinphoneCallUpdate"), object: self) NotificationCenter.default.post(name: Notification.Name("LinphoneCallUpdate"), object: self)

View file

@ -98,10 +98,8 @@ struct CallView: View {
Button { Button {
options = callViewModel.getAudioRoute() options = callViewModel.getAudioRoute()
print("audioRouteIsSpeakeraudioRouteIsSpeaker output \(AVAudioSession.sharedInstance().currentRoute.outputs)") print("audioRouteIsSpeakeraudioRouteIsSpeaker output \(AVAudioSession.sharedInstance().currentRoute.outputs)")
print("audioRouteIsSpeakeraudioRouteIsSpeaker inputs \(AVAudioSession.sharedInstance().availableInputs?.count)") print("audioRouteIsSpeakeraudioRouteIsSpeaker inputs \(AVAudioSession.sharedInstance().availableInputs?.count)")
if AVAudioSession.sharedInstance().availableInputs != nil if AVAudioSession.sharedInstance().availableInputs != nil
&& !AVAudioSession.sharedInstance().availableInputs!.filter({ $0.portType.rawValue.contains("Bluetooth") }).isEmpty { && !AVAudioSession.sharedInstance().availableInputs!.filter({ $0.portType.rawValue.contains("Bluetooth") }).isEmpty {

View file

@ -98,5 +98,5 @@ struct ContactsListFragment: View {
} }
#Preview { #Preview {
ContactsListFragment(contactViewModel: ContactViewModel(), contactsListViewModel: ContactsListViewModel(), showingSheet: .constant(false), startCallFunc: {addr in }) ContactsListFragment(contactViewModel: ContactViewModel(), contactsListViewModel: ContactsListViewModel(), showingSheet: .constant(false), startCallFunc: {_ in })
} }

View file

@ -66,7 +66,7 @@ class ContactAvatarModel: ObservableObject {
func addSubscription() { func addSubscription() {
friendSuscription = self.friend?.publisher?.onPresenceReceived?.postOnMainQueue { (cbValue: (Friend)) in friendSuscription = self.friend?.publisher?.onPresenceReceived?.postOnMainQueue { (cbValue: (Friend)) in
print("publisherpublisher onLogCollectionUploadStateChanged \(cbValue.address?.asStringUriOnly())") print("publisherpublisher onLogCollectionUploadStateChanged \(cbValue.address?.asStringUriOnly() ?? "")")
self.presenceStatus = cbValue.consolidatedPresence self.presenceStatus = cbValue.consolidatedPresence
if cbValue.consolidatedPresence == .Online || cbValue.consolidatedPresence == .Busy { if cbValue.consolidatedPresence == .Online || cbValue.consolidatedPresence == .Busy {

View file

@ -17,8 +17,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
import Foundation import Foundation
import linphonesw import linphonesw
@ -29,7 +27,7 @@ extension Config {
private static var _instance: Config? private static var _instance: Config?
public func getDouble(section: String, key: String, defaultValue: Double) -> Double { public func getDouble(section: String, key: String, defaultValue: Double) -> Double {
if (self.hasEntry(section: section, key: key) != 1) { if self.hasEntry(section: section, key: key) != 1 {
return defaultValue return defaultValue
} }
let stringValue = self.getString(section: section, key: key, defaultString: "") let stringValue = self.getString(section: section, key: key, defaultString: "")
@ -51,7 +49,7 @@ extension Config {
static let appGroupName = "group.org.linphone.phone.logs" static let appGroupName = "group.org.linphone.phone.logs"
// Needs to be the same name in App Group (capabilities in ALL targets - app & extensions - content + service), can't be stored in the Config itself the Config needs this value to get created // Needs to be the same name in App Group (capabilities in ALL targets - app & extensions - content + service), can't be stored in the Config itself the Config needs this value to get created
static let teamID = Config.get().getString(section: "app", key: "team_id", defaultString: "") static let teamID = Config.get().getString(section: "app", key: "team_id", defaultString: "")
static let earlymediaContentExtensionCagetoryIdentifier = Config.get().getString(section: "app", key: "extension_category", defaultString: "") static let earlymediaContentExtCatIdentifier = Config.get().getString(section: "app", key: "extension_category", defaultString: "")
// Default values in app // Default values in app
static let serveraddress = Config.get().getString(section: "app", key: "server", defaultString: "") static let serveraddress = Config.get().getString(section: "app", key: "server", defaultString: "")

View file

@ -90,7 +90,6 @@ class Log: LoggingServiceDelegate {
} }
} }
func onLogMessageWritten(logService: linphonesw.LoggingService, domain: String, level: linphonesw.LogLevel, message: String) { func onLogMessageWritten(logService: linphonesw.LoggingService, domain: String, level: linphonesw.LogLevel, message: String) {
output(message, level.rawValue, domain) output(message, level.rawValue, domain)
} }

View file

@ -31,7 +31,6 @@ class PermissionManager: ObservableObject {
private init() {} private init() {}
func getPermissions() { func getPermissions() {
photoLibraryRequestPermission() photoLibraryRequestPermission()
cameraRequestPermission() cameraRequestPermission()