Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove double SplashScreen #2063

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/src/main/java/com/infomaniak/mail/ui/LaunchActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.lifecycleScope
import androidx.navigation.NavDeepLinkBuilder
import com.infomaniak.lib.core.extensions.keepSplashscreenVisibleWhileLoading
import com.infomaniak.lib.core.extensions.setDefaultLocaleIfNeeded
import com.infomaniak.lib.stores.StoreUtils.checkUpdateIsRequired
import com.infomaniak.mail.BuildConfig
Expand Down Expand Up @@ -70,6 +71,8 @@ class LaunchActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

keepSplashscreenVisibleWhileLoading()

setDefaultLocaleIfNeeded()

handleNotificationDestinationIntent()
Expand Down
28 changes: 28 additions & 0 deletions app/src/main/res/values-night-v31/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Infomaniak Mail - Android
~ Copyright (C) 2024 Infomaniak Network SA
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>

<style name="AppThemeLauncher31" parent="AppTheme.LauncherBase">
<item name="android:windowSplashScreenAnimatedIcon">@drawable/splashscreen_animated_icon</item>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for updated version of this asset.

<item name="android:windowSplashScreenBackground">@color/backgroundColor</item>
<item name="android:windowSplashScreenBrandingImage">@drawable/splashscreen_branding_image</item>
</style>

<style name="AppThemeLauncher" parent="AppThemeLauncher31" />

</resources>
27 changes: 27 additions & 0 deletions app/src/main/res/values-night-v32/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Infomaniak Mail - Android
~ Copyright (C) 2024 Infomaniak Network SA
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>

<style name="AppThemeLauncher32" parent="AppThemeLauncher31">
<!-- Not a magic value: "The maximum animation duration should be limited below 1000ms." -->
<item name="android:windowSplashScreenAnimationDuration">1000</item>
</style>

<style name="AppThemeLauncher" parent="AppThemeLauncher32" />

</resources>
26 changes: 26 additions & 0 deletions app/src/main/res/values-night-v33/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Infomaniak Mail - Android
~ Copyright (C) 2024 Infomaniak Network SA
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>

<style name="AppThemeLauncher33" parent="AppThemeLauncher32">
<item name="android:windowSplashScreenBehavior">icon_preferred</item>
</style>

<style name="AppThemeLauncher" parent="AppThemeLauncher33" />

</resources>
2 changes: 0 additions & 2 deletions app/src/main/res/values-v31/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
<item name="android:windowSplashScreenAnimatedIcon">@drawable/splashscreen_animated_icon</item>
<item name="android:windowSplashScreenBackground">@color/backgroundColor</item>
<item name="android:windowSplashScreenBrandingImage">@drawable/splashscreen_branding_image</item>
<!-- Not a magic value: "The maximum animation duration should be limited below 1000ms." -->
<item name="android:windowSplashScreenAnimationDuration">1000</item>
</style>

<style name="AppThemeLauncher" parent="AppThemeLauncher31" />
Expand Down
27 changes: 27 additions & 0 deletions app/src/main/res/values-v32/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Infomaniak Mail - Android
~ Copyright (C) 2024 Infomaniak Network SA
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>

<style name="AppThemeLauncher32" parent="AppThemeLauncher31">
<!-- Not a magic value: "The maximum animation duration should be limited below 1000ms." -->
<item name="android:windowSplashScreenAnimationDuration">1000</item>
</style>

<style name="AppThemeLauncher" parent="AppThemeLauncher32" />

</resources>
26 changes: 26 additions & 0 deletions app/src/main/res/values-v33/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Infomaniak Mail - Android
~ Copyright (C) 2024 Infomaniak Network SA
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<resources>

<style name="AppThemeLauncher33" parent="AppThemeLauncher32">
<item name="android:windowSplashScreenBehavior">icon_preferred</item>
</style>

<style name="AppThemeLauncher" parent="AppThemeLauncher33" />

</resources>
Loading