format fixes

This commit is contained in:
Satindar Dhillon 2022-08-25 21:05:38 -07:00
parent 6d1b2482c0
commit 3ea8304726
2 changed files with 25 additions and 27 deletions

View file

@ -1,4 +1,4 @@
package app.omnivore.omnivore
package app.omnivore.omnivore.ui.save
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*
@ -12,37 +12,36 @@ import androidx.compose.material.ButtonDefaults
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import app.omnivore.omnivore.ui.save.SaveViewModel
import kotlinx.coroutines.launch
@Composable
@OptIn(ExperimentalMaterialApi::class)
fun SaveContent(viewModel: SaveViewModel, modalBottomSheetState: ModalBottomSheetState, modifier: Modifier) {
val coroutineScope = rememberCoroutineScope()
val coroutineScope = rememberCoroutineScope()
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colors.background) {
Column(
verticalArrangement = Arrangement.SpaceBetween,
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier
.background(MaterialTheme.colors.background)
.fillMaxSize()
.padding(top = 48.dp, bottom = 32.dp)
) {
Text(text = viewModel.message ?: "Saving")
Button(onClick = {
coroutineScope.launch {
modalBottomSheetState.hide()
}
},
colors = ButtonDefaults.buttonColors(
contentColor = Color(0xFF3D3D3D),
backgroundColor = Color(0xffffd234)
)
) {
Text(text = "Dismiss")
}
}
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colors.background) {
Column(
verticalArrangement = Arrangement.SpaceBetween,
horizontalAlignment = Alignment.CenterHorizontally,
modifier = Modifier
.background(MaterialTheme.colors.background)
.fillMaxSize()
.padding(top = 48.dp, bottom = 32.dp)
) {
Text(text = viewModel.message ?: "Saving")
Button(onClick = {
coroutineScope.launch {
modalBottomSheetState.hide()
}
},
colors = ButtonDefaults.buttonColors(
contentColor = Color(0xFF3D3D3D),
backgroundColor = Color(0xffffd234)
)
) {
Text(text = "Dismiss")
}
}
}
}

View file

@ -18,7 +18,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import app.omnivore.omnivore.SaveContent
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch