mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-05 05:46:44 +02:00
don't sort after every friend add on statup
This commit is contained in:
@ -113,7 +113,7 @@ static void friendlist_onStatusMessageChange(ToxWindow *self, int num, uint8_t *
|
||||
friends[num].statusmsg_len = len;
|
||||
}
|
||||
|
||||
static void friendlist_onFriendAdded(ToxWindow *self, Tox *m, int num)
|
||||
static void friendlist_onFriendAdded(ToxWindow *self, Tox *m, int num, bool sort)
|
||||
{
|
||||
if (max_friends_index < 0 || max_friends_index >= MAX_FRIENDS_NUM)
|
||||
return;
|
||||
@ -142,7 +142,9 @@ static void friendlist_onFriendAdded(ToxWindow *self, Tox *m, int num)
|
||||
if (i == max_friends_index)
|
||||
++max_friends_index;
|
||||
|
||||
sort_friendlist_index();
|
||||
if (sort)
|
||||
sort_friendlist_index();
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user