Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CP-2151] MC update badge status enhancements #1497

Merged
merged 59 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
3bcc5cd
[CP-2159] [Contacts] Secondary phone number stays visible after remov…
patryk-sierzega Oct 13, 2023
f8f0c4f
[CP-2203] OS update badge status enhancements (#1440)
OskarMichalkiewicz Oct 13, 2023
2016ac0
[CP-2159] [Contacts] Secondary phone number stays visible after remov…
patryk-sierzega Oct 13, 2023
a264148
[CP-101] Windows titles updated - TEST (#1465)
dkarski Oct 17, 2023
d53a1bd
Revert "[CP-101] Windows titles updated - TEST (#1465)" (#1466)
dkarski Oct 17, 2023
beb3fc8
[CP-2159] [Contacts] Secondary phone number stays visible after remov…
patryk-sierzega Oct 13, 2023
708b130
[CP-101] Windows titles updated - TEST (#1465)
dkarski Oct 17, 2023
fbd732f
Revert "[CP-101] Windows titles updated - TEST (#1465)" (#1466)
dkarski Oct 17, 2023
8b91a76
[CP-2203] OS update badge status enhancements (#1442)
OskarMichalkiewicz Oct 18, 2023
29f665a
Merge branch 'develop' of https://github.com/mudita/mudita-center int…
patryk-sierzega Oct 18, 2023
5145751
app update badges enchancment
OskarMichalkiewicz Oct 19, 2023
ac903d0
Merge branch 'develop' of github.com:mudita/mudita-center into develop
OskarMichalkiewicz Oct 19, 2023
19b4caf
Merge branch 'develop' into CP-2151
OskarMichalkiewicz Oct 19, 2023
d4f4a34
lint, test and other fixes
OskarMichalkiewicz Oct 19, 2023
302c172
[CP-2079] Merge enums used in invoking methods between main and rende…
patryk-sierzega Oct 19, 2023
3843a7f
Merge branch 'develop' into CP-2151
OskarMichalkiewicz Oct 19, 2023
ccc1399
test fix
OskarMichalkiewicz Oct 19, 2023
036bac3
Merge branch 'CP-2151' of github.com:mudita/mudita-center into CP-2151
OskarMichalkiewicz Oct 19, 2023
88eb45d
fix after qa review
OskarMichalkiewicz Oct 20, 2023
859cf1f
tests fix
OskarMichalkiewicz Oct 20, 2023
7932ffa
[CP-2159] [Contacts] Secondary phone number stays visible after remov…
patryk-sierzega Oct 13, 2023
27c382c
[CP-101] Windows titles updated - TEST (#1465)
dkarski Oct 17, 2023
8196a54
Revert "[CP-101] Windows titles updated - TEST (#1465)" (#1466)
dkarski Oct 17, 2023
46c6679
[CP-2203] OS update badge status enhancements (#1442)
OskarMichalkiewicz Oct 18, 2023
cc49313
[CP-2079] Merge enums used in invoking methods between main and rende…
patryk-sierzega Oct 19, 2023
4322b71
Merge branch 'develop' into CP-2151
dkarski Oct 20, 2023
ebc5b3c
test
OskarMichalkiewicz Oct 20, 2023
248a1f3
Merge branch 'CP-2151' of github.com:mudita/mudita-center into CP-2151
OskarMichalkiewicz Oct 20, 2023
ef880f5
Merge branch 'develop' of https://github.com/mudita/mudita-center int…
patryk-sierzega Oct 23, 2023
fd128b1
[CP-2159] [Contacts] Secondary phone number stays visible after remov…
patryk-sierzega Oct 13, 2023
d92aaf6
[CP-101] Windows titles updated - TEST (#1465)
dkarski Oct 17, 2023
5ffff3b
Revert "[CP-101] Windows titles updated - TEST (#1465)" (#1466)
dkarski Oct 17, 2023
3e5944d
[CP-2203] OS update badge status enhancements (#1442)
OskarMichalkiewicz Oct 18, 2023
3503553
[CP-2079] Merge enums used in invoking methods between main and rende…
patryk-sierzega Oct 19, 2023
cb3effa
[CP-101] Windows titles updated - TEST (#1465)
dkarski Oct 17, 2023
9879ed8
Revert "[CP-101] Windows titles updated - TEST (#1465)" (#1466)
dkarski Oct 17, 2023
d71cf3f
Merge branch 'develop' of https://github.com/mudita/mudita-center int…
patryk-sierzega Oct 23, 2023
33485ac
fix update check not triggering on app start
OskarMichalkiewicz Oct 23, 2023
6ca0ccd
lint and tests fix
OskarMichalkiewicz Oct 23, 2023
5e3eea3
Merge branch 'develop' of github.com:mudita/mudita-center into develop
OskarMichalkiewicz Oct 23, 2023
aef30ed
Merge branch 'develop' into CP-2151
OskarMichalkiewicz Oct 23, 2023
fbe6045
fix translation
OskarMichalkiewicz Oct 24, 2023
43d5ca6
[CP-2159] [Contacts] Secondary phone number stays visible after remov…
patryk-sierzega Oct 13, 2023
b9d29d5
[CP-101] Windows titles updated - TEST (#1465)
dkarski Oct 17, 2023
9e1da6d
Revert "[CP-101] Windows titles updated - TEST (#1465)" (#1466)
dkarski Oct 17, 2023
353dd43
[CP-2203] OS update badge status enhancements (#1442)
OskarMichalkiewicz Oct 18, 2023
89b961c
[CP-2079] Merge enums used in invoking methods between main and rende…
patryk-sierzega Oct 19, 2023
ef1662b
[CP-101] Windows titles updated - TEST (#1465)
dkarski Oct 17, 2023
275adfe
Revert "[CP-101] Windows titles updated - TEST (#1465)" (#1466)
dkarski Oct 17, 2023
3d14474
[CP-101] Windows titles updated - TEST (#1465)
dkarski Oct 17, 2023
4f125b0
Revert "[CP-101] Windows titles updated - TEST (#1465)" (#1466)
dkarski Oct 17, 2023
5b77678
[CP-101] Windows titles updated - TEST (#1465)
dkarski Oct 17, 2023
01fed91
Revert "[CP-101] Windows titles updated - TEST (#1465)" (#1466)
dkarski Oct 17, 2023
297295f
Merge branch 'develop' of github.com:mudita/mudita-center into develop
OskarMichalkiewicz Oct 24, 2023
e8234a1
fixes
OskarMichalkiewicz Oct 24, 2023
91a20ca
version change
OskarMichalkiewicz Oct 25, 2023
314a111
Merge branch 'develop' of github.com:mudita/mudita-center into develop
OskarMichalkiewicz Oct 25, 2023
1821d4d
Merge branch 'develop' of github.com:mudita/mudita-center into develop
OskarMichalkiewicz Oct 25, 2023
b644f80
Merge branch 'develop' into CP-2151
OskarMichalkiewicz Oct 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ JIRA Reference: [CP-XXX]

### :memo: Description ️

-
-

### :muscle: Checklist before requesting a review - nice to have

Expand Down
8 changes: 0 additions & 8 deletions packages/app/src/__deprecated__/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ import registerCopyFileListener from "App/__deprecated__/main/functions/register
import registerWriteGzipListener from "App/__deprecated__/main/functions/register-write-gzip-listener"
import registerRmdirListener from "App/__deprecated__/main/functions/register-rmdir-listener"
import registerArchiveFilesListener from "App/__deprecated__/main/functions/register-archive-files-listener"
import registerReadFileListener from "App/file-system/listeners/read-file.listener"
import createDownloadListenerRegistrar from "App/__deprecated__/main/functions/create-download-listener-registrar"
import registerEncryptFileListener from "App/file-system/listeners/encrypt-file.listener"
import registerDecryptFileListener from "App/file-system/listeners/decrypt-file.listener"
import registerUnlinkFileListener from "App/file-system/listeners/unlink-file.listener"
import {
registerDownloadHelpHandler,
removeDownloadHelpHandler,
Expand Down Expand Up @@ -196,10 +192,6 @@ const createWindow = async () => {
registerRmdirListener()
registerWriteGzipListener()
registerArchiveFilesListener()
registerEncryptFileListener()
registerReadFileListener()
registerUnlinkFileListener()
registerDecryptFileListener()
registerMetadataAllGetValueListener()
registerMetadataGetValueListener()
registerMetadataSetValueListener()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const UpdateButtonComponent: FunctionComponent<
<UpdateButton
displayStyle={DisplayStyle.LinkWithParagraph}
label={label}
Icon={IconType.Refresh}
Icon={updating ? IconType.Refresh : undefined}
onClick={onClick}
updating={updating}
disabled={updating}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,9 @@
"module.overview.systemDownloadAction": "Download now",
"module.overview.systemLastUpdate": "Updated: {date}",
"module.overview.systemUpdateAction": "Update now",
"module.overview.systemUpdateAvailable": "Update is available",
"module.overview.systemUpdateCheckFailed": "Checking for update failed",
"module.overview.systemUpdateDownloaded": "Update is available",
"module.overview.systemUpdateAvailable": "Version {version} is available",
"module.overview.systemUpdateCheckFailed": "Checking for updates failed",
"module.overview.systemUpdateDownloaded": "Install now",
"module.overview.systemUpdateUpToDate": "You’re up to date.",
"module.overview.systemVersion": "MuditaOS version",
"module.overview.systemVersionTitle": "Current version:",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,12 @@
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
*/

export const ControllerPrefix = "analytic-data-tracker"

export enum IpcAnalyticDataTrackerEvent {
Track = "track",
TrackUnique = "track-unique",
TrackWithoutDeviceCheck = "track-without-device-check",
TrackUniqueWithoutDeviceCheck = "track-unique-without-device-check",
ToggleTracking = "toggle-tracking",
SetExternalUsageDevice = "set-external-usage-device",
SetVisitorMetadata = "set-visitor-metadata",
}

export enum IpcAnalyticDataTrackerRequest {
Track = "analytic-data-tracker-track",
TrackUnique = "analytic-data-tracker-track-unique",
TrackWithoutDeviceCheck = "analytic-data-tracker-track-without-device-check",
TrackUniqueWithoutDeviceCheck = "analytic-data-tracker-track-unique-without-device-check",
ToggleTracking = "analytic-data-tracker-toggle-tracking",
SetExternalUsageDevice = "analytic-data-tracker-set-external-usage-device",
SetVisitorMetadata = "analytic-data-tracker-set-visitor-metadata",
Track = "analytic_track",
TrackUnique = "analytic_track-unique",
TrackWithoutDeviceCheck = "analytic_track-without-device-check",
TrackUniqueWithoutDeviceCheck = "analytic_track-unique-without-device-check",
ToggleTracking = "analytic_toggle-tracking",
SetExternalUsageDevice = "analytic_set-external-usage-device",
SetVisitorMetadata = "analytic_set-visitor-metadata",
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,14 @@
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
*/

import { Controller, IpcEvent } from "App/core/decorators"
import {
ControllerPrefix,
IpcAnalyticDataTrackerEvent,
} from "App/analytic-data-tracker/constants"
import { IpcEvent } from "App/core/decorators"
import { IpcAnalyticDataTrackerEvent } from "App/analytic-data-tracker/constants"
import {
AnalyticDataTrackerClass,
VisitorMetadata,
} from "App/analytic-data-tracker/services"
import { TrackEvent } from "App/analytic-data-tracker/types"

@Controller(ControllerPrefix)
export class AnalyticDataTrackerController {
constructor(private tracker: AnalyticDataTrackerClass) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
*/

import { ipcRenderer } from "electron-better-ipc"
import { IpcAnalyticDataTrackerRequest } from "App/analytic-data-tracker/constants"
import { IpcAnalyticDataTrackerEvent } from "App/analytic-data-tracker/constants"

export const setExternalUsageDeviceRequest = async (
flag: boolean
): Promise<void> => {
return ipcRenderer.callMain(
IpcAnalyticDataTrackerRequest.SetExternalUsageDevice,
IpcAnalyticDataTrackerEvent.SetExternalUsageDevice,
flag
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
*/

import { ipcRenderer } from "electron-better-ipc"
import { IpcAnalyticDataTrackerRequest } from "App/analytic-data-tracker/constants"
import { IpcAnalyticDataTrackerEvent } from "App/analytic-data-tracker/constants"
import { VisitorMetadata } from "App/analytic-data-tracker/services"

export const setVisitorMetadataRequest = async (
visitorMetadata: VisitorMetadata
): Promise<void> => {
return ipcRenderer.callMain(
IpcAnalyticDataTrackerRequest.SetVisitorMetadata,
IpcAnalyticDataTrackerEvent.SetVisitorMetadata,
visitorMetadata
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*/

import { ipcRenderer } from "electron-better-ipc"
import { IpcAnalyticDataTrackerRequest } from "App/analytic-data-tracker/constants"
import { IpcAnalyticDataTrackerEvent } from "App/analytic-data-tracker/constants"

export const toggleTrackingRequest = async (flag: boolean): Promise<void> => {
return ipcRenderer.callMain(IpcAnalyticDataTrackerRequest.ToggleTracking, flag)
return ipcRenderer.callMain(IpcAnalyticDataTrackerEvent.ToggleTracking, flag)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
*/

import { ipcRenderer } from "electron-better-ipc"
import { IpcAnalyticDataTrackerRequest } from "App/analytic-data-tracker/constants"
import { IpcAnalyticDataTrackerEvent } from "App/analytic-data-tracker/constants"
import { TrackEvent } from "App/analytic-data-tracker/types"

export const trackUniqueWithoutDeviceCheckRequest = async (
event: TrackEvent
): Promise<void> => {
return ipcRenderer.callMain(
IpcAnalyticDataTrackerRequest.TrackUniqueWithoutDeviceCheck,
IpcAnalyticDataTrackerEvent.TrackUniqueWithoutDeviceCheck,
event
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*/

import { ipcRenderer } from "electron-better-ipc"
import { IpcAnalyticDataTrackerRequest } from "App/analytic-data-tracker/constants"
import { IpcAnalyticDataTrackerEvent } from "App/analytic-data-tracker/constants"
import { TrackEvent } from "App/analytic-data-tracker/types"

export const trackUniqueRequest = async (event: TrackEvent): Promise<void> => {
return ipcRenderer.callMain(IpcAnalyticDataTrackerRequest.TrackUnique, event)
return ipcRenderer.callMain(IpcAnalyticDataTrackerEvent.TrackUnique, event)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
*/

import { ipcRenderer } from "electron-better-ipc"
import { IpcAnalyticDataTrackerRequest } from "App/analytic-data-tracker/constants"
import { IpcAnalyticDataTrackerEvent } from "App/analytic-data-tracker/constants"
import { TrackEvent } from "App/analytic-data-tracker/types"

export const trackWithoutDeviceCheckRequest = async (
event: TrackEvent
): Promise<void> => {
return ipcRenderer.callMain(
IpcAnalyticDataTrackerRequest.TrackWithoutDeviceCheck,
IpcAnalyticDataTrackerEvent.TrackWithoutDeviceCheck,
event
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*/

import { ipcRenderer } from "electron-better-ipc"
import { IpcAnalyticDataTrackerRequest } from "App/analytic-data-tracker/constants"
import { IpcAnalyticDataTrackerEvent } from "App/analytic-data-tracker/constants"
import { TrackEvent } from "App/analytic-data-tracker/types"

export const trackRequest = async (event: TrackEvent): Promise<void> => {
return ipcRenderer.callMain(IpcAnalyticDataTrackerRequest.Track, event)
return ipcRenderer.callMain(IpcAnalyticDataTrackerEvent.Track, event)
}
12 changes: 3 additions & 9 deletions packages/app/src/backup/constants/controller.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@
export const ControllerPrefix = "backup"

export enum IpcBackupEvent {
LoadBackups = "load-backups",
CreateBackup = "create-backup",
RestoreBackup = "restore-backup",
}

export enum IpcBackupRequest {
LoadBackups = "backup-load-backups",
CreateBackup = "backup-create-backup",
RestoreBackup = "backup-restore-backup",
LoadBackups = "backup_load-backups",
CreateBackup = "backup_create-backup",
RestoreBackup = "backup_restore-backup",
}
9 changes: 2 additions & 7 deletions packages/app/src/backup/controllers/backup.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,17 @@
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
*/

import { Controller, IpcEvent } from "App/core/decorators"
import { IpcEvent } from "App/core/decorators"
import { ResultObject } from "App/core/builder"
import { Backup } from "App/backup/dto"
import {
BackupError,
ControllerPrefix,
IpcBackupEvent,
} from "App/backup/constants"
import { BackupError, IpcBackupEvent } from "App/backup/constants"
import {
BackupCreateService,
BackupRestoreService,
LoadBackupService,
} from "App/backup/services"
import { CreateDeviceBackup, RestoreDeviceBackup } from "App/backup/types"

@Controller(ControllerPrefix)
export class BackupController {
constructor(
private backupCreateService: BackupCreateService,
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/backup/requests/create-backup.request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

import { ipcRenderer } from "electron-better-ipc"
import { ResultObject } from "App/core/builder"
import { IpcBackupRequest } from "App/backup/constants"
import { IpcBackupEvent } from "App/backup/constants"
import { CreateDeviceBackup } from "App/backup/types"

export const createBackupRequest = async (
options: CreateDeviceBackup
): Promise<ResultObject<string[]>> => {
return ipcRenderer.callMain(IpcBackupRequest.CreateBackup, options)
return ipcRenderer.callMain(IpcBackupEvent.CreateBackup, options)
}
4 changes: 2 additions & 2 deletions packages/app/src/backup/requests/load-backups.request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

import { ipcRenderer } from "electron-better-ipc"
import { ResultObject } from "App/core/builder"
import { IpcBackupRequest } from "App/backup/constants"
import { IpcBackupEvent } from "App/backup/constants"
import { Backup } from "App/backup/dto"

export const loadBackupsRequest = async (
options: string
): Promise<ResultObject<Backup[]>> => {
return ipcRenderer.callMain(IpcBackupRequest.LoadBackups, options)
return ipcRenderer.callMain(IpcBackupEvent.LoadBackups, options)
}
4 changes: 2 additions & 2 deletions packages/app/src/backup/requests/restore-backup.request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

import { ipcRenderer } from "electron-better-ipc"
import { ResultObject } from "App/core/builder"
import { BackupError, IpcBackupRequest } from "App/backup/constants"
import { BackupError, IpcBackupEvent } from "App/backup/constants"
import { RestoreDeviceBackup } from "App/backup/types"

export const restoreBackupRequest = async (
options: RestoreDeviceBackup
): Promise<ResultObject<boolean, BackupError>> => {
return ipcRenderer.callMain(IpcBackupRequest.RestoreBackup, options)
return ipcRenderer.callMain(IpcBackupEvent.RestoreBackup, options)
}
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ const ContactDetails: FunctionComponent<ContactDetailsProps> = ({
<Input
type={"text"}
data-testid={ContactDetailsTestIds.PrimaryPhoneInput}
value={contact.primaryPhoneNumber}
value={contact.primaryPhoneNumber ?? ""}
label={intl.formatMessage(messages.noPrimaryNumber)}
// TODO: Implement additional toggles for this feature
trailingIcons={
Expand All @@ -229,7 +229,7 @@ const ContactDetails: FunctionComponent<ContactDetailsProps> = ({
<Input
type={"text"}
data-testid={ContactDetailsTestIds.SecondaryPhoneInput}
value={contact.secondaryPhoneNumber}
value={contact.secondaryPhoneNumber ?? ""}
label={intl.formatMessage(messages.noSecondNumber)}
// TODO: Implement additional toggles for this feature
trailingIcons={
Expand Down
14 changes: 3 additions & 11 deletions packages/app/src/contacts/constants/controller.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,8 @@
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
*/

export const ControllerPrefix = "contact"

export enum IpcContactEvent {
CreateContact = "create-contact",
EditContact = "edit-contact",
DeleteContacts = "delete-contacts",
}

export enum IpcContactRequest {
CreateContact = "contact-create-contact",
EditContact = "contact-edit-contact",
DeleteContacts = "contact-delete-contacts",
CreateContact = "contact_create-contact",
EditContact = "contact_edit-contact",
DeleteContacts = "contact_delete-contacts",
}
5 changes: 2 additions & 3 deletions packages/app/src/contacts/controllers/contact.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
* For licensing, see https://github.com/mudita/mudita-center/blob/master/LICENSE.md
*/

import { Controller, IpcEvent } from "App/core/decorators"
import { IpcEvent } from "App/core/decorators"
import { ContactService } from "App/contacts/services"
import { RequestResponse } from "App/core/types/request-response.interface"
import { ControllerPrefix, IpcContactEvent } from "App/contacts/constants"
import { IpcContactEvent } from "App/contacts/constants"
import { Contact, ContactID } from "App/contacts/reducers"

@Controller(ControllerPrefix)
export class ContactController {
constructor(private contactService: ContactService) {}

Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/contacts/requests/create-contact.request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
*/

import { ipcRenderer } from "electron-better-ipc"
import { IpcContactRequest } from "App/contacts/constants"
import { IpcContactEvent } from "App/contacts/constants"
import { Contact, NewContact } from "App/contacts/reducers/contacts.interface"
import { RequestResponse } from "App/core/types/request-response.interface"

export const createContactRequest = async (
newContact: NewContact
): Promise<RequestResponse<Contact>> => {
return ipcRenderer.callMain(IpcContactRequest.CreateContact, newContact)
return ipcRenderer.callMain(IpcContactEvent.CreateContact, newContact)
}
7 changes: 2 additions & 5 deletions packages/app/src/contacts/requests/delete-contacts.request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
*/

import { ipcRenderer } from "electron-better-ipc"
import { IpcContactRequest } from "App/contacts/constants"
import { IpcContactEvent } from "App/contacts/constants"
import { ContactID } from "App/contacts/reducers/contacts.interface"
import { RequestResponse } from "App/core/types/request-response.interface"

export const deleteContactsRequest = async (
contactIds: ContactID[]
): Promise<RequestResponse<ContactID[]>> => {
return await ipcRenderer.callMain(
IpcContactRequest.DeleteContacts,
contactIds
)
return await ipcRenderer.callMain(IpcContactEvent.DeleteContacts, contactIds)
}
8 changes: 5 additions & 3 deletions packages/app/src/contacts/requests/edit-contact.request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
*/

import { ipcRenderer } from "electron-better-ipc"
import { IpcContactRequest } from "App/contacts/constants"
import { IpcContactEvent } from "App/contacts/constants"
import { Contact } from "App/contacts/reducers/contacts.interface"
import { RequestResponse } from "App/core/types/request-response.interface"

export const editContactRequest = (contact: Contact): Promise<RequestResponse<Contact>> => {
return ipcRenderer.callMain(IpcContactRequest.EditContact, contact)
export const editContactRequest = (
contact: Contact
): Promise<RequestResponse<Contact>> => {
return ipcRenderer.callMain(IpcContactEvent.EditContact, contact)
}
Loading
Loading