This commit is contained in:
machiav3lli 2022-10-08 01:50:07 +02:00
parent 9a5607c52d
commit 25a3c2691f
5 changed files with 266 additions and 299 deletions

View File

@ -7,7 +7,8 @@
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
<uses-permission
android:name="android.permission.QUERY_ALL_PACKAGES"
tools:ignore="QueryAllPackagesPermission" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION" />
@ -19,8 +20,8 @@
android:label="@string/application_name"
android:roundIcon="${appIconRound}"
android:supportsRtl="true"
tools:ignore="GoogleAppIndexingWarning">
android:theme="@style/Theme.Main.Amoled"
tools:ignore="GoogleAppIndexingWarning">
<receiver
android:name=".MainApplication$BootReceiver"

View File

@ -1,7 +1,6 @@
package com.machiav3lli.fdroid.ui.pages
import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
@ -35,10 +34,8 @@ import com.machiav3lli.fdroid.ui.compose.ProductsVerticalRecycler
import com.machiav3lli.fdroid.ui.compose.components.CategoryChip
import com.machiav3lli.fdroid.ui.compose.icons.Phosphor
import com.machiav3lli.fdroid.ui.compose.icons.phosphor.FunnelSimple
import com.machiav3lli.fdroid.ui.compose.theme.AppTheme
import com.machiav3lli.fdroid.ui.navigation.NavItem
import com.machiav3lli.fdroid.ui.viewmodels.MainNavFragmentViewModelX
import com.machiav3lli.fdroid.utility.isDarkTheme
import com.machiav3lli.fdroid.utility.onLaunchClick
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
@ -78,13 +75,6 @@ fun ExplorePage(viewModel: MainNavFragmentViewModelX) {
}
}
AppTheme(
darkTheme = when (Preferences[Preferences.Key.Theme]) {
is Preferences.Theme.System -> isSystemInDarkTheme()
is Preferences.Theme.SystemBlack -> isSystemInDarkTheme()
else -> isDarkTheme
}
) {
Column(
Modifier
.background(MaterialTheme.colorScheme.background)
@ -157,4 +147,3 @@ fun ExplorePage(viewModel: MainNavFragmentViewModelX) {
}
}
}
}

View File

@ -2,7 +2,6 @@ package com.machiav3lli.fdroid.ui.pages
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
@ -43,10 +42,8 @@ import com.machiav3lli.fdroid.ui.compose.icons.phosphor.CaretDown
import com.machiav3lli.fdroid.ui.compose.icons.phosphor.CaretUp
import com.machiav3lli.fdroid.ui.compose.icons.phosphor.Download
import com.machiav3lli.fdroid.ui.compose.icons.phosphor.FunnelSimple
import com.machiav3lli.fdroid.ui.compose.theme.AppTheme
import com.machiav3lli.fdroid.ui.navigation.NavItem
import com.machiav3lli.fdroid.ui.viewmodels.MainNavFragmentViewModelX
import com.machiav3lli.fdroid.utility.isDarkTheme
import com.machiav3lli.fdroid.utility.onLaunchClick
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
@ -87,13 +84,6 @@ fun InstalledPage(viewModel: MainNavFragmentViewModelX) {
}
}
AppTheme(
darkTheme = when (Preferences[Preferences.Key.Theme]) {
is Preferences.Theme.System -> isSystemInDarkTheme()
is Preferences.Theme.SystemBlack -> isSystemInDarkTheme()
else -> isDarkTheme
}
) {
var updatesVisible by remember(secondaryList) { mutableStateOf(true) }
Column(
@ -216,4 +206,3 @@ fun InstalledPage(viewModel: MainNavFragmentViewModelX) {
}
}
}
}

View File

@ -1,7 +1,6 @@
package com.machiav3lli.fdroid.ui.pages
import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
@ -32,10 +31,8 @@ import com.machiav3lli.fdroid.ui.compose.ProductsHorizontalRecycler
import com.machiav3lli.fdroid.ui.compose.components.ProductsListItem
import com.machiav3lli.fdroid.ui.compose.icons.Phosphor
import com.machiav3lli.fdroid.ui.compose.icons.phosphor.FunnelSimple
import com.machiav3lli.fdroid.ui.compose.theme.AppTheme
import com.machiav3lli.fdroid.ui.navigation.NavItem
import com.machiav3lli.fdroid.ui.viewmodels.MainNavFragmentViewModelX
import com.machiav3lli.fdroid.utility.isDarkTheme
import com.machiav3lli.fdroid.utility.onLaunchClick
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
@ -77,13 +74,6 @@ fun LatestPage(viewModel: MainNavFragmentViewModelX) {
}
}
AppTheme(
darkTheme = when (Preferences[Preferences.Key.Theme]) {
is Preferences.Theme.System -> isSystemInDarkTheme()
is Preferences.Theme.SystemBlack -> isSystemInDarkTheme()
else -> isDarkTheme
}
) {
LazyColumn(
Modifier
.background(MaterialTheme.colorScheme.background)
@ -158,4 +148,3 @@ fun LatestPage(viewModel: MainNavFragmentViewModelX) {
}
}
}
}

View File

@ -41,7 +41,6 @@ fun PrefsOtherPage() {
Preferences.Key.ProxyHost,
Preferences.Key.ProxyPort,
)
val infoPrefs = emptyList<Preferences.Key<*>>()
Scaffold(
modifier = Modifier.fillMaxSize()