Skip to content

Commit

Permalink
v2.3.0-rc.3 (#1859)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarski committed Apr 26, 2024
1 parent 95c4e90 commit 32096e4
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 20 deletions.
4 changes: 2 additions & 2 deletions apps/mudita-center/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/mudita-center/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mudita-center",
"version": "2.3.0-rc.2",
"version": "2.3.0-rc.3",
"description": "Mudita Center",
"main": "./dist/main.js",
"productName": "Mudita Center",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const AppUpdateStepModal: FunctionComponent<Props> = ({
})

return () => unregister()
})
}, [appCurrentVersion, appLatestVersion])

useEffect(() => {
const unregister = registerErrorAppUpdateListener(() => {
Expand All @@ -70,10 +70,15 @@ const AppUpdateStepModal: FunctionComponent<Props> = ({
toCenterVersion: appLatestVersion,
state: TrackCenterUpdateState.Fail,
})
setAppUpdateStep(AppUpdateStep.Error)
setAppUpdateStep((prevAppUpdateStep) => {
// allow user to try updating before throw error to handle no network connection
return prevAppUpdateStep === AppUpdateStep.Updating
? AppUpdateStep.Error
: prevAppUpdateStep
})
})
return () => unregister()
})
}, [appCurrentVersion, appLatestVersion])

const handleProcessDownload = () => {
void trackCenterUpdate({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,17 @@ import { settingsStateSelector } from "Core/settings/selectors"

export const isAppUpdateProcessPassed = createSelector(
settingsStateSelector,
(settingsState): boolean => {
const { updateAvailable, updateAvailableSkipped, checkingForUpdateFailed } = settingsState
return checkingForUpdateFailed || updateAvailableSkipped || updateAvailable === false
({
updateAvailable,
updateAvailableSkipped,
checkingForUpdateFailed,
updateRequired,
}): boolean => {
return (
!updateRequired &&
(checkingForUpdateFailed ||
updateAvailableSkipped ||
updateAvailable === false)
)
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { settingsStateSelector } from "Core/settings/selectors"

export const shouldAppUpdateFlowVisible = createSelector(
settingsStateSelector,
(settingsState): boolean => {
const { updateAvailable, updateAvailableSkipped } = settingsState
return updateAvailable === true && !updateAvailableSkipped
({ updateAvailable, updateAvailableSkipped, updateRequired }): boolean => {
return (updateAvailable && !updateAvailableSkipped) || updateRequired
}
)
7 changes: 7 additions & 0 deletions libs/core/contacts/components/contacts/contacts.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,13 @@ const Contacts: FunctionComponent<ContactsProps> = ({

if (payload || message) {
const newError: FormError[] = []

if (message === "Edit Contact request failed") {
void modalService.openModal(<ErrorDataModal />, true)
reject()
return
}

if (
message === "phone-number-duplicated" &&
payload?.primaryPhoneNumberIsDuplicated
Expand Down
2 changes: 2 additions & 0 deletions libs/core/settings/actions/base.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export const setSettings = createAction<
| "updateAvailable"
| "latestVersion"
| "updateAvailableSkipped"
| "checkingForUpdate"
| "checkingForUpdateFailed"
>
>(SettingsEvent.SetSettings)

Expand Down
2 changes: 0 additions & 2 deletions libs/core/settings/actions/load-settings.action.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ test("`loadSettings` action dispatch SettingsEvent.LoadSettings event and calls
{
type: SettingsEvent.SetSettings,
payload: {
checkingForUpdate: false,
checkingForUpdateFailed: false,
collectingData: false,
currentVersion: `${packageInfo.version}`,
lowestSupportedVersions: {
Expand Down
2 changes: 0 additions & 2 deletions libs/core/settings/actions/load-settings.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ export const loadSettings = createAsyncThunk<
...settings,
updateRequired,
currentVersion: packageInfo.version,
checkingForUpdate: false,
checkingForUpdateFailed: false,
lowestSupportedVersions: {
lowestSupportedCenterVersion: configuration.centerVersion,
lowestSupportedProductVersion: configuration.productVersions,
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mudita-center",
"description": "Mudita Center",
"productName": "Mudita Center",
"version": "2.3.0-rc.2",
"version": "2.3.0-rc.3",
"private": true,
"workspaces": {
"packages": [
Expand Down

0 comments on commit 32096e4

Please sign in to comment.