feat: Disable Emoji Draw Limit

This commit is contained in:
xtaodada 2022-10-21 23:11:00 +08:00
parent 25008df152
commit 1759e0944a
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
5 changed files with 15 additions and 3 deletions

View File

@ -49,6 +49,7 @@ import org.telegram.ui.Components.AnimatedEmojiSpan;
import tw.nekomimi.nekogram.EmojiProvider;
import tw.nekomimi.nekogram.NekoXConfig;
import tw.nekomimi.nekogram.NekoConfig;
import xyz.nextalone.nagram.NaConfig;
public class Emoji {
@ -570,9 +571,11 @@ public class Emoji {
} catch (Exception e) {
FileLog.e(e);
}
int limitCount = SharedConfig.getDevicePerformanceClass() >= SharedConfig.PERFORMANCE_CLASS_HIGH ? 100 : 50;
if ((Build.VERSION.SDK_INT < 23 || Build.VERSION.SDK_INT >= 29)/* && !BuildVars.DEBUG_PRIVATE_VERSION*/ && (i + 1) >= limitCount) {
break;
if (!NaConfig.INSTANCE.getDisableEmojiDrawLimit().Bool()) {
int limitCount = SharedConfig.getDevicePerformanceClass() >= SharedConfig.PERFORMANCE_CLASS_HIGH ? 100 : 50;
if ((Build.VERSION.SDK_INT < 23 || Build.VERSION.SDK_INT >= 29)/* && !BuildVars.DEBUG_PRIVATE_VERSION*/ && (i + 1) >= limitCount) {
break;
}
}
}
return s;

View File

@ -98,6 +98,7 @@ public class NekoExperimentalSettingsActivity extends BaseFragment {
private final AbstractConfigCell showRPCErrorRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getShowRPCError()));
private final AbstractConfigCell customArtworkApiRow = cellGroup.appendCell(new ConfigCellTextInput(null, NaConfig.INSTANCE.getCustomArtworkApi(), "", null));
private final AbstractConfigCell fakeHighPerformanceDeviceRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getFakeHighPerformanceDevice()));
private final AbstractConfigCell disableEmojiDrawLimitRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDisableEmojiDrawLimit()));
private final AbstractConfigCell divider1 = cellGroup.appendCell(new ConfigCellDivider());
private UndoView tooltip;

View File

@ -340,6 +340,12 @@ object NaConfig {
ConfigItem.configTypeBool,
false
)
val disableEmojiDrawLimit =
addConfig(
"DisableEmojiDrawLimit",
ConfigItem.configTypeBool,
false
)
private fun addConfig(
k: String,

View File

@ -68,4 +68,5 @@
<string name="CustomEditedMessage">自定义已编辑消息提示词</string>
<string name="HidePremiumOnlyChannel">切换皮套隐藏大会员专享</string>
<string name="FakeHighPerformanceDevice">伪装高性能设备</string>
<string name="DisableEmojiDrawLimit">解除 emoji 渲染上限</string>
</resources>

View File

@ -69,4 +69,5 @@
<string name="CustomEditedMessage">Custom Edited Message word</string>
<string name="HidePremiumOnlyChannel">Hide Premium Only Channel</string>
<string name="FakeHighPerformanceDevice">Fake High Performance Device</string>
<string name="DisableEmojiDrawLimit">Disable Emoji Draw Limit</string>
</resources>