Skip to content

Commit

Permalink
fix updateCheck state after update process (#1523)
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarMichalkiewicz committed Oct 26, 2023
1 parent 75976df commit 6cf01ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/app/src/update/reducers/update-os.reducer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ describe("checkForUpdate", () => {
)
).toEqual({
...initialState,
silentCheckForUpdate: SilentCheckForUpdateState.Initial,
error: null,
})
})
Expand Down Expand Up @@ -368,7 +367,7 @@ describe("downloadUpdate", () => {
{ release: mockedRelease, state: ReleaseProcessState.Initial },
],
},
checkForUpdateState: State.Initial,
checkForUpdateState: State.Loaded,
downloadState: DownloadState.Loading,
error: null,
})
Expand All @@ -386,6 +385,7 @@ describe("downloadUpdate", () => {
)
).toEqual({
...initialState,
silentCheckForUpdate: SilentCheckForUpdateState.Loaded,
downloadState: DownloadState.Loaded,
})
})
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/update/reducers/update-os.reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,11 @@ export const updateOsReducer = createReducer<UpdateOsState>(
})
)
state.error = null
state.checkForUpdateState = CheckForUpdateState.Initial
state.downloadState = DownloadState.Loading
})
builder.addCase(downloadUpdates.fulfilled, (state) => {
state.checkForUpdateState = CheckForUpdateState.Initial
state.silentCheckForUpdate = SilentCheckForUpdateState.Loaded
state.downloadState = DownloadState.Loaded
})
builder.addCase(downloadUpdates.rejected, (state, action) => {
Expand All @@ -255,7 +256,6 @@ export const updateOsReducer = createReducer<UpdateOsState>(
})
)
state.error = null
state.checkForUpdateState = CheckForUpdateState.Initial
state.downloadState = DownloadState.Initial
state.updateOsState = State.Loading
})
Expand Down

0 comments on commit 6cf01ad

Please sign in to comment.