~repos /only-bible-app

#kotlin#android#ios

git clone https://pyrossh.dev/repos/only-bible-app.git
Discussions: https://groups.google.com/g/rust-embed-devs

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


9ea0c142 pyrossh

1 year ago
menu improvements
app/src/main/java/dev/pyrossh/onlyBible/composables/BibleSelector.kt CHANGED
@@ -10,8 +10,6 @@ import androidx.compose.foundation.lazy.rememberLazyListState
10
10
  import androidx.compose.foundation.shape.RoundedCornerShape
11
11
  import androidx.compose.material3.Card
12
12
  import androidx.compose.material3.ListItem
13
- import androidx.compose.material3.ListItemDefaults
14
- import androidx.compose.material3.MaterialTheme
15
13
  import androidx.compose.material3.Text
16
14
  import androidx.compose.runtime.Composable
17
15
  import androidx.compose.ui.Modifier
@@ -45,18 +43,6 @@ fun BibleSelector(
45
43
  .height(height),
46
44
  shape = RoundedCornerShape(8.dp),
47
45
  ) {
48
- ListItem(
49
- colors = ListItemDefaults.colors(
50
- containerColor = MaterialTheme.colorScheme.primaryContainer,
51
- ),
52
- headlineContent = {
53
- Text(
54
- modifier = Modifier.padding(start = 4.dp),
55
- fontWeight = FontWeight.W600,
56
- text = "Bibles",
57
- )
58
- },
59
- )
60
46
  LazyColumn(
61
47
  state = scrollState
62
48
  ) {
app/src/main/java/dev/pyrossh/onlyBible/composables/ChapterSelector.kt CHANGED
@@ -77,7 +77,7 @@ fun ChapterSelector(
77
77
  },
78
78
  colors = ListItemDefaults.colors(
79
79
  containerColor = if (expanded)
80
- MaterialTheme.colorScheme.primaryContainer
80
+ MaterialTheme.colorScheme.surfaceContainer
81
81
  else
82
82
  MaterialTheme.colorScheme.background
83
83
  ),
@@ -87,10 +87,7 @@ fun ChapterSelector(
87
87
  // .fillMaxWidth()
88
88
  // .wrapContentWidth(Alignment.CenterHorizontally),
89
89
  fontWeight = FontWeight.W600,
90
- text = if (expanded)
91
- "Books"
92
- else
93
- bookNames[bookIndex]
90
+ text = bookNames[bookIndex]
94
91
  )
95
92
  },
96
93
  trailingContent = {
@@ -101,7 +98,7 @@ fun ChapterSelector(
101
98
  LazyColumn(
102
99
  state = scrollState,
103
100
  ) {
104
- items(bookNames) {
101
+ items(bookNames.filter { it != bookNames[bookIndex] }) {
105
102
  ListItem(
106
103
  modifier = Modifier.clickable {
107
104
  bookIndex = bookNames.indexOf(it)