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:
Konrad Pozniak 2019-06-29 11:39:50 +02:00 committed by GitHub
parent 3a81559c95
commit 1d2e42b9f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View file

@ -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()
} }
} }

View file

@ -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>

View file

@ -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>