mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Made name consistent with other 'on change' callbacks
This commit is contained in:
parent
23f55c101d
commit
04c974962c
|
@ -462,18 +462,18 @@ void m_callback_read_receipt(void (*function)(int, uint32_t))
|
|||
read_receipt_isset = 1;
|
||||
}
|
||||
|
||||
static void (*friend_status)(int, uint8_t);
|
||||
static uint8_t friend_status_isset = 0;
|
||||
static void (*friend_statuschange)(int, uint8_t);
|
||||
static uint8_t friend_statuschange_isset = 0;
|
||||
void m_callback_friend_status(void (*function)(int, uint8_t))
|
||||
{
|
||||
friend_status = function;
|
||||
friend_status_isset = 1;
|
||||
friend_statuschange = function;
|
||||
friend_statuschange_isset = 1;
|
||||
}
|
||||
|
||||
static void set_friend_status(int friendnumber, uint8_t status)
|
||||
{
|
||||
if (friendlist[friendnumber].status != status && friend_status_isset)
|
||||
friend_status(friendnumber, status);
|
||||
if (friendlist[friendnumber].status != status && friend_statuschange_isset)
|
||||
friend_statuschange(friendnumber, status);
|
||||
friendlist[friendnumber].status = status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user