Commit 59a86e87 authored by Quentin Muret's avatar Quentin Muret Committed by Andreas Traczyk

Call view: Add call state change for ringing state

- also rename unknow state to connecting state

Change-Id: Ie461de18e029c46d1004f76799f3e8e74f0d9046
Reviewed-by: Andreas Traczyk's avatarAndreas Traczyk <andreas.traczyk@savoirfairelinux.com>
parent c9d0e363
......@@ -136,16 +136,19 @@ class CallViewModel: Stateable, ViewModel {
lazy var bottomInfo: Observable<String> = {
return callService.currentCall
.filter({ [weak self] call in
return call.callId == self?.call?.callId
return call.callId == self?.call?.callId &&
call.callType == .outgoing
}).map({ [weak self] call in
if call.state == .connecting || call.state == .ringing &&
call.callType == .outgoing {
return L10n.Calls.calling
} else if call.state == .over {
return L10n.Calls.callFinished
} else {
return ""
}
switch call.state {
case .connecting :
return L10n.Calls.connecting
case .ringing :
return L10n.Calls.ringing
case .over :
return L10n.Calls.callFinished
default :
return ""
}
})
}()
......
......@@ -98,12 +98,14 @@ internal enum L10n {
internal enum Calls {
/// Call finished
internal static let callFinished = L10n.tr("Localizable", "calls.callFinished")
/// Calling...
internal static let calling = L10n.tr("Localizable", "calls.calling")
/// Call
internal static let callItemTitle = L10n.tr("Localizable", "calls.callItemTitle")
/// Connecting
internal static let connecting = L10n.tr("Localizable", "calls.connecting")
/// wants to talk to you
internal static let incomingCallInfo = L10n.tr("Localizable", "calls.incomingCallInfo")
/// Ringing
internal static let ringing = L10n.tr("Localizable", "calls.ringing")
/// Unknown
internal static let unknown = L10n.tr("Localizable", "calls.unknown")
}
......
......@@ -100,7 +100,8 @@
"calls.callItemTitle" = "Call";
"calls.unknown" = "Unknown";
"calls.incomingCallInfo" = "wants to talk to you";
"calls.calling" = "Calling...";
"calls.ringing" = "Ringing";
"calls.connecting" = "Connecting";
"calls.callFinished" = "Call finished";
//Account Page
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment