mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +00:00
tweak(contacts): Misc changes to contact handling
This commit is contained in:
1 parent
d036243d64
commit
be8e9bfa39
4 files changed
+5
-7
No files matched your search
+1
-1
@@ -40,7 +40,7 @@
|
||||
"showNotifications": true
|
||||
},
|
||||
"debug": {
|
||||
"level": "debug",
|
||||
"level": "silly",
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ const ContactsInfoPage = () => {
|
||||
addContact(serverResp.data);
|
||||
addAlert({
|
||||
message: t('APPS_CONTACT_ADD_SUCCESS'),
|
||||
type: 'error',
|
||||
type: 'success',
|
||||
});
|
||||
history.replace(referal);
|
||||
});
|
||||
|
||||
@@ -54,8 +54,7 @@ export const useContactActions = (): UseContactsValue => {
|
||||
|
||||
const deleteContact = useCallback(
|
||||
(id: number): void => {
|
||||
const contactIndex = contacts.findIndex((contact) => contact.id === id);
|
||||
const newContacts = [...contacts].slice(contactIndex);
|
||||
const newContacts = [...contacts].filter((contact) => contact.id !== id);
|
||||
setContacts(newContacts);
|
||||
},
|
||||
[contacts, setContacts],
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import PlayerService from '../players/player.service';
|
||||
import { contactsLogger } from './contacts.utils';
|
||||
import ContactsDB, { _ContactsDB } from './contacts.db';
|
||||
import { Contact, ContactEvents, PreDBContact } from '../../../typings/contact';
|
||||
import { FxServerResponse } from '../../../typings/phone';
|
||||
import { ContactServerResp } from './contacts.interfaces';
|
||||
import { Contact, ContactDeleteDTO, PreDBContact } from '../../../typings/contact';
|
||||
import { PromiseEventResp, PromiseRequest } from '../utils/PromiseNetEvents/promise.types';
|
||||
|
||||
class _ContactService {
|
||||
private readonly contactsDB: _ContactsDB;
|
||||
|
||||
Reference in new issue
Block a user