Ganfra's review

This commit is contained in:
Benoit Marty 2021-02-08 17:43:11 +01:00
parent 6ee6b0cad9
commit 4d3262ce41

View file

@ -56,18 +56,9 @@ class WidgetItemFactory @Inject constructor(
val previousWidgetContent: WidgetContent? = event.root.resolvedPrevContent().toModel()
return when (WidgetType.fromString(widgetContent.type ?: previousWidgetContent?.type ?: "")) {
WidgetType.Jitsi -> createJitsiItem(event, callback, widgetContent, previousWidgetContent)
WidgetType.TradingView,
WidgetType.Spotify,
WidgetType.Video,
WidgetType.GoogleDoc,
WidgetType.GoogleCalendar,
WidgetType.Etherpad,
WidgetType.StickerPicker,
WidgetType.Grafana,
WidgetType.Custom,
WidgetType.IntegrationManager,
is WidgetType.Fallback -> noticeItemFactory.create(event, highlight, roomSummaryHolder.roomSummary, callback)
WidgetType.Jitsi -> createJitsiItem(event, callback, widgetContent, previousWidgetContent)
// There is lot of other widget types we could improve here
else -> noticeItemFactory.create(event, highlight, roomSummaryHolder.roomSummary, callback)
}
}