diff --git a/src/debug/java/Previews.kt b/src/debug/java/Previews.kt
index 83010ed2..2ac2d0c4 100644
--- a/src/debug/java/Previews.kt
+++ b/src/debug/java/Previews.kt
@@ -1,7 +1,12 @@
+import android.net.Uri
import androidx.compose.foundation.layout.Column
import androidx.compose.runtime.Composable
+import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
+import com.machiav3lli.fdroid.R
+import com.machiav3lli.fdroid.entity.LinkType
import com.machiav3lli.fdroid.ui.compose.pages.app_detail.components.AntiFeaturesGrid
+import com.machiav3lli.fdroid.ui.compose.pages.app_detail.components.LinkItem
import com.machiav3lli.fdroid.ui.compose.pages.app_detail.components.PermissionGrid
import com.machiav3lli.fdroid.ui.compose.pages.app_detail.components.ReleaseItem
import com.machiav3lli.fdroid.ui.compose.theme.AppTheme
@@ -27,6 +32,20 @@ fun CustomChipPrev() {
}
}
+@Preview
+@Composable
+fun LinkItemPreview() {
+ AppTheme(blackTheme = false) {
+ LinkItem(
+ linkType = LinkType(
+ R.drawable.ic_email,
+ stringResource(id = R.string.author_email),
+ Uri.parse("neostore@neoapps.com")
+ )
+ )
+ }
+}
+
@Preview
@Composable
fun ChipGridPreview() {
diff --git a/src/main/kotlin/com/machiav3lli/fdroid/ui/compose/pages/app_detail/components/LinkItem.kt b/src/main/kotlin/com/machiav3lli/fdroid/ui/compose/pages/app_detail/components/LinkItem.kt
index d9da564a..148a4fd1 100644
--- a/src/main/kotlin/com/machiav3lli/fdroid/ui/compose/pages/app_detail/components/LinkItem.kt
+++ b/src/main/kotlin/com/machiav3lli/fdroid/ui/compose/pages/app_detail/components/LinkItem.kt
@@ -17,13 +17,9 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.painterResource
-import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextOverflow
-import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
-import com.machiav3lli.fdroid.R
import com.machiav3lli.fdroid.entity.LinkType
-import com.machiav3lli.fdroid.ui.compose.theme.AppTheme
@OptIn(ExperimentalFoundationApi::class)
@Composable
@@ -59,7 +55,7 @@ fun LinkItem(
maxLines = 1,
style = MaterialTheme.typography.titleMedium
)
- if(linkType.link!=null){
+ if (linkType.link != null) {
Text(
text = linkType.link.toString(),
style = MaterialTheme.typography.bodySmall,
@@ -71,16 +67,3 @@ fun LinkItem(
}
}
}
-
-@Preview
-@Composable
-fun LinkItemPreview() {
- AppTheme(blackTheme = false) {
- LinkItem(
- linkType = LinkType(
- R.drawable.ic_email,
- stringResource(id = R.string.author_email),
- Uri.parse("neostore@neoapps.com"))
- )
- }
-}
\ No newline at end of file
diff --git a/src/main/kotlin/com/machiav3lli/fdroid/ui/compose/pages/app_detail/components/TextBlock.kt b/src/main/kotlin/com/machiav3lli/fdroid/ui/compose/pages/app_detail/components/TextBlock.kt
index f116a2f3..8dca2901 100644
--- a/src/main/kotlin/com/machiav3lli/fdroid/ui/compose/pages/app_detail/components/TextBlock.kt
+++ b/src/main/kotlin/com/machiav3lli/fdroid/ui/compose/pages/app_detail/components/TextBlock.kt
@@ -25,10 +25,6 @@ import androidx.compose.ui.unit.dp
import com.machiav3lli.fdroid.R
import de.charlex.compose.HtmlText
-/*
-* Annotate String in this way https://stackoverflow.com/questions/65567412/jetpack-compose-text-hyperlink-some-section-of-the-text/69549929#69549929
-* TODO REMOVE usage of HtmlText
-* */
@Composable
fun HtmlTextBlock(
modifier: Modifier = Modifier,
diff --git a/src/main/kotlin/com/machiav3lli/fdroid/ui/fragments/AppSheetX.kt b/src/main/kotlin/com/machiav3lli/fdroid/ui/fragments/AppSheetX.kt
index 35713ffd..2e845fd9 100644
--- a/src/main/kotlin/com/machiav3lli/fdroid/ui/fragments/AppSheetX.kt
+++ b/src/main/kotlin/com/machiav3lli/fdroid/ui/fragments/AppSheetX.kt
@@ -178,7 +178,7 @@ class AppSheetX() : FullscreenBottomSheetDialogFragment(), Callbacks {
}
viewModel.downloadState.value = state
viewModel.updateActions()
- if (downloadState is DownloadService.State.Success && !rootInstallerEnabled) { // && isResumed
+ if (downloadState is DownloadService.State.Success && !rootInstallerEnabled) { // && isResumed TODO unite root and normal install calls
withContext(Dispatchers.Default) {
AppInstaller.getInstance(context)?.defaultInstaller?.install(downloadState.release.cacheFileName)
}
diff --git a/src/main/res/values/styles.xml b/src/main/res/values/styles.xml
index afc3d857..7b1b1081 100644
--- a/src/main/res/values/styles.xml
+++ b/src/main/res/values/styles.xml
@@ -31,7 +31,7 @@
- @color/md_theme_light_primaryInverse
- @color/md_theme_light_surface
- @android:color/transparent
- - true
+ - true
- @style/Theme.Chip.Category
- @style/Theme.Design.BottomSheetDialog