diff options
Diffstat (limited to 'app/src/main/kotlin')
3 files changed, 10 insertions, 3 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt index f9da7073..c0f4eb85 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/StartActivity.kt @@ -1,12 +1,15 @@ package com.pitchedapps.frost +import android.content.Intent import android.os.Bundle import ca.allanwang.kau.internal.KauBaseActivity +import ca.allanwang.kau.utils.startActivity import com.pitchedapps.frost.activities.LoginActivity import com.pitchedapps.frost.activities.MainActivity import com.pitchedapps.frost.activities.SelectorActivity import com.pitchedapps.frost.dbflow.loadFbCookiesAsync import com.pitchedapps.frost.facebook.FbCookie +import com.pitchedapps.frost.utils.EXTRA_COOKIES import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.utils.Prefs import com.pitchedapps.frost.utils.launchNewTask @@ -25,7 +28,10 @@ class StartActivity : KauBaseActivity() { L._d { "Cookies: ${cookies.joinToString("\t")}" } if (cookies.isNotEmpty()) { if (Prefs.userId != -1L) - launchNewTask<MainActivity>(cookies) + startActivity<MainActivity>(intentBuilder = { + putParcelableArrayListExtra(EXTRA_COOKIES, cookies) + flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK + }) else launchNewTask<SelectorActivity>(cookies) } else diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt index 9babd431..8be9c847 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt @@ -134,7 +134,7 @@ class IntroActivity : KauBaseActivity(), ViewPager.PageTransformer, ViewPager.On } override fun finish() { - launchNewTask<MainActivity>(cookies()) + launchNewTask<MainActivity>(cookies(), false) super.finish() } diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt index 2a7c519e..1dc401a5 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt @@ -84,7 +84,8 @@ class FrostVideoViewer @JvmOverloads constructor( fun setVideo(url: String, repeat: Boolean = false) { val formattedUrl = url.formattedFbUrl - L.d { "Load video view; repeat: $repeat" } + L.d { "Load video; repeat: $repeat" } + L._d { "Url\t\t\t$url\nformatted\t$formattedUrl" } animate().alpha(1f).setDuration(FrostVideoView.ANIMATION_DURATION).start() video.setVideoURI(Uri.parse(formattedUrl)) video.repeat = repeat |