New voip design: clean after benoit review

This commit is contained in:
ganfra 2021-08-26 11:08:34 +02:00
parent 42bfa129b3
commit 4518962658
7 changed files with 41 additions and 12 deletions

View file

@ -28,6 +28,7 @@
<!-- Other useful color -->
<!-- Emoji text has to use a black text 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>

View file

@ -194,6 +194,37 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
</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>
<li>
<b>com.github.piasy:BigImageViewer</b>

View file

@ -69,7 +69,7 @@ class CurrentCallsView @JvmOverloads constructor(
}
}
} 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)
}

View file

@ -97,7 +97,7 @@ sealed class RoomDetailAction : VectorViewModelAction {
data class EnsureNativeWidgetAllowed(val widget: Widget,
val userJustAccepted: Boolean,
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 JumpToReadReceipt(val userId: String) : RoomDetailAction()

View file

@ -326,7 +326,7 @@ class RoomDetailFragment @Inject constructor(
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
lifecycle.addObserver(JitsiBroadcastEventObserver(vectorBaseActivity, this::onBroadcastEvent))
lifecycle.addObserver(JitsiBroadcastEventObserver(vectorBaseActivity, this::onBroadcastJitsiEvent))
super.onViewCreated(view, savedInstanceState)
sharedActionViewModel = activityViewModelProvider.get(MessageSharedActionViewModel::class.java)
knownCallsViewModel = activityViewModelProvider.get(SharedKnownCallsViewModel::class.java)
@ -459,8 +459,8 @@ class RoomDetailFragment @Inject constructor(
JitsiBroadcastEmitter(vectorBaseActivity).emitConferenceEnded()
}
private fun onBroadcastEvent(event: BroadcastEvent) {
roomDetailViewModel.handle(RoomDetailAction.UpdateJoinJitsiCallStatus(event))
private fun onBroadcastJitsiEvent(jitsiEvent: BroadcastEvent) {
roomDetailViewModel.handle(RoomDetailAction.UpdateJoinJitsiCallStatus(jitsiEvent))
}
private fun onCannotRecord() {
@ -872,8 +872,7 @@ class RoomDetailFragment @Inject constructor(
joinConfItem.actionView.findViewById<MaterialButton>(R.id.join_conference_button).also { joinButton ->
joinButton.setOnClickListener { roomDetailViewModel.handle(RoomDetailAction.JoinJitsiCall) }
val colorFrom = ContextCompat.getColor(joinButton.context, R.color.palette_element_green)
// This is a special color, not defined in the palette
val colorTo = Color.parseColor("#0BAC7E")
val colorTo = ContextCompat.getColor(joinButton.context, R.color.join_conference_animated_color)
// Animate button color to highlight
ValueAnimator.ofObject(ArgbEvaluator(), colorFrom, colorTo).apply {
repeatMode = ValueAnimator.REVERSE

View file

@ -368,7 +368,7 @@ class RoomDetailViewModel @AssistedInject constructor(
}
return@withState
}
when (action.broadcastEvent.type) {
when (action.jitsiEvent.type) {
BroadcastEvent.Type.CONFERENCE_JOINED,
BroadcastEvent.Type.CONFERENCE_TERMINATED -> {
setState { copy(jitsiState = jitsiState.copy(hasJoined = activeConferenceHolder.isJoined(jitsiState.confId))) }

View file

@ -3302,12 +3302,10 @@
<item quantity="other">1 active call (%1$s) · %2$d paused calls</item>
</plurals>
<plurals name="call_active_status">
<item quantity="one">Active call (%1$s)</item>
<item quantity="other">%1$d active calls</item>
<item quantity="one">Active call ·</item>
<item quantity="other">%1$d active calls ·</item>
</plurals>
<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_transfer_consult_first">Consult first</string>