fix LoginActivity created twice on unauthenticated appstart (#1352)
* fix LoginActivity created twice on unauthenticated appstart * make SplashActivity not inherit from BaseActivity
This commit is contained in:
parent
3a81559c95
commit
1d2e42b9f5
3 changed files with 11 additions and 1 deletions
|
@ -17,10 +17,17 @@ package com.keylesspalace.tusky
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import com.keylesspalace.tusky.db.AccountManager
|
||||||
|
import com.keylesspalace.tusky.di.Injectable
|
||||||
|
|
||||||
import com.keylesspalace.tusky.util.NotificationHelper
|
import com.keylesspalace.tusky.util.NotificationHelper
|
||||||
|
import javax.inject.Inject
|
||||||
|
|
||||||
class SplashActivity : BaseActivity() {
|
class SplashActivity : AppCompatActivity(), Injectable {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
lateinit var accountManager: AccountManager
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
@ -39,4 +46,5 @@ class SplashActivity : BaseActivity() {
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
|
<style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
|
||||||
<item name="android:windowBackground">@drawable/background_splash</item>
|
<item name="android:windowBackground">@drawable/background_splash</item>
|
||||||
|
<item name="colorPrimary">@color/color_primary_dark_dark</item>
|
||||||
<item name="colorPrimaryDark">@color/color_primary_dark_dark</item>
|
<item name="colorPrimaryDark">@color/color_primary_dark_dark</item>
|
||||||
<item name="android:windowNoTitle">true</item>
|
<item name="android:windowNoTitle">true</item>
|
||||||
<item name="android:windowLightNavigationBar">false</item>
|
<item name="android:windowLightNavigationBar">false</item>
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
|
|
||||||
<style name="SplashTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
|
<style name="SplashTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||||
<item name="android:windowBackground">@drawable/background_splash</item>
|
<item name="android:windowBackground">@drawable/background_splash</item>
|
||||||
|
<item name="colorPrimary">@color/color_primary_dark_dark</item>
|
||||||
<item name="colorPrimaryDark">@color/color_primary_dark_dark</item>
|
<item name="colorPrimaryDark">@color/color_primary_dark_dark</item>
|
||||||
<item name="android:windowNoTitle">true</item>
|
<item name="android:windowNoTitle">true</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue