|
|
|
|
@ -20,7 +20,6 @@ import android.content.Intent
|
|
|
|
|
import android.os.Bundle |
|
|
|
|
import androidx.appcompat.app.AppCompatActivity |
|
|
|
|
import com.keylesspalace.tusky.components.login.LoginActivity |
|
|
|
|
import com.keylesspalace.tusky.components.notifications.NotificationHelper |
|
|
|
|
import com.keylesspalace.tusky.db.AccountManager |
|
|
|
|
import com.keylesspalace.tusky.di.Injectable |
|
|
|
|
import javax.inject.Inject |
|
|
|
|
@ -34,12 +33,8 @@ class SplashActivity : AppCompatActivity(), Injectable {
|
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) { |
|
|
|
|
super.onCreate(savedInstanceState) |
|
|
|
|
|
|
|
|
|
/** delete old notification channels */ |
|
|
|
|
NotificationHelper.deleteLegacyNotificationChannels(this, accountManager) |
|
|
|
|
|
|
|
|
|
/** Determine whether the user is currently logged in, and if so go ahead and load the |
|
|
|
|
* timeline. Otherwise, start the activity_login screen. */ |
|
|
|
|
|
|
|
|
|
val intent = if (accountManager.activeAccount != null) { |
|
|
|
|
Intent(this, MainActivity::class.java) |
|
|
|
|
} else { |
|
|
|
|
|