Merge pull request #7077 from Bnyro/master

fix: don't hardcode package name for setting different app icons
This commit is contained in:
Bnyro 2025-02-05 20:45:52 +01:00 committed by GitHub
commit 7d0540f0a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -128,7 +128,7 @@ object ThemeHelper {
fun changeIcon(context: Context, newLogoActivityAlias: String) {
// Disable Old Icon(s)
for (appIcon in IconsSheetAdapter.availableIcons) {
val activityClass = "com.github.libretube." + appIcon.activityAlias
val activityClass = context.packageName + "." + appIcon.activityAlias
// remove old icons
context.packageManager.setComponentEnabledSetting(
@ -139,7 +139,7 @@ object ThemeHelper {
}
// set the class name for the activity alias
val newLogoActivityClass = "com.github.libretube.$newLogoActivityAlias"
val newLogoActivityClass = context.packageName + "." + newLogoActivityAlias
// Enable New Icon
context.packageManager.setComponentEnabledSetting(
ComponentName(context.packageName, newLogoActivityClass),