mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-16 20:10:04 +03:00
New voip design: clean after benoit review
This commit is contained in:
parent
42bfa129b3
commit
4518962658
7 changed files with 41 additions and 12 deletions
|
@ -28,6 +28,7 @@
|
||||||
<!-- Other useful color -->
|
<!-- Other useful color -->
|
||||||
<!-- Emoji text has to use a black text color -->
|
<!-- Emoji text has to use a black text color -->
|
||||||
<color name="emoji_color">@android:color/black</color>
|
<color name="emoji_color">@android:color/black</color>
|
||||||
|
<color name="join_conference_animated_color">#0BAC7E</color>
|
||||||
|
|
||||||
<color name="half_transparent_status_bar">#80000000</color>
|
<color name="half_transparent_status_bar">#80000000</color>
|
||||||
|
|
||||||
|
|
|
@ -194,6 +194,37 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||||
|
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<b>hyuwah/DraggableView</b>
|
||||||
|
<br/>
|
||||||
|
hyuwah/DraggableView is licensed under the MIT License
|
||||||
|
Copyright (c) 2018 Muhammad Wahyudin
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<pre>
|
||||||
|
|
||||||
|
Copyright (c) 2018 Muhammad Wahyudin
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
</pre>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<b>com.github.piasy:BigImageViewer</b>
|
<b>com.github.piasy:BigImageViewer</b>
|
||||||
|
|
|
@ -69,7 +69,7 @@ class CurrentCallsView @JvmOverloads constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
resources.getString(R.string.call_multiple_active, calls.size)
|
resources.getQuantityString(R.plurals.call_active_status, calls.size, calls.size)
|
||||||
}
|
}
|
||||||
views.currentCallsInfo.text = resources.getString(R.string.call_tap_to_return, tapToReturnFormat)
|
views.currentCallsInfo.text = resources.getString(R.string.call_tap_to_return, tapToReturnFormat)
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ sealed class RoomDetailAction : VectorViewModelAction {
|
||||||
data class EnsureNativeWidgetAllowed(val widget: Widget,
|
data class EnsureNativeWidgetAllowed(val widget: Widget,
|
||||||
val userJustAccepted: Boolean,
|
val userJustAccepted: Boolean,
|
||||||
val grantedEvents: RoomDetailViewEvents) : RoomDetailAction()
|
val grantedEvents: RoomDetailViewEvents) : RoomDetailAction()
|
||||||
data class UpdateJoinJitsiCallStatus(val broadcastEvent: BroadcastEvent): RoomDetailAction()
|
data class UpdateJoinJitsiCallStatus(val jitsiEvent: BroadcastEvent): RoomDetailAction()
|
||||||
|
|
||||||
data class OpenOrCreateDm(val userId: String) : RoomDetailAction()
|
data class OpenOrCreateDm(val userId: String) : RoomDetailAction()
|
||||||
data class JumpToReadReceipt(val userId: String) : RoomDetailAction()
|
data class JumpToReadReceipt(val userId: String) : RoomDetailAction()
|
||||||
|
|
|
@ -326,7 +326,7 @@ class RoomDetailFragment @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
lifecycle.addObserver(JitsiBroadcastEventObserver(vectorBaseActivity, this::onBroadcastEvent))
|
lifecycle.addObserver(JitsiBroadcastEventObserver(vectorBaseActivity, this::onBroadcastJitsiEvent))
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
sharedActionViewModel = activityViewModelProvider.get(MessageSharedActionViewModel::class.java)
|
sharedActionViewModel = activityViewModelProvider.get(MessageSharedActionViewModel::class.java)
|
||||||
knownCallsViewModel = activityViewModelProvider.get(SharedKnownCallsViewModel::class.java)
|
knownCallsViewModel = activityViewModelProvider.get(SharedKnownCallsViewModel::class.java)
|
||||||
|
@ -459,8 +459,8 @@ class RoomDetailFragment @Inject constructor(
|
||||||
JitsiBroadcastEmitter(vectorBaseActivity).emitConferenceEnded()
|
JitsiBroadcastEmitter(vectorBaseActivity).emitConferenceEnded()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun onBroadcastEvent(event: BroadcastEvent) {
|
private fun onBroadcastJitsiEvent(jitsiEvent: BroadcastEvent) {
|
||||||
roomDetailViewModel.handle(RoomDetailAction.UpdateJoinJitsiCallStatus(event))
|
roomDetailViewModel.handle(RoomDetailAction.UpdateJoinJitsiCallStatus(jitsiEvent))
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun onCannotRecord() {
|
private fun onCannotRecord() {
|
||||||
|
@ -872,8 +872,7 @@ class RoomDetailFragment @Inject constructor(
|
||||||
joinConfItem.actionView.findViewById<MaterialButton>(R.id.join_conference_button).also { joinButton ->
|
joinConfItem.actionView.findViewById<MaterialButton>(R.id.join_conference_button).also { joinButton ->
|
||||||
joinButton.setOnClickListener { roomDetailViewModel.handle(RoomDetailAction.JoinJitsiCall) }
|
joinButton.setOnClickListener { roomDetailViewModel.handle(RoomDetailAction.JoinJitsiCall) }
|
||||||
val colorFrom = ContextCompat.getColor(joinButton.context, R.color.palette_element_green)
|
val colorFrom = ContextCompat.getColor(joinButton.context, R.color.palette_element_green)
|
||||||
// This is a special color, not defined in the palette
|
val colorTo = ContextCompat.getColor(joinButton.context, R.color.join_conference_animated_color)
|
||||||
val colorTo = Color.parseColor("#0BAC7E")
|
|
||||||
// Animate button color to highlight
|
// Animate button color to highlight
|
||||||
ValueAnimator.ofObject(ArgbEvaluator(), colorFrom, colorTo).apply {
|
ValueAnimator.ofObject(ArgbEvaluator(), colorFrom, colorTo).apply {
|
||||||
repeatMode = ValueAnimator.REVERSE
|
repeatMode = ValueAnimator.REVERSE
|
||||||
|
|
|
@ -368,7 +368,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
||||||
}
|
}
|
||||||
return@withState
|
return@withState
|
||||||
}
|
}
|
||||||
when (action.broadcastEvent.type) {
|
when (action.jitsiEvent.type) {
|
||||||
BroadcastEvent.Type.CONFERENCE_JOINED,
|
BroadcastEvent.Type.CONFERENCE_JOINED,
|
||||||
BroadcastEvent.Type.CONFERENCE_TERMINATED -> {
|
BroadcastEvent.Type.CONFERENCE_TERMINATED -> {
|
||||||
setState { copy(jitsiState = jitsiState.copy(hasJoined = activeConferenceHolder.isJoined(jitsiState.confId))) }
|
setState { copy(jitsiState = jitsiState.copy(hasJoined = activeConferenceHolder.isJoined(jitsiState.confId))) }
|
||||||
|
|
|
@ -3302,12 +3302,10 @@
|
||||||
<item quantity="other">1 active call (%1$s) · %2$d paused calls</item>
|
<item quantity="other">1 active call (%1$s) · %2$d paused calls</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
<plurals name="call_active_status">
|
<plurals name="call_active_status">
|
||||||
<item quantity="one">Active call (%1$s)</item>
|
<item quantity="one">Active call ·</item>
|
||||||
<item quantity="other">%1$d active calls</item>
|
<item quantity="other">%1$d active calls ·</item>
|
||||||
</plurals>
|
</plurals>
|
||||||
|
|
||||||
<string name="call_one_active">Active call (%1$s) ·</string>
|
<string name="call_one_active">Active call (%1$s) ·</string>
|
||||||
<string name="call_multiple_active">%1$d active calls ·</string>
|
|
||||||
<string name="call_tap_to_return">%1$s Tap to return</string>
|
<string name="call_tap_to_return">%1$s Tap to return</string>
|
||||||
|
|
||||||
<string name="call_transfer_consult_first">Consult first</string>
|
<string name="call_transfer_consult_first">Consult first</string>
|
||||||
|
|
Loading…
Add table
Reference in a new issue