Skip to content

Commit

Permalink
Merge pull request #7086 from Bnyro/master
Browse files Browse the repository at this point in the history
fix: can't change app icon (debug versions only)
  • Loading branch information
Bnyro authored Feb 10, 2025
2 parents e73fb55 + 2e361e7 commit f28f486
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/github/libretube/helpers/ThemeHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ object ThemeHelper {
fun changeIcon(context: Context, newLogoActivityAlias: String) {
// Disable Old Icon(s)
for (appIcon in IconsSheetAdapter.availableIcons) {
val activityClass = context.packageName + "." + appIcon.activityAlias
val activityClass = context.packageName.removeSuffix(".debug") + "." + appIcon.activityAlias

// remove old icons
context.packageManager.setComponentEnabledSetting(
Expand All @@ -139,7 +139,7 @@ object ThemeHelper {
}

// set the class name for the activity alias
val newLogoActivityClass = context.packageName + "." + newLogoActivityAlias
val newLogoActivityClass = context.packageName.removeSuffix(".debug") + "." + newLogoActivityAlias
// Enable New Icon
context.packageManager.setComponentEnabledSetting(
ComponentName(context.packageName, newLogoActivityClass),
Expand Down

0 comments on commit f28f486

Please sign in to comment.