From 085a812589f10108bb76111f21edce7c6c042f86 Mon Sep 17 00:00:00 2001 From: williamvds Date: Mon, 22 Apr 2019 12:16:53 +0100 Subject: [PATCH] Reverse loadFromBundle call order In certain occasions, it appears that intent.extras are available despite the activity being resumed Loading from the saved state before the intent ensures that form activities are properly restored --- app/src/main/java/kvj/taskw/ui/AppForm.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/kvj/taskw/ui/AppForm.kt b/app/src/main/java/kvj/taskw/ui/AppForm.kt index f5e9a97..4b2bd16 100644 --- a/app/src/main/java/kvj/taskw/ui/AppForm.kt +++ b/app/src/main/java/kvj/taskw/ui/AppForm.kt @@ -18,8 +18,8 @@ abstract class AppForm: AppActivity() { super.onCreate(savedInstanceState) setContentView(layout) - if (!loadFromBundle(intent.extras)) - loadFromBundle(savedInstanceState) + if (!loadFromBundle(savedInstanceState)) + loadFromBundle(intent.extras) } override fun onBackPressed() = cancel() -- 2.45.2