diff --git a/android/Omnivore/app/build.gradle.kts b/android/Omnivore/app/build.gradle.kts index 30d2ac471..b3b0602fd 100644 --- a/android/Omnivore/app/build.gradle.kts +++ b/android/Omnivore/app/build.gradle.kts @@ -27,8 +27,8 @@ android { applicationId = "app.omnivore.omnivore" minSdk = 26 targetSdk = 34 - versionCode = 194 - versionName = "0.194.0" + versionCode = 194001 + versionName = "0.194.1" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { @@ -148,8 +148,6 @@ dependencies { implementation(libs.apollo.runtime) - // TODO: Remove in favor of new Compose libs - implementation(libs.accompanist.systemuicontroller) implementation(libs.accompanist.flowlayout) implementation(libs.coil.kt.compose) @@ -168,7 +166,7 @@ dependencies { implementation(libs.androidx.lifecycle.runtimeCompose) - implementation("androidx.core:core-splashscreen:1.0.1") + implementation(libs.androidx.core.splashscreen) } diff --git a/android/Omnivore/app/src/main/AndroidManifest.xml b/android/Omnivore/app/src/main/AndroidManifest.xml index cd041b041..b143c2f12 100644 --- a/android/Omnivore/app/src/main/AndroidManifest.xml +++ b/android/Omnivore/app/src/main/AndroidManifest.xml @@ -16,6 +16,7 @@ android:label="@string/app_name" android:supportsRtl="true" android:largeHeap="true" + android:theme="@style/Theme.AppCompat.Translucent" tools:targetApi="31"> { Text( text = stringResource(id = R.string.welcome_title), + color = MaterialTheme.colorScheme.onSurface, style = MaterialTheme.typography.headlineLarge ) Text( text = stringResource(id = R.string.welcome_subtitle), + color = MaterialTheme.colorScheme.onSurface, style = MaterialTheme.typography.titleSmall ) @@ -117,8 +103,7 @@ fun WelcomeScreenContent(viewModel: LoginViewModel) { if (viewModel.errorMessage != null) { coroutineScope.launch { - val result = snackBarHostState - .showSnackbar( + val result = snackBarHostState.showSnackbar( viewModel.errorMessage!!, actionLabel = "Dismiss", duration = SnackbarDuration.Indefinite @@ -135,9 +120,8 @@ fun WelcomeScreenContent(viewModel: LoginViewModel) { @Composable fun AuthProviderView(viewModel: LoginViewModel) { - val isGoogleAuthAvailable: Boolean = GoogleApiAvailability - .getInstance() - .isGooglePlayServicesAvailable(LocalContext.current) == 0 + val isGoogleAuthAvailable: Boolean = + GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(LocalContext.current) == 0 Row( horizontalArrangement = Arrangement.Center @@ -153,22 +137,17 @@ fun AuthProviderView(viewModel: LoginViewModel) { AppleAuthButton(viewModel) - ClickableText( - text = AnnotatedString(stringResource(R.string.welcome_screen_action_continue_with_email)), - style = MaterialTheme.typography.titleMedium - .plus(TextStyle(textDecoration = TextDecoration.Underline)), - onClick = { viewModel.showEmailSignIn() } - ) + ClickableText(text = AnnotatedString(stringResource(R.string.welcome_screen_action_continue_with_email)), + style = MaterialTheme.typography.titleMedium.plus(TextStyle(textDecoration = TextDecoration.Underline)), + onClick = { viewModel.showEmailSignIn() }) Spacer(modifier = Modifier.weight(1.0F)) ClickableText( text = AnnotatedString(stringResource(R.string.welcome_screen_action_self_hosting_options)), - style = MaterialTheme.typography.titleMedium - .plus(TextStyle(textDecoration = TextDecoration.Underline)), + style = MaterialTheme.typography.titleMedium.plus(TextStyle(textDecoration = TextDecoration.Underline)), onClick = { viewModel.showSelfHostedSettings() }, - modifier = Modifier - .padding(vertical = 10.dp) + modifier = Modifier.padding(vertical = 10.dp) ) } Spacer(modifier = Modifier.weight(1.0F)) @@ -184,8 +163,7 @@ fun MoreInfoButton() { text = AnnotatedString( stringResource(id = R.string.learn_more), ), - style = MaterialTheme.typography.titleSmall - .plus(TextStyle(textDecoration = TextDecoration.Underline)), + style = MaterialTheme.typography.titleSmall.plus(TextStyle(textDecoration = TextDecoration.Underline)), onClick = { context.startActivity(intent) }, diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/library/LibraryView.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/library/LibraryView.kt index fea94ab3d..577d5ac40 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/library/LibraryView.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/library/LibraryView.kt @@ -368,7 +368,6 @@ fun LibraryViewContent( ) SwipeToDismiss( state = swipeState, - modifier = Modifier.padding(vertical = 4.dp), directions = setOf(DismissDirection.StartToEnd, DismissDirection.EndToStart), dismissThresholds = { FractionalThreshold(swipeThreshold) }, background = { diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/reader/WebReaderLoadingContainer.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/reader/WebReaderLoadingContainer.kt index 98f7230f6..e58b5f0cb 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/reader/WebReaderLoadingContainer.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/reader/WebReaderLoadingContainer.kt @@ -30,7 +30,6 @@ import androidx.compose.material3.IconButton import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.getValue import androidx.compose.runtime.livedata.observeAsState @@ -61,7 +60,6 @@ import app.omnivore.omnivore.feature.notebook.NotebookView import app.omnivore.omnivore.feature.notebook.NotebookViewModel import app.omnivore.omnivore.feature.savedItemViews.SavedItemContextMenu import app.omnivore.omnivore.feature.theme.OmnivoreTheme -import com.google.accompanist.systemuicontroller.rememberSystemUiController import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.launch import kotlin.math.roundToInt @@ -81,18 +79,6 @@ class WebReaderLoadingContainerActivity : ComponentActivity() { viewModel.loadItem(slug = slug, requestID = requestID) setContent { - val systemUiController = rememberSystemUiController() - val useDarkIcons = !isSystemInDarkTheme() - - DisposableEffect(systemUiController, useDarkIcons) { - systemUiController.setSystemBarsColor( - color = Color.Black, - darkIcons = false - ) - - onDispose {} - } - OmnivoreTheme { Box( modifier = Modifier diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/root/RootView.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/root/RootView.kt index 5e48ad2ff..c56eb5557 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/root/RootView.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/root/RootView.kt @@ -1,5 +1,6 @@ package app.omnivore.omnivore.feature.root +import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.WindowInsetsSides @@ -18,6 +19,7 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.livedata.observeAsState import androidx.compose.runtime.remember import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color import androidx.navigation.compose.NavHost import androidx.navigation.compose.composable import androidx.navigation.compose.rememberNavController @@ -50,7 +52,7 @@ fun RootView( snackbarHost = { SnackbarHost(snackbarHostState) }, ) { padding -> Box( - modifier = Modifier + modifier = if (!hasAuthToken) Modifier.background(Color(0xFFFCEBA8)) else Modifier .fillMaxSize() .padding(padding) .consumeWindowInsets(padding) diff --git a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/savedItemViews/SavedItemCard.kt b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/savedItemViews/SavedItemCard.kt index f0c966793..6e802ce98 100644 --- a/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/savedItemViews/SavedItemCard.kt +++ b/android/Omnivore/app/src/main/java/app/omnivore/omnivore/feature/savedItemViews/SavedItemCard.kt @@ -15,7 +15,7 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material3.Divider +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -122,7 +122,7 @@ fun SavedItemCard( } } - Divider(color = MaterialTheme.colorScheme.outlineVariant, thickness = 1.dp) + HorizontalDivider(thickness = 1.dp, color = MaterialTheme.colorScheme.outlineVariant) } } diff --git a/android/Omnivore/app/src/main/res/values-night/themes.xml b/android/Omnivore/app/src/main/res/values-night/themes.xml index 1a9b6693f..c43ddb850 100644 --- a/android/Omnivore/app/src/main/res/values-night/themes.xml +++ b/android/Omnivore/app/src/main/res/values-night/themes.xml @@ -14,4 +14,20 @@ @style/Theme.Omnivore + + diff --git a/android/Omnivore/app/src/main/res/values/themes.xml b/android/Omnivore/app/src/main/res/values/themes.xml index d63370f10..a17973375 100644 --- a/android/Omnivore/app/src/main/res/values/themes.xml +++ b/android/Omnivore/app/src/main/res/values/themes.xml @@ -16,4 +16,20 @@ @style/Theme.Omnivore + + diff --git a/android/Omnivore/gradle/libs.versions.toml b/android/Omnivore/gradle/libs.versions.toml index b67815b52..1a6c6a567 100644 --- a/android/Omnivore/gradle/libs.versions.toml +++ b/android/Omnivore/gradle/libs.versions.toml @@ -4,12 +4,12 @@ accompanistFlowLayout = "0.32.0" androidGradlePlugin = "8.2.2" androidxActivity = "1.8.2" androidxAppCompat = "1.6.1" -androidxComposeBom = "2024.02.00" +androidxComposeBom = "2024.02.01" androidxComposeCompiler = "1.5.9" androidxCore = "1.12.0" androidxDataStore = "1.0.0" androidxEspresso = "3.5.1" -androidxHiltNavigationCompose = "1.1.0" +androidxHiltNavigationCompose = "1.2.0" androidxLifecycle = "2.7.0" androidxNavigation = "2.7.7" androidxSecurity = "1.0.0" @@ -18,6 +18,7 @@ apollo = "3.8.2" chiptextfieldM3 = "0.6.5" coil = "2.5.0" composeMarkdown = "0.3.3" +coreSplashscreen = "1.0.1" gson = "2.10.1" hilt = "2.50" intercom = "15.1.0" @@ -26,7 +27,7 @@ kotlin = "1.9.22" ksp = "1.9.22-1.0.17" kotlinxCoroutines = "1.7.3" playServices = "18.3.0" -playServicesAuth = "20.7.0" +playServicesAuth = "21.0.0" posthog = "2.0.3" pspdfkit = "8.9.1" retrofit = "2.9.0" @@ -48,6 +49,7 @@ androidx-compose-ui-tooling = { group = "androidx.compose.ui", name = "ui-toolin androidx-compose-ui-tooling-preview = { group = "androidx.compose.ui", name = "ui-tooling-preview" } androidx-compose-ui-util = { group = "androidx.compose.ui", name = "ui-util" } androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidxCore" } +androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" } androidx-dataStore-preferences = { group = "androidx.datastore", name = "datastore-preferences", version.ref = "androidxDataStore" } androidx-hilt-navigation-compose = { group = "androidx.hilt", name = "hilt-navigation-compose", version.ref = "androidxHiltNavigationCompose" } androidx-lifecycle-viewModelKtx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "androidxLifecycle" }