File download priority fine-tuning

This commit is contained in:
Bohdan Horbeshko 2022-01-10 04:30:18 -05:00
parent 77f9c9f74e
commit 3db096734f

View file

@ -137,7 +137,7 @@ func (c *Client) updateNewChat(update *client.UpdateNewChat) {
_, err := c.client.DownloadFile(&client.DownloadFileRequest{ _, err := c.client.DownloadFile(&client.DownloadFileRequest{
FileID: update.Chat.Photo.Small.ID, FileID: update.Chat.Photo.Small.ID,
Priority: 32, Priority: 32,
Synchronous: true, Synchronous: false,
}) })
if err != nil { if err != nil {
@ -202,8 +202,8 @@ func (c *Client) updateNewMessage(update *client.UpdateNewMessage) {
if file != nil && !file.Local.IsDownloadingCompleted { if file != nil && !file.Local.IsDownloadingCompleted {
c.client.DownloadFile(&client.DownloadFileRequest{ c.client.DownloadFile(&client.DownloadFileRequest{
FileID: file.ID, FileID: file.ID,
Priority: 32, Priority: 10,
Synchronous: true, Synchronous: false,
}) })
} }
// OTR support (I do not know why would you need it, seriously) // OTR support (I do not know why would you need it, seriously)