feat: add syncCurrentState to sync registration and call state

This commit is contained in:
Andrew 2026-02-09 12:58:02 +07:00
parent 6bf6e7e8ea
commit 2e67ea7ff9
2 changed files with 9 additions and 0 deletions

View file

@ -205,6 +205,10 @@ public class LiblinphoneFlutterPlugin: NSObject, FlutterPlugin {
case "stop": case "stop":
linphoneBridge.stop() linphoneBridge.stop()
result(true) result(true)
case "syncCurrentState" :
linphoneBridge.syncCurrentState()
result(true)
default: default:
result(FlutterMethodNotImplemented) result(FlutterMethodNotImplemented)

View file

@ -244,6 +244,11 @@ class LinphoneBridge {
return .audio return .audio
} }
} }
func syncCurrentState() {
onRegistrationStateChanged(registrationState.rawValue)
onCallStateChanged(callState.rawValue)
}
} }
// MARK: - CoreDelegate // MARK: - CoreDelegate