~repos /only-bible-app

#kotlin#android#ios

git clone https://pyrossh.dev/repos/only-bible-app.git

The only bible app you will ever need. No ads. No in-app purchases. No distractions.


c9127aa3 pyrossh

1 year ago
fix searchbar view
app/src/main/java/dev/pyrossh/onlyBible/ChapterScreen.kt CHANGED
@@ -141,6 +141,7 @@ fun ChapterScreen(
141
141
  }
142
142
  if (isSearchShown) {
143
143
  EmbeddedSearchBar(
144
+ modifier = Modifier.padding(horizontal = 16.dp),
144
145
  model = model,
145
146
  onDismiss = { isSearchShown = false },
146
147
  )
@@ -190,6 +191,7 @@ fun ChapterScreen(
190
191
  IconButton(
191
192
  onClick = {
192
193
  view.playSoundEffect(SoundEffectConstants.CLICK)
194
+ model.clearSelectedVerses()
193
195
  isSearchShown = true
194
196
  },
195
197
  ) {
app/src/main/java/dev/pyrossh/onlyBible/composables/EmbeddedSearchBar.kt CHANGED
@@ -1,7 +1,9 @@
1
1
  package dev.pyrossh.onlyBible.composables
2
2
 
3
3
  import android.view.SoundEffectConstants
4
+ import androidx.compose.foundation.layout.Spacer
4
- import androidx.compose.foundation.layout.fillMaxWidth
5
+ import androidx.compose.foundation.layout.fillMaxSize
6
+ import androidx.compose.foundation.layout.navigationBarsPadding
5
7
  import androidx.compose.foundation.layout.padding
6
8
  import androidx.compose.foundation.lazy.LazyColumn
7
9
  import androidx.compose.foundation.lazy.items
@@ -33,6 +35,7 @@ import dev.pyrossh.onlyBible.AppViewModel
33
35
  @Composable
34
36
  @OptIn(ExperimentalMaterial3Api::class)
35
37
  fun EmbeddedSearchBar(
38
+ modifier: Modifier = Modifier,
36
39
  model: AppViewModel,
37
40
  onDismiss: () -> Unit,
38
41
  ) {
@@ -50,9 +53,9 @@ fun EmbeddedSearchBar(
50
53
  )
51
54
  ) {
52
55
  SearchBar(
53
- modifier = Modifier
56
+ modifier = modifier
54
- .fillMaxWidth()
57
+ .fillMaxSize()
55
- .padding(horizontal = 16.dp)
58
+ .navigationBarsPadding()
56
59
  .focusRequester(textFieldFocusRequester),
57
60
  query = searchText,
58
61
  onQueryChange = model::onSearchTextChange,
@@ -118,6 +121,7 @@ fun EmbeddedSearchBar(
118
121
  verse = v,
119
122
  highlightWord = searchText,
120
123
  )
124
+ Spacer(modifier = Modifier.padding(bottom = 8.dp))
121
125
  }
122
126
  }
123
127
  }