Create custom widget args for element call.
This commit is contained in:
parent
125135c250
commit
61f05e78a3
|
@ -465,6 +465,9 @@ class DefaultNavigator @Inject constructor(
|
||||||
val enableVideo = options?.get(JitsiCallViewModel.ENABLE_VIDEO_OPTION) == true
|
val enableVideo = options?.get(JitsiCallViewModel.ENABLE_VIDEO_OPTION) == true
|
||||||
context.startActivity(VectorJitsiActivity.newIntent(context, roomId = roomId, widgetId = widget.widgetId, enableVideo = enableVideo))
|
context.startActivity(VectorJitsiActivity.newIntent(context, roomId = roomId, widgetId = widget.widgetId, enableVideo = enableVideo))
|
||||||
}
|
}
|
||||||
|
} else if (widget.type is WidgetType.ElementCall) {
|
||||||
|
val widgetArgs = widgetArgsBuilder.buildElementCallWidgetArgs(roomId, widget)
|
||||||
|
context.startActivity(WidgetActivity.newIntent(context, widgetArgs))
|
||||||
} else {
|
} else {
|
||||||
val widgetArgs = widgetArgsBuilder.buildRoomWidgetArgs(roomId, widget)
|
val widgetArgs = widgetArgsBuilder.buildRoomWidgetArgs(roomId, widget)
|
||||||
context.startActivity(WidgetActivity.newIntent(context, widgetArgs))
|
context.startActivity(WidgetActivity.newIntent(context, widgetArgs))
|
||||||
|
|
|
@ -78,6 +78,13 @@ class WidgetArgsBuilder @Inject constructor(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun buildElementCallWidgetArgs(roomId: String, widget: Widget): WidgetArgs {
|
||||||
|
return buildRoomWidgetArgs(roomId, widget)
|
||||||
|
.copy(
|
||||||
|
kind = WidgetKind.ELEMENT_CALL
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
private fun Map<String, String?>.filterNotNull(): Map<String, String> {
|
private fun Map<String, String?>.filterNotNull(): Map<String, String> {
|
||||||
return filterValues { it != null } as Map<String, String>
|
return filterValues { it != null } as Map<String, String>
|
||||||
|
|
Loading…
Reference in New Issue