mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 13:47:05 +02:00
fix: less with upload boost
This commit is contained in:
parent
d0f793c06d
commit
cc494fee22
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
//
|
||||
// Copyright @Radolyn, 2024
|
||||
#include "telegram_helpers.h"
|
||||
|
||||
#include <functional>
|
||||
#include <QTimer>
|
||||
|
||||
|
@ -33,6 +34,8 @@
|
|||
#include "main/main_session.h"
|
||||
#include "ui/text/format_values.h"
|
||||
|
||||
#include "ayu/ayu_settings.h"
|
||||
|
||||
// https://github.com/AyuGram/AyuGram4AX/blob/rewrite/TMessagesProj/src/main/java/com/radolyn/ayugram/AyuConstants.java
|
||||
std::unordered_set<ID> ayugram_channels = {
|
||||
1905581924, // @ayugramchat
|
||||
|
@ -490,7 +493,9 @@ QString getMediaDC(not_null<HistoryItem*> message) {
|
|||
int getScheduleTime(int64 sumSize) {
|
||||
auto time = 12;
|
||||
|
||||
time += (int) std::ceil(std::max(6.0, std::ceil(sumSize / 1024.0 / 1024.0 * 4.5))) + 1;
|
||||
const auto settings = &AyuSettings::getInstance();
|
||||
const auto multiplier = settings->uploadSpeedBoost ? 0.7 : 4.5;
|
||||
time += (int) std::ceil(std::max(6.0, std::ceil(sumSize / 1024.0 / 1024.0 * multiplier))) + 1;
|
||||
|
||||
return time;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue