diff --git a/app/build.gradle b/app/build.gradle index 8242283..6ad794e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ plugins { id 'com.google.android.gms.oss-licenses-plugin' } -def tagName = '2.5' -def tagCode = 250 +def tagName = '2.6' +def tagCode = 260 def getKeystoreProperties() { def properties = new Properties() diff --git a/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/activities/MainActivityViewModel.kt b/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/activities/MainActivityViewModel.kt index f6bd03e..65bba92 100644 --- a/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/activities/MainActivityViewModel.kt +++ b/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/activities/MainActivityViewModel.kt @@ -8,7 +8,12 @@ import com.kieronquinn.app.pixellaunchermods.repositories.RootServiceRepository import com.kieronquinn.app.pixellaunchermods.repositories.SettingsRepository import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.delay -import kotlinx.coroutines.flow.* +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.flow +import kotlinx.coroutines.flow.flowOn +import kotlinx.coroutines.flow.stateIn abstract class MainActivityViewModel: ViewModel() { @@ -51,6 +56,7 @@ class MainActivityViewModelImpl( settingsRepository.shouldLaunchService.set(false) return@combine State.NoPixelLauncher } + settingsRepository.shouldLaunchService.set(true) State.Loaded }.stateIn(viewModelScope, SharingStarted.Eagerly, State.Loading) diff --git a/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/screens/iconpicker/legacythemed/LegacyThemedIconPickerViewModel.kt b/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/screens/iconpicker/legacythemed/LegacyThemedIconPickerViewModel.kt index 39672dc..a075dd6 100644 --- a/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/screens/iconpicker/legacythemed/LegacyThemedIconPickerViewModel.kt +++ b/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/screens/iconpicker/legacythemed/LegacyThemedIconPickerViewModel.kt @@ -8,7 +8,16 @@ import com.kieronquinn.app.pixellaunchermods.repositories.IconLoaderRepository import com.kieronquinn.app.pixellaunchermods.repositories.RemoteAppsRepository import com.kieronquinn.app.pixellaunchermods.ui.screens.iconpicker.BasePickerViewModel import com.kieronquinn.app.pixellaunchermods.utils.extensions.TAP_DEBOUNCE -import kotlinx.coroutines.flow.* +import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.SharingStarted +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.debounce +import kotlinx.coroutines.flow.filterNotNull +import kotlinx.coroutines.flow.first +import kotlinx.coroutines.flow.map +import kotlinx.coroutines.flow.stateIn import kotlinx.coroutines.launch abstract class LegacyThemedIconPickerViewModel( @@ -102,11 +111,12 @@ class LegacyThemedIconPickerViewModelImpl( private fun setupClickListener() { viewModelScope.launch { itemClickBus.debounce(TAP_DEBOUNCE).collect { - val resourceName = iconLoaderRepository.getLegacyThemedIconName(it) val lawnicons = lawnicons.filterNotNull().first() val icon = if(lawnicons){ + val resourceName = iconLoaderRepository.getLawniconName(it) IconPickerResult.Lawnicon(it.resourceId, resourceName) }else{ + val resourceName = iconLoaderRepository.getLegacyThemedIconName(it) IconPickerResult.LegacyThemedIcon(it.resourceId, resourceName) } onIconSelected(icon) diff --git a/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/screens/tweaks/overlay/OverlayTweaksFragment.kt b/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/screens/tweaks/overlay/OverlayTweaksFragment.kt index 3e931fa..01dd7a8 100644 --- a/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/screens/tweaks/overlay/OverlayTweaksFragment.kt +++ b/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/screens/tweaks/overlay/OverlayTweaksFragment.kt @@ -1,5 +1,6 @@ package com.kieronquinn.app.pixellaunchermods.ui.screens.tweaks.overlay +import android.os.Build import android.os.Bundle import android.view.View import androidx.activity.result.contract.ActivityResultContracts @@ -52,10 +53,15 @@ class OverlayTweaksFragment: BoundFragment BaseSettingsViewModel.SettingsItem.Switch( icon = R.drawable.ic_tweaks_wallpaper_scrim, titleRes = R.string.tweaks_overlay_wallpaper_scrim, - contentRes = R.string.tweaks_overlay_wallpaper_scrim_content, + contentRes = if(Build.VERSION.SDK_INT >= 34) { + R.string.tweaks_overlay_wallpaper_scrim_content_disabled + }else{ + R.string.tweaks_overlay_wallpaper_scrim_content + }, setting = FakePixelLauncherModsSetting( viewModel.wallpaperScrim, viewModel::onWallpaperScrimChanged - ) + ), + isEnabled = { Build.VERSION.SDK_INT < 34 } ), BaseSettingsViewModel.SettingsItem.Switch( icon = R.drawable.ic_tweaks_wallpaper_region_colours, diff --git a/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/screens/tweaks/overlay/OverlayTweaksViewModel.kt b/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/screens/tweaks/overlay/OverlayTweaksViewModel.kt index 543437a..7fe0f70 100644 --- a/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/screens/tweaks/overlay/OverlayTweaksViewModel.kt +++ b/app/src/main/java/com/kieronquinn/app/pixellaunchermods/ui/screens/tweaks/overlay/OverlayTweaksViewModel.kt @@ -1,6 +1,7 @@ package com.kieronquinn.app.pixellaunchermods.ui.screens.tweaks.overlay import android.net.Uri +import android.os.Build import androidx.activity.result.ActivityResultLauncher import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope @@ -59,7 +60,8 @@ class OverlayTweaksViewModelImpl( ) private val disableWallpaperScrim = MutableStateFlow( - settingsRepository.disableWallpaperScrim.getSyncOrNull() + settingsRepository.disableWallpaperScrim.getSyncOrNull() ?: false + && Build.VERSION.SDK_INT < 34 ) private val disableWallpaperRegionColours = MutableStateFlow( diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c9c3557..78a5c9e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -130,6 +130,7 @@ Note: Lower values may reduce readability. Background may still be blurred, depending on your device. Disable Wallpaper Scrim Disable the dark scrim at the top of the screen on the wallpaper, intended to provide text contrast for the status bar + This option is not compatible with your device Disable Wallpaper Region Widget Colours Disable colours of Material You widgets changing based on the colour of the wallpaper behind them (the system colours will be used instead) Hide At a Glance diff --git a/build.gradle b/build.gradle index 858e75a..0597531 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ task clean(type: Delete) { task cleanOverlay(type: Delete, dependsOn: ordered(':overlay:clean')) { //Delete the previously built APK to start fresh - delete 'overlay/module/system/product/overlay/PixelLauncherModsOverlay/PixelLauncherModsOverlay.apk' + delete 'overlay/module/system/product/overlay/PixelLauncherModsOverlay.apk' } /** @@ -51,7 +51,7 @@ task assembleGradleDaemon(type: Exec) { task buildAndCopyOverlay(type: Copy, dependsOn: ordered(':assembleGradleDaemon')) { //Copy built APK into module folder from "overlay/build/outputs/apk/release/overlay-release.apk" - into "overlay/module/system/product/overlay/PixelLauncherModsOverlay" + into "overlay/module/system/product/overlay" rename("overlay-release.apk", "PixelLauncherModsOverlay.apk") } diff --git a/overlay/module/customize.sh b/overlay/module/customize.sh index 7a57f4b..e2b5573 100644 --- a/overlay/module/customize.sh +++ b/overlay/module/customize.sh @@ -15,5 +15,5 @@ ui_print "Reboot your device to activate the hide apps" ui_print "option in Pixel Launcher Mods." ui_print "" ui_print "You must keep this module installed for hide" -ui_print "apps to work." +ui_print "apps and overlay tweaks to work." ui_print "" \ No newline at end of file diff --git a/overlay/module/module.prop b/overlay/module/module.prop index 35322eb..558d220 100644 --- a/overlay/module/module.prop +++ b/overlay/module/module.prop @@ -1,6 +1,6 @@ id=PixelLauncherModsOverlay name=Pixel Launcher Mods Overlay -version=1.0 -versionCode=1 +version=1.1 +versionCode=11 author=Kieron Quinn / Quinny899 description=Installs overlay required to hide apps and replace widgets from the Pixel Launcher. Configure settings in the Pixel Launcher Mods app. \ No newline at end of file