File tree Expand file tree Collapse file tree 1 file changed +16
-6
lines changed
app/src/main/java/org/nsh07/wikireader/ui/homeScreen Expand file tree Collapse file tree 1 file changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -151,9 +151,14 @@ fun ArticleLanguageBottomSheet(
151151 supportingContent = { Text (it.title) },
152152 modifier = Modifier
153153 .clip(
154- if (index == 0 ) topListItemShape
155- else if (index == articleLangs.first.size - 1 ) bottomListItemShape
156- else middleListItemShape
154+ if (articleLangs.first.size == 1 ) shapes.large
155+ else {
156+ when (index) {
157+ 0 -> topListItemShape
158+ articleLangs.first.size - 1 -> bottomListItemShape
159+ else -> middleListItemShape
160+ }
161+ }
157162 )
158163 .clickable(
159164 onClick = {
@@ -201,9 +206,14 @@ fun ArticleLanguageBottomSheet(
201206 supportingContent = { Text (it.title) },
202207 modifier = Modifier
203208 .clip(
204- if (index == 0 ) topListItemShape
205- else if (index == articleLangs.second.size - 1 ) bottomListItemShape
206- else middleListItemShape
209+ if (articleLangs.second.size == 1 ) shapes.large
210+ else {
211+ when (index) {
212+ 0 -> topListItemShape
213+ articleLangs.second.size - 1 -> bottomListItemShape
214+ else -> middleListItemShape
215+ }
216+ }
207217 )
208218 .clickable(
209219 onClick = {
You can’t perform that action at this time.
0 commit comments