From 6583f3326c467ec4a5ddba2770c559a686dbcde8 Mon Sep 17 00:00:00 2001 From: Ash Date: Fri, 13 May 2022 11:37:36 +0800 Subject: [PATCH] Optimize text display --- app/src/main/java/me/ash/reader/ui/page/home/FilterBar.kt | 7 ++++--- .../me/ash/reader/ui/page/settings/languages/Languages.kt | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/me/ash/reader/ui/page/home/FilterBar.kt b/app/src/main/java/me/ash/reader/ui/page/home/FilterBar.kt index 06f47d3..a9307e7 100644 --- a/app/src/main/java/me/ash/reader/ui/page/home/FilterBar.kt +++ b/app/src/main/java/me/ash/reader/ui/page/home/FilterBar.kt @@ -10,8 +10,8 @@ import androidx.compose.material3.* import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalView +import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.Dp -import com.google.accompanist.pager.ExperimentalPagerApi import me.ash.reader.data.entity.Filter import me.ash.reader.data.preference.FlowFilterBarStylePreference import me.ash.reader.data.preference.LocalThemeIndex @@ -19,7 +19,6 @@ import me.ash.reader.ui.ext.getName import me.ash.reader.ui.ext.surfaceColorAtElevation import me.ash.reader.ui.theme.palette.onDark -@OptIn(ExperimentalPagerApi::class) @Composable fun FilterBar( modifier: Modifier = Modifier, @@ -69,7 +68,9 @@ fun FilterBar( { Text( text = item.getName(), - style = MaterialTheme.typography.labelLarge + style = MaterialTheme.typography.labelLarge, + maxLines = 1, + overflow = TextOverflow.Ellipsis, ) } }, diff --git a/app/src/main/java/me/ash/reader/ui/page/settings/languages/Languages.kt b/app/src/main/java/me/ash/reader/ui/page/settings/languages/Languages.kt index 786b17f..66edf01 100644 --- a/app/src/main/java/me/ash/reader/ui/page/settings/languages/Languages.kt +++ b/app/src/main/java/me/ash/reader/ui/page/settings/languages/Languages.kt @@ -80,7 +80,7 @@ fun Languages( context.startActivity( Intent( Intent.ACTION_VIEW, - Uri.parse(context.getString(R.string.github_link)) + Uri.parse("https://github.com/Ashinch/ReadYou/issues/56") ) ) }