1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-04 16:46:46 +02:00

Implement file transfer queue for offline friends

File transfers initiated for offline friends are now
added to a queue and initiated all at once when the friend
appears online.
This commit is contained in:
jfreegman
2021-12-22 14:26:07 -05:00
parent 8d58e8f4d6
commit 6f8f6f0ac5
7 changed files with 193 additions and 47 deletions

View File

@ -1107,14 +1107,14 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
/* Determine which portion of friendlist to draw based on current position */
pthread_mutex_lock(&Winthread.lock);
int page = Friends.num_selected / (y2 - FLIST_OFST);
const int page = Friends.num_selected / (y2 - FLIST_OFST);
pthread_mutex_unlock(&Winthread.lock);
int start = (y2 - FLIST_OFST) * page;
int end = y2 - FLIST_OFST + start;
const int start = (y2 - FLIST_OFST) * page;
const int end = y2 - FLIST_OFST + start;
pthread_mutex_lock(&Winthread.lock);
size_t num_friends = Friends.num_friends;
const size_t num_friends = Friends.num_friends;
pthread_mutex_unlock(&Winthread.lock);
int i;