2
0
mirror of https://github.com/ars3niy/tdlib-purple synced 2025-08-31 05:55:08 +00:00

Ask about downloading files above configured limit

This commit is contained in:
Arseniy Lartsev
2020-05-27 00:51:35 +02:00
parent a30aec80a2
commit 53b1d68d03
7 changed files with 130 additions and 18 deletions

View File

@@ -739,7 +739,7 @@ void transmitMessage(int64_t chatId, const char *message, TdTransceiver &transce
}
}
unsigned getFileSizeKb(const td::td_api::file &file)
unsigned getFileSize(const td::td_api::file &file)
{
int32_t size = file.size_;
if (size == 0)
@@ -748,5 +748,10 @@ unsigned getFileSizeKb(const td::td_api::file &file)
if (size <= 0)
return 0;
else
return size/1024;
return size;
}
unsigned getFileSizeKb(const td::td_api::file &file)
{
return getFileSize(file)/1024;
}