Skip to content

Commit 8ed3b3b

Browse files
refactor
1 parent 6fd59b9 commit 8ed3b3b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

patches/src/main/kotlin/app/revanced/patches/shared/layout/branding/BaseCustomBrandingPatch.kt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import org.w3c.dom.Element
2323
import java.io.File
2424
import java.util.logging.Logger
2525

26-
internal val mipmapDirectories = arrayOf(
26+
private val mipmapDirectories = arrayOf(
2727
// Target app does not have ldpi icons.
2828
"mipmap-mdpi",
2929
"mipmap-hdpi",
@@ -51,10 +51,7 @@ private val USER_CUSTOM_ADAPTIVE_FILE_NAMES = arrayOf(
5151
"$LAUNCHER_ADAPTIVE_FOREGROUND_PREFIX$CUSTOM_USER_ICON_STYLE_NAME.png"
5252
)
5353

54-
private const val USER_CUSTOM_MONOCHROME_NAME =
55-
"$LAUNCHER_ADAPTIVE_MONOCHROME_PREFIX$CUSTOM_USER_ICON_STYLE_NAME.xml"
56-
57-
private fun formatResourceFileList(resourceNames: Array<String>) = resourceNames.joinToString("\n") { "- $it" }
54+
private const val USER_CUSTOM_MONOCHROME_NAME = "$LAUNCHER_ADAPTIVE_MONOCHROME_PREFIX$CUSTOM_USER_ICON_STYLE_NAME.xml"
5855

5956
internal const val EXTENSION_CLASS_DESCRIPTOR = "Lapp/revanced/extension/shared/patches/CustomBrandingPatch;"
6057

@@ -91,7 +88,7 @@ internal fun baseCustomBrandingPatch(
9188
Folder with images to use as a custom icon.
9289
9390
The folder must contain one or more of the following folders, depending on the DPI of the device:
94-
${formatResourceFileList(mipmapDirectories)}
91+
${mipmapDirectories.joinToString("\n") { "- $it" }}
9592
9693
Each of the folders must contain all of the following files:
9794
${USER_CUSTOM_ADAPTIVE_FILE_NAMES.joinToString("\n")}
@@ -193,6 +190,7 @@ internal fun baseCustomBrandingPatch(
193190
"$LAUNCHER_ADAPTIVE_MONOCHROME_PREFIX$CUSTOM_USER_ICON_STYLE_NAME.xml",
194191
)
195192
)
193+
196194
mipmapDirectories.forEach { dpi ->
197195
copyResources(
198196
"custom-branding",

0 commit comments

Comments
 (0)