From 25d0c626cfbb0e426339a0775303849bf32d1c06 Mon Sep 17 00:00:00 2001 From: Joel Dean Date: Thu, 18 Jun 2020 16:27:26 -0500 Subject: [PATCH] Fixed issue where rotating device would cause new tags not to persist. --- .../wordpress/android/ui/posts/PrepublishingTagsViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingTagsViewModel.kt b/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingTagsViewModel.kt index 3a36505d11a0..adf3f94a28dc 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingTagsViewModel.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/PrepublishingTagsViewModel.kt @@ -39,10 +39,11 @@ class PrepublishingTagsViewModel @Inject constructor( val toolbarTitleUiState: LiveData = _toolbarTitleUiState fun start(editPostRepository: EditPostRepository) { + this.editPostRepository = editPostRepository + if (isStarted) return isStarted = true - this.editPostRepository = editPostRepository setToolbarTitleUiState() }