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

View File

@ -1,7 +1,6 @@
package com.machiav3lli.fdroid.ui.pages package com.machiav3lli.fdroid.ui.pages
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer 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.components.CategoryChip
import com.machiav3lli.fdroid.ui.compose.icons.Phosphor import com.machiav3lli.fdroid.ui.compose.icons.Phosphor
import com.machiav3lli.fdroid.ui.compose.icons.phosphor.FunnelSimple 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.navigation.NavItem
import com.machiav3lli.fdroid.ui.viewmodels.MainNavFragmentViewModelX import com.machiav3lli.fdroid.ui.viewmodels.MainNavFragmentViewModelX
import com.machiav3lli.fdroid.utility.isDarkTheme
import com.machiav3lli.fdroid.utility.onLaunchClick import com.machiav3lli.fdroid.utility.onLaunchClick
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers 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( Column(
Modifier Modifier
.background(MaterialTheme.colorScheme.background) .background(MaterialTheme.colorScheme.background)
@ -156,5 +146,4 @@ fun ExplorePage(viewModel: MainNavFragmentViewModelX) {
mainActivityX.syncConnection.binder?.installApps(listOf(item)) mainActivityX.syncConnection.binder?.installApps(listOf(item))
} }
} }
}
} }

View File

@ -2,7 +2,6 @@ package com.machiav3lli.fdroid.ui.pages
import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer 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.CaretUp
import com.machiav3lli.fdroid.ui.compose.icons.phosphor.Download import com.machiav3lli.fdroid.ui.compose.icons.phosphor.Download
import com.machiav3lli.fdroid.ui.compose.icons.phosphor.FunnelSimple 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.navigation.NavItem
import com.machiav3lli.fdroid.ui.viewmodels.MainNavFragmentViewModelX import com.machiav3lli.fdroid.ui.viewmodels.MainNavFragmentViewModelX
import com.machiav3lli.fdroid.utility.isDarkTheme
import com.machiav3lli.fdroid.utility.onLaunchClick import com.machiav3lli.fdroid.utility.onLaunchClick
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers 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) } var updatesVisible by remember(secondaryList) { mutableStateOf(true) }
Column( Column(
@ -215,5 +205,4 @@ fun InstalledPage(viewModel: MainNavFragmentViewModelX) {
mainActivityX.syncConnection.binder?.installApps(listOf(item)) mainActivityX.syncConnection.binder?.installApps(listOf(item))
} }
} }
}
} }

View File

@ -1,7 +1,6 @@
package com.machiav3lli.fdroid.ui.pages package com.machiav3lli.fdroid.ui.pages
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding 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.components.ProductsListItem
import com.machiav3lli.fdroid.ui.compose.icons.Phosphor import com.machiav3lli.fdroid.ui.compose.icons.Phosphor
import com.machiav3lli.fdroid.ui.compose.icons.phosphor.FunnelSimple 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.navigation.NavItem
import com.machiav3lli.fdroid.ui.viewmodels.MainNavFragmentViewModelX import com.machiav3lli.fdroid.ui.viewmodels.MainNavFragmentViewModelX
import com.machiav3lli.fdroid.utility.isDarkTheme
import com.machiav3lli.fdroid.utility.onLaunchClick import com.machiav3lli.fdroid.utility.onLaunchClick
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers 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( LazyColumn(
Modifier Modifier
.background(MaterialTheme.colorScheme.background) .background(MaterialTheme.colorScheme.background)
@ -157,5 +147,4 @@ fun LatestPage(viewModel: MainNavFragmentViewModelX) {
) )
} }
} }
}
} }

View File

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