File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
app/src/main/java/to/bitkit/ui/screens/wallets/activity Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 11package to.bitkit.ui.screens.wallets.activity
22
3+ import androidx.activity.compose.BackHandler
34import androidx.compose.animation.core.Animatable
45import androidx.compose.animation.core.Spring
56import androidx.compose.animation.core.spring
@@ -104,21 +105,25 @@ private const val TODAY_INDICATOR_ALPHA = 0.1f
104105
105106@Composable
106107fun DateRangeSelectorSheet () {
107- val activity = activityListViewModel ? : return
108+ val activityListVM = activityListViewModel ? : return
108109 val app = appViewModel ? : return
109110
110- val startDate by activity.startDate.collectAsState()
111- val endDate by activity.endDate.collectAsState()
111+ val startDate by activityListVM.startDate.collectAsState()
112+ val endDate by activityListVM.endDate.collectAsState()
113+
114+ BackHandler {
115+ app.hideSheet()
116+ }
112117
113118 Content (
114119 initialStartDate = startDate,
115120 initialEndDate = endDate,
116121 onClearClick = {
117- activity .clearDateRange()
122+ activityListVM .clearDateRange()
118123 app.hideSheet()
119124 },
120125 onApplyClick = { start, end ->
121- activity .setDateRange(
126+ activityListVM .setDateRange(
122127 startDate = start,
123128 endDate = end,
124129 )
You can’t perform that action at this time.
0 commit comments