Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
[xdl]<fix>: Remove default splash screen image
Browse files Browse the repository at this point in the history
When a user does not provide a splash image we shouldn't show any image.
Ensured the splash screen image from Expo Client is not propagated to standalones.
  • Loading branch information
bbarthec committed Nov 13, 2020
1 parent 9bd2f8f commit e95a97e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions packages/xdl/src/detach/AndroidShellApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -1065,18 +1065,18 @@ export async function runShellAppModificationsAsync(context, sdkVersion, buildMo
path.join(shellPath, 'app', 'src', 'main', 'res', 'values', 'colors.xml')
);

// Splash Background
if (backgroundImages && backgroundImages.length > 0) {
// Delete the placeholder images
const splashImageFilename =
majorSdkVersion >= 39 ? 'splashscreen_image.png' : 'shell_launch_background_image.png';
globSync(`**/${splashImageFilename}'`, {
cwd: path.join(shellPath, 'app', 'src', 'main', 'res'),
absolute: true,
}).forEach(filePath => {
fs.removeSync(filePath);
});
// Delete the placeholder splash images
const splashImageFilename =
majorSdkVersion >= 39 ? 'splashscreen_image.png' : 'shell_launch_background_image.png';
globSync(`**/${splashImageFilename}`, {
cwd: path.join(shellPath, 'app', 'src', 'main', 'res'),
absolute: true,
}).forEach(filePath => {
fs.removeSync(filePath);
});

// Use the splash images provided by the user
if (backgroundImages && backgroundImages.length > 0) {
await Promise.all(
backgroundImages.map(async image => {
if (isRunningInUserContext) {
Expand Down

0 comments on commit e95a97e

Please sign in to comment.