From 1ad74ae94deca0b2b79b04bb5b10de489f60bd13 Mon Sep 17 00:00:00 2001 From: mitch Date: Sun, 5 Apr 2020 15:03:27 -0700 Subject: [PATCH] Fix process death restoration bug caused by ?:sessionManager.logout() in ViewModel --- .../codingwithmitch/openapi/ui/main/account/AccountViewModel.kt | 2 +- .../openapi/ui/main/create_blog/CreateBlogViewModel.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/codingwithmitch/openapi/ui/main/account/AccountViewModel.kt b/app/src/main/java/com/codingwithmitch/openapi/ui/main/account/AccountViewModel.kt index 7291fa17..fdbe5a05 100644 --- a/app/src/main/java/com/codingwithmitch/openapi/ui/main/account/AccountViewModel.kt +++ b/app/src/main/java/com/codingwithmitch/openapi/ui/main/account/AccountViewModel.kt @@ -79,7 +79,7 @@ constructor( } } launchJob(stateEvent, job) - }?: sessionManager.logout() + } } fun setAccountPropertiesData(accountProperties: AccountProperties){ diff --git a/app/src/main/java/com/codingwithmitch/openapi/ui/main/create_blog/CreateBlogViewModel.kt b/app/src/main/java/com/codingwithmitch/openapi/ui/main/create_blog/CreateBlogViewModel.kt index 4b410a48..8ac8a000 100644 --- a/app/src/main/java/com/codingwithmitch/openapi/ui/main/create_blog/CreateBlogViewModel.kt +++ b/app/src/main/java/com/codingwithmitch/openapi/ui/main/create_blog/CreateBlogViewModel.kt @@ -76,7 +76,7 @@ constructor( } } launchJob(stateEvent, job) - }?: sessionManager.logout() + } } override fun initNewViewState(): CreateBlogViewState {