test: add enhanced download speed

This commit is contained in:
luvletter2333 2022-08-04 00:23:36 +08:00
parent dcff475b34
commit bfb3168c36
No known key found for this signature in database
GPG Key ID: A26A8880836E1978
5 changed files with 7 additions and 1 deletions

View File

@ -26,6 +26,8 @@ import java.util.concurrent.CountDownLatch;
import java.util.zip.GZIPInputStream;
import java.util.zip.ZipException;
import tw.nekomimi.nekogram.NekoConfig;
public class FileLoadOperation {
protected static class RequestInfo {
@ -189,7 +191,7 @@ public class FileLoadOperation {
}
private void updateParams() {
if (MessagesController.getInstance(currentAccount).getfileExperimentalParams) {
if (MessagesController.getInstance(currentAccount).getfileExperimentalParams || NekoConfig.enhancedFileLoader.Bool()) {
downloadChunkSizeBig = 1024 * 512;
maxDownloadRequests = 8;
maxDownloadRequestsBig = 8;

View File

@ -185,6 +185,7 @@ public class NekoConfig {
public static ConfigItem useMediaStreamInVoip = addConfig("UseMediaStreamInVoip", configTypeBool, false);
public static ConfigItem customAudioBitrate = addConfig("customAudioBitrate", configTypeInt, 32);
public static ConfigItem disableGroupVoipAudioProcessing = addConfig("disableGroupVoipAudioProcessing", configTypeBool, false);
public static ConfigItem enhancedFileLoader = addConfig("enhancedFileLoader", configTypeBool, false);
static {
loadConfig(false);

View File

@ -75,6 +75,7 @@ public class NekoExperimentalSettingsActivity extends BaseFragment {
private final AbstractConfigCell channelAliasRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.channelAlias));
private final AbstractConfigCell smoothKeyboardRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.smoothKeyboard));
private final AbstractConfigCell enhancedFileLoaderRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.enhancedFileLoader));
private final AbstractConfigCell mediaPreviewRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.mediaPreview));
private final AbstractConfigCell proxyAutoSwitchRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.proxyAutoSwitch));
private final AbstractConfigCell disableFilteringRow = cellGroup.appendCell(new ConfigCellCustom(CellGroup.ITEM_TYPE_TEXT_CHECK, true));

View File

@ -146,4 +146,5 @@
<string name="forceBlurInChat">强制启用聊天背景模糊</string>
<string name="ChatBlurAlphaValue">背景模糊度</string>
<string name="disablePremiumStickerAnimation">禁用会员贴纸动画</string>
<string name="enhancedFileLoader">加速下载</string>
</resources>

View File

@ -145,4 +145,5 @@
<string name="forceBlurInChat">Force enable Chat Blur</string>
<string name="ChatBlurAlphaValue">Chat Blur Alpha</string>
<string name="disablePremiumStickerAnimation">Disable premium sticker animation</string>
<string name="enhancedFileLoader">Enhance Download speed</string>
</resources>