Skip to content

Commit

Permalink
Revert "[expo-updates][android] restrict property visibility on state…
Browse files Browse the repository at this point in the history
… machine objects (expo#23063)"

This reverts commit 2c04f0a.
  • Loading branch information
brentvatne committed Jun 26, 2023
1 parent fb5dc60 commit 381b468
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
1 change: 0 additions & 1 deletion packages/expo-updates/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

- [iOS] Use weak delegate for state machine. ([#23060](https://github.com/expo/expo/pull/23060) by [@wschurman](https://github.com/wschurman))
- [Android] Convert LoaderTask.RemoteCheckResult to sealed class. ([#23061](https://github.com/expo/expo/pull/23061) by [@wschurman](https://github.com/wschurman))
- [Android] Restrict property visibility on state machine objects. ([#23063](https://github.com/expo/expo/pull/23063) by [@wschurman](https://github.com/wschurman))

### 💡 Others

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import org.json.JSONObject
The state machine context, with information intended to be consumed by application JS code.
*/
data class UpdatesStateContext(
private val isUpdateAvailable: Boolean = false,
private val isUpdatePending: Boolean = false,
private val isRollback: Boolean = false,
private val isChecking: Boolean = false,
private val isDownloading: Boolean = false,
private val isRestarting: Boolean = false,
private val latestManifest: JSONObject? = null,
private val downloadedManifest: JSONObject? = null,
private val checkError: UpdatesStateError? = null,
private val downloadError: UpdatesStateError? = null
val isUpdateAvailable: Boolean = false,
val isUpdatePending: Boolean = false,
val isRollback: Boolean = false,
val isChecking: Boolean = false,
val isDownloading: Boolean = false,
val isRestarting: Boolean = false,
val latestManifest: JSONObject? = null,
val downloadedManifest: JSONObject? = null,
val checkError: UpdatesStateError? = null,
val downloadError: UpdatesStateError? = null
) {

val json: Map<String, Any>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package expo.modules.updates.statemachine
* For now, we just have the "message" property.
*/
data class UpdatesStateError(
private val message: String
val message: String
) {
val json: Map<String, String>
get() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ class UpdatesStateMachine(
* The current state
*/
var state: UpdatesStateValue = UpdatesStateValue.Idle
private set

/**
* The context
*/
var context: UpdatesStateContext = UpdatesStateContext()
private set

/**
Called after the app restarts (reloadAsync()) to reset the machine to its
Expand Down

0 comments on commit 381b468

Please sign in to comment.