Skip to content

Commit

Permalink
refactor: Collection sheet cleanup (#2238)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsPronay authored Nov 15, 2024
1 parent 2aa1103 commit 15a98c3
Show file tree
Hide file tree
Showing 69 changed files with 938 additions and 3,235 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import kotlinx.coroutines.launch
@Composable
fun MifosBottomSheet(
content: @Composable () -> Unit,
onDismiss: () -> Unit
onDismiss: () -> Unit,
modifier: Modifier = Modifier,
) {
val coroutineScope = rememberCoroutineScope()
val modalSheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true)
Expand All @@ -44,14 +45,17 @@ fun MifosBottomSheet(
dismissSheet()
}

AnimatedVisibility(visible = showBottomSheet) {
AnimatedVisibility(
modifier = modifier,
visible = showBottomSheet,
) {
ModalBottomSheet(
containerColor = Color.White,
onDismissRequest = {
showBottomSheet = false
dismissSheet()
},
sheetState = modalSheetState
sheetState = modalSheetState,
) {
content()
}
Expand All @@ -61,9 +65,12 @@ fun MifosBottomSheet(
@Preview
@Composable
fun MifosBottomSheetPreview() {
MifosBottomSheet({
Box {
Modifier.height(100.dp)
}
}, {})
MifosBottomSheet(
{
Box {
Modifier.height(100.dp)
}
},
{},
)
}
4 changes: 0 additions & 4 deletions feature/collection-sheet/src/main/AndroidManifest.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright 2024 Mifos Initiative
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
*/
plugins {
alias(libs.plugins.mifos.android.feature)
alias(libs.plugins.mifos.android.library.compose)
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
/*
* Copyright 2024 Mifos Initiative
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
*/
package com.mifos.feature.individual

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import androidx.test.platform.app.InstrumentationRegistry
import junit.framework.TestCase.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
Expand All @@ -21,4 +28,4 @@ class ExampleInstrumentedTest {
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.mifos.feature.individual.test", appContext.packageName)
}
}
}
13 changes: 13 additions & 0 deletions feature/collectionSheet/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2024 Mifos Initiative
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file,
You can obtain one at https://mozilla.org/MPL/2.0/.
See https://github.com/openMF/android-client/blob/master/LICENSE.md
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

</manifest>
Loading

0 comments on commit 15a98c3

Please sign in to comment.