Skip to content

Commit

Permalink
Merge pull request #7077 from Bnyro/master
Browse files Browse the repository at this point in the history
fix: don't hardcode package name for setting different app icons
  • Loading branch information
Bnyro authored Feb 5, 2025
2 parents 08903f6 + e39e476 commit 7d0540f
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 = "com.github.libretube." + appIcon.activityAlias
val activityClass = context.packageName + "." + 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 = "com.github.libretube.$newLogoActivityAlias"
val newLogoActivityClass = context.packageName + "." + newLogoActivityAlias
// Enable New Icon
context.packageManager.setComponentEnabledSetting(
ComponentName(context.packageName, newLogoActivityClass),
Expand Down

0 comments on commit 7d0540f

Please sign in to comment.