mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 15:30:31 +05:30
Merge pull request #7077 from Bnyro/master
fix: don't hardcode package name for setting different app icons
This commit is contained in:
commit
7d0540f0a6
@ -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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user