Skip to content

Instantly share code, notes, and snippets.

@andreymusth
Created March 25, 2022 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreymusth/87e3efdabc849f4aa6e77c424a5c0083 to your computer and use it in GitHub Desktop.
Save andreymusth/87e3efdabc849f4aa6e77c424a5c0083 to your computer and use it in GitHub Desktop.
public static boolean canBlurChat() {
return getDevicePerformanceClass() == PERFORMANCE_CLASS_HIGH;
}
private static int measureMaxParticlesCount() {
switch (SharedConfig.getDevicePerformanceClass()) {
default:
case SharedConfig.PERFORMANCE_CLASS_LOW:
case SharedConfig.PERFORMANCE_CLASS_AVERAGE:
return 100;
case SharedConfig.PERFORMANCE_CLASS_HIGH:
return 150;
}
}
boolean animationEnabled =
MessagesController.getGlobalMainSettings().getBoolean("view_animations", true) &&
SharedConfig.getDevicePerformanceClass() != SharedConfig.PERFORMANCE_CLASS_LOW;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment