Update design and behaviour on widget permission bottom sheet
This commit is contained in:
parent
c4e578a653
commit
29d4916a2e
|
@ -0,0 +1 @@
|
|||
Update design and behaviour on widget permission bottom sheet
|
|
@ -4,10 +4,13 @@
|
|||
<!-- BottomSheet theming -->
|
||||
<style name="Theme.Vector.BottomSheetDialog.Light" parent="Theme.MaterialComponents.Light.BottomSheetDialog">
|
||||
<item name="colorPrimary">@color/element_accent_light</item>
|
||||
<item name="colorOnPrimary">@color/palette_white</item>
|
||||
<item name="colorSecondary">@color/palette_element_green</item>
|
||||
<item name="colorOnSecondary">@color/palette_white</item>
|
||||
<item name="colorSurface">@color/element_background_light</item>
|
||||
<item name="colorOnSurface">@color/element_content_primary_light</item>
|
||||
<item name="colorError">@color/element_alert_light</item>
|
||||
<item name="colorOnError">@color/palette_white</item>
|
||||
<!-- Default color for text View -->
|
||||
<item name="android:textColorTertiary">@color/element_content_primary_light</item>
|
||||
<item name="android:textColorLink">@color/element_link_light</item>
|
||||
|
@ -15,10 +18,13 @@
|
|||
|
||||
<style name="Theme.Vector.BottomSheetDialog.Dark" parent="Theme.MaterialComponents.BottomSheetDialog">
|
||||
<item name="colorPrimary">@color/element_accent_dark</item>
|
||||
<item name="colorOnPrimary">@color/palette_white</item>
|
||||
<item name="colorSecondary">@color/palette_element_green</item>
|
||||
<item name="colorOnSecondary">@color/palette_white</item>
|
||||
<item name="colorSurface">@color/element_background_dark</item>
|
||||
<item name="colorOnSurface">@color/element_content_primary_dark</item>
|
||||
<item name="colorError">@color/element_alert_dark</item>
|
||||
<item name="colorOnError">@color/palette_white</item>
|
||||
<!-- Default color for text View -->
|
||||
<item name="android:textColorTertiary">@color/element_content_primary_dark</item>
|
||||
<item name="android:textColorLink">@color/element_link_dark</item>
|
||||
|
@ -59,4 +65,4 @@
|
|||
<item name="android:textSize">12sp</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
</resources>
|
||||
|
|
|
@ -65,4 +65,4 @@
|
|||
<item name="colorPrimary">?colorOnPrimary</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
</resources>
|
||||
|
|
|
@ -21,5 +21,4 @@ import im.vector.app.core.platform.VectorViewModelAction
|
|||
sealed class RoomWidgetPermissionActions : VectorViewModelAction {
|
||||
object AllowWidget : RoomWidgetPermissionActions()
|
||||
object BlockWidget : RoomWidgetPermissionActions()
|
||||
object DoClose : RoomWidgetPermissionActions()
|
||||
}
|
||||
|
|
|
@ -102,8 +102,9 @@ class RoomWidgetPermissionBottomSheet :
|
|||
}
|
||||
|
||||
override fun onCancel(dialog: DialogInterface) {
|
||||
viewModel.handle(RoomWidgetPermissionActions.BlockWidget)
|
||||
directListener?.invoke(false)
|
||||
super.onCancel(dialog)
|
||||
viewModel.handle(RoomWidgetPermissionActions.DoClose)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
|
@ -95,7 +95,6 @@ class RoomWidgetPermissionViewModel @AssistedInject constructor(
|
|||
when (action) {
|
||||
RoomWidgetPermissionActions.AllowWidget -> handleAllowWidget()
|
||||
RoomWidgetPermissionActions.BlockWidget -> handleRevokeWidget()
|
||||
RoomWidgetPermissionActions.DoClose -> Unit
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/layout_vertical_margin_big"
|
||||
android:layout_marginTop="@dimen/layout_vertical_margin"
|
||||
android:gravity="end"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
|
Loading…
Reference in New Issue