codeplay-common 1.9.1 → 1.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -180,7 +180,7 @@ function updateAndroidManifest() {
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
|
|
183
|
-
|
|
183
|
+
function removeOldSplashImages() {
|
|
184
184
|
const drawableFolders = [
|
|
185
185
|
"drawable",
|
|
186
186
|
"drawable-land-hdpi",
|
|
@@ -206,6 +206,27 @@ function updateAndroidManifest() {
|
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
function removeOldSplashStyle() {
|
|
210
|
+
const stylesPath = path.join(projectFolder, "android", "app", "src", "main", "res", "values", "styles.xml");
|
|
211
|
+
|
|
212
|
+
if (!fs.existsSync(stylesPath)) {
|
|
213
|
+
console.log(`styles.xml not found: ${stylesPath}`);
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
let content = fs.readFileSync(stylesPath, "utf-8");
|
|
218
|
+
|
|
219
|
+
// Remove the <style name="AppTheme.NoActionBarLaunch">...</style> block
|
|
220
|
+
const regex = /<style\s+name="AppTheme\.NoActionBarLaunch"[\s\S]*?<\/style>/g;
|
|
221
|
+
if (regex.test(content)) {
|
|
222
|
+
content = content.replace(regex, "");
|
|
223
|
+
fs.writeFileSync(stylesPath, content, "utf-8");
|
|
224
|
+
console.log("Removed AppTheme.NoActionBarLaunch from styles.xml");
|
|
225
|
+
} else {
|
|
226
|
+
console.log("AppTheme.NoActionBarLaunch style not found, skipped");
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
209
230
|
// Perform the tasks
|
|
210
231
|
try {
|
|
211
232
|
console.log("Starting splash screen setup...");
|
|
@@ -216,6 +237,7 @@ try {
|
|
|
216
237
|
|
|
217
238
|
console.log("Removing default splash.png files...");
|
|
218
239
|
removeOldSplashImages()
|
|
240
|
+
removeOldSplashStyle()
|
|
219
241
|
|
|
220
242
|
} catch (error) {
|
|
221
243
|
console.error(`Error: ${error.message}`);
|