From 1d2e42b9f579cdc432a539587e2ac4a8ddedeef4 Mon Sep 17 00:00:00 2001 From: Konrad Pozniak Date: Sat, 29 Jun 2019 11:39:50 +0200 Subject: [PATCH] fix LoginActivity created twice on unauthenticated appstart (#1352) * fix LoginActivity created twice on unauthenticated appstart * make SplashActivity not inherit from BaseActivity --- .../java/com/keylesspalace/tusky/SplashActivity.kt | 10 +++++++++- app/src/main/res/values-v27/styles.xml | 1 + app/src/main/res/values/styles.xml | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/SplashActivity.kt b/app/src/main/java/com/keylesspalace/tusky/SplashActivity.kt index 57959955e..8c6a877a1 100644 --- a/app/src/main/java/com/keylesspalace/tusky/SplashActivity.kt +++ b/app/src/main/java/com/keylesspalace/tusky/SplashActivity.kt @@ -17,10 +17,17 @@ package com.keylesspalace.tusky import android.content.Intent 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 javax.inject.Inject -class SplashActivity : BaseActivity() { +class SplashActivity : AppCompatActivity(), Injectable { + + @Inject + lateinit var accountManager: AccountManager override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -39,4 +46,5 @@ class SplashActivity : BaseActivity() { startActivity(intent) finish() } + } diff --git a/app/src/main/res/values-v27/styles.xml b/app/src/main/res/values-v27/styles.xml index 5e0246e43..27b20b9d5 100644 --- a/app/src/main/res/values-v27/styles.xml +++ b/app/src/main/res/values-v27/styles.xml @@ -2,6 +2,7 @@