aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt10
1 files changed, 7 insertions, 3 deletions
diff --git a/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt b/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt
index 6e74891..64d2d43 100644
--- a/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt
+++ b/app/src/main/java/org/pacien/tincapp/activities/StartActivity.kt
@@ -147,7 +147,7 @@ class StartActivity : BaseActivity() {
147 147
148 override fun onResume() { 148 override fun onResume() {
149 super.onResume() 149 super.onResume()
150 if (TincVpnService.isConnected()) openStatusActivity() 150 if (TincVpnService.isConnected()) openStatusActivity(false)
151 broadcastMapper.register() 151 broadcastMapper.register()
152 } 152 }
153 153
@@ -174,6 +174,10 @@ class StartActivity : BaseActivity() {
174 connectDialog?.dismiss() 174 connectDialog?.dismiss()
175 } 175 }
176 176
177 private fun openStatusActivity() = 177 private fun openStatusActivity(transition: Boolean = true) =
178 startActivity(Intent(this, StatusActivity::class.java)) 178 startActivity(
179 Intent(this, StatusActivity::class.java)
180 .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
181 .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK)
182 .apply { if (!transition) addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION) })
179} 183}