Skip to content

Commit

Permalink
Merge pull request #10600 from woocommerce/bug/10377-wooplugin-not-pa…
Browse files Browse the repository at this point in the history
…rcelable

Bug fix – `Parcel: unable to marshal value WooPlugin`
  • Loading branch information
samiuelson authored Jan 25, 2024
2 parents 7ad748f + bbf5328 commit 2057f72
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*** PLEASE FOLLOW THIS FORMAT: [<priority indicator, more stars = higher priority>] <description> [<PR URL>]
17.1
-----
- [*] [Internal] Fixed crash when going to background from the order creation screen [https://github.com/woocommerce/woocommerce-android/pull/10600]

17.0
-----
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
package com.woocommerce.android.model

import android.os.Parcelable
import kotlinx.parcelize.IgnoredOnParcel
import kotlinx.parcelize.Parcelize

@Parcelize
data class WooPlugin(
val isInstalled: Boolean,
val isActive: Boolean,
val version: String?
) {
) : Parcelable {
@IgnoredOnParcel
val isOperational = isInstalled && isActive
}
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ class OrderCreateEditViewModel @Inject constructor(
private val pluginsInformation: MutableStateFlow<Map<String, WooPlugin>> =
savedState.getStateFlow(
scope = viewModelScope,
initialValue = HashMap()
initialValue = HashMap(),
key = "plugins_information"
)
val isGiftCardExtensionEnabled
get() = pluginsInformation.value[WOO_GIFT_CARDS.pluginName]
Expand Down

0 comments on commit 2057f72

Please sign in to comment.