mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
fix: less with upload boost
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user