fix LoginActivity created twice on unauthenticated appstart (#1352)

* fix LoginActivity created twice on unauthenticated appstart

* make SplashActivity not inherit from BaseActivity
main
Konrad Pozniak 6 years ago committed by GitHub
parent f47f0d0600
commit e41fa3b84c
  1. 10
      app/src/main/java/com/keylesspalace/tusky/SplashActivity.kt
  2. 1
      app/src/main/res/values-v27/styles.xml
  3. 1
      app/src/main/res/values/styles.xml

@ -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…
Cancel
Save