@@ -15,8 +15,6 @@ import androidx.compose.foundation.layout.Spacer
1515import androidx.compose.foundation.layout.fillMaxSize
1616import androidx.compose.foundation.layout.fillMaxWidth
1717import androidx.compose.foundation.layout.height
18- import androidx.compose.foundation.layout.imeNestedScroll
19- import androidx.compose.foundation.layout.imePadding
2018import androidx.compose.foundation.layout.padding
2119import androidx.compose.foundation.layout.size
2220import androidx.compose.foundation.layout.width
@@ -116,7 +114,7 @@ fun HomeScreen(
116114 modifier : Modifier = Modifier ,
117115 navController : NavHostController ,
118116 initialUrl : String? = null,
119- viewModel : SummaryViewModel = hiltViewModel()
117+ viewModel : SummaryViewModel = hiltViewModel(),
120118) {
121119 var isExtracting by remember { mutableStateOf(false ) } // For Loading-Animation
122120 var url by remember { mutableStateOf(initialUrl ? : " " ) }
@@ -270,7 +268,7 @@ fun HomeScreen(
270268@Composable
271269private fun HomeTopAppBar (
272270 navController : NavHostController ,
273- scrollBehavior : TopAppBarScrollBehavior
271+ scrollBehavior : TopAppBarScrollBehavior ,
274272) {
275273 MediumFlexibleTopAppBar (
276274 modifier = Modifier .height(100 .dp),
@@ -313,7 +311,7 @@ private fun UrlInputSection(
313311 isExtracting : Boolean ,
314312 multiLine : Boolean ,
315313 singleLine : Boolean ,
316- onSingleLineChange : (Boolean ) -> Unit
314+ onSingleLineChange : (Boolean ) -> Unit ,
317315) {
318316 val showCancelIcon = remember(url) { url.isNotBlank() }
319317
@@ -370,12 +368,13 @@ private fun UrlInputSection(
370368 .size(55 .dp)
371369 .align(Alignment .Center )
372370 )
371+ } else {
372+ Icon (
373+ if (isDocument) Icons .Filled .CheckCircle else Icons .Filled .AddCircle ,
374+ contentDescription = " Floating action button" ,
375+ modifier = Modifier .align(Alignment .Center )
376+ )
373377 }
374- Icon (
375- if (isDocument && ! isExtracting) Icons .Filled .CheckCircle else Icons .Filled .AddCircle ,
376- contentDescription = " Floating action button" ,
377- modifier = Modifier .align(Alignment .Center )
378- )
379378 }
380379 }
381380 if (multiLine) {
@@ -436,7 +435,7 @@ private fun SummaryLengthSelector(
436435private fun SummaryResultSection (
437436 summaryResult : SummaryResult ,
438437 url : String ,
439- onRegenerate : () -> Unit
438+ onRegenerate : () -> Unit ,
440439) {
441440 val scope = rememberCoroutineScope()
442441 val clipboard = LocalClipboard .current
@@ -490,7 +489,7 @@ private fun SummaryResultSection(
490489private fun HomeFloatingActionButtons (
491490 onPaste : () -> Unit ,
492491 onSummarize : () -> Unit ,
493- isExtracting : Boolean
492+ isExtracting : Boolean ,
494493) {
495494 val context = LocalContext .current
496495 val stillLoading = stringResource(id = R .string.stillLoading)
0 commit comments