mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-04-30 21:19:33 +00:00
Update to 8.6.0
This commit is contained in:
parent
3708e9847a
commit
d30f796d8c
2625 changed files with 166215 additions and 59265 deletions
|
|
@ -39,6 +39,15 @@ import java.util.Iterator;
|
|||
import java.util.Locale;
|
||||
|
||||
public class SharedConfig {
|
||||
public final static int PASSCODE_TYPE_PIN = 0,
|
||||
PASSCODE_TYPE_PASSWORD = 1;
|
||||
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({
|
||||
PASSCODE_TYPE_PIN,
|
||||
PASSCODE_TYPE_PASSWORD
|
||||
})
|
||||
public @interface PasscodeType {}
|
||||
|
||||
public static String pushString = "";
|
||||
public static String pushStringStatus = "";
|
||||
|
|
@ -50,15 +59,17 @@ public class SharedConfig {
|
|||
|
||||
public static String directShareHash;
|
||||
|
||||
public static boolean saveIncomingPhotos;
|
||||
@PasscodeType
|
||||
public static int passcodeType;
|
||||
public static String passcodeHash = "";
|
||||
public static long passcodeRetryInMs;
|
||||
public static long lastUptimeMillis;
|
||||
public static int badPasscodeTries;
|
||||
public static byte[] passcodeSalt = new byte[0];
|
||||
public static boolean appLocked;
|
||||
public static int passcodeType;
|
||||
public static int autoLockIn = 60 * 60;
|
||||
|
||||
public static boolean saveIncomingPhotos;
|
||||
public static boolean allowScreenCapture;
|
||||
public static int lastPauseTime;
|
||||
public static boolean isWaitingForPasscodeEnter;
|
||||
|
|
@ -108,7 +119,8 @@ public class SharedConfig {
|
|||
public static boolean pauseMusicOnRecord = true;
|
||||
public static boolean chatBlur = true;
|
||||
public static boolean noiseSupression;
|
||||
public static boolean noStatusBar;
|
||||
public static boolean noStatusBar = true;
|
||||
public static boolean forceRtmpStream;
|
||||
public static boolean sortContactsByName;
|
||||
public static boolean sortFilesByName;
|
||||
public static boolean shuffleMusic;
|
||||
|
|
@ -119,7 +131,7 @@ public class SharedConfig {
|
|||
public static boolean allowBigEmoji;
|
||||
public static boolean useSystemEmoji;
|
||||
public static int fontSize = 16;
|
||||
public static int bubbleRadius = 10;
|
||||
public static int bubbleRadius = 17;
|
||||
public static int ivFontSize = 16;
|
||||
public static int messageSeenHintCount;
|
||||
public static int emojiInteractionsHintCount;
|
||||
|
|
@ -233,7 +245,7 @@ public class SharedConfig {
|
|||
}
|
||||
editor.putLong("appUpdateCheckTime", lastUpdateCheckTime);
|
||||
|
||||
editor.commit();
|
||||
editor.apply();
|
||||
} catch (Exception e) {
|
||||
FileLog.e(e);
|
||||
}
|
||||
|
|
@ -254,6 +266,8 @@ public class SharedConfig {
|
|||
return;
|
||||
}
|
||||
|
||||
BackgroundActivityPrefs.prefs = ApplicationLoader.applicationContext.getSharedPreferences("background_activity", Context.MODE_PRIVATE);
|
||||
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("userconfing", Context.MODE_PRIVATE);
|
||||
saveIncomingPhotos = preferences.getBoolean("saveIncomingPhotos", false);
|
||||
passcodeHash = preferences.getString("passcodeHash1", "");
|
||||
|
|
@ -341,7 +355,7 @@ public class SharedConfig {
|
|||
roundCamera16to9 = true;//preferences.getBoolean("roundCamera16to9", false);
|
||||
repeatMode = preferences.getInt("repeatMode", 0);
|
||||
fontSize = preferences.getInt("fons_size", AndroidUtilities.isTablet() ? 18 : 16);
|
||||
bubbleRadius = preferences.getInt("bubbleRadius", 10);
|
||||
bubbleRadius = preferences.getInt("bubbleRadius", 17);
|
||||
ivFontSize = preferences.getInt("iv_font_size", fontSize);
|
||||
allowBigEmoji = preferences.getBoolean("allowBigEmoji", true);
|
||||
useSystemEmoji = preferences.getBoolean("useSystemEmoji", false);
|
||||
|
|
@ -363,7 +377,8 @@ public class SharedConfig {
|
|||
devicePerformanceClass = preferences.getInt("devicePerformanceClass", -1);
|
||||
loopStickers = preferences.getBoolean("loopStickers", true);
|
||||
keepMedia = preferences.getInt("keep_media", 2);
|
||||
noStatusBar = preferences.getBoolean("noStatusBar", false);
|
||||
noStatusBar = preferences.getBoolean("noStatusBar", true);
|
||||
forceRtmpStream = preferences.getBoolean("forceRtmpStream", false);
|
||||
lastKeepMediaCheckTime = preferences.getInt("lastKeepMediaCheckTime", 0);
|
||||
lastLogsCheckTime = preferences.getInt("lastLogsCheckTime", 0);
|
||||
searchMessagesAsListHintShows = preferences.getInt("searchMessagesAsListHintShows", 0);
|
||||
|
|
@ -525,7 +540,7 @@ public class SharedConfig {
|
|||
public static void clearConfig() {
|
||||
saveIncomingPhotos = false;
|
||||
appLocked = false;
|
||||
passcodeType = 0;
|
||||
passcodeType = PASSCODE_TYPE_PIN;
|
||||
passcodeRetryInMs = 0;
|
||||
lastUptimeMillis = 0;
|
||||
badPasscodeTries = 0;
|
||||
|
|
@ -723,6 +738,14 @@ public class SharedConfig {
|
|||
editor.commit();
|
||||
}
|
||||
|
||||
public static void toggleForceRTMPStream() {
|
||||
forceRtmpStream = !forceRtmpStream;
|
||||
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putBoolean("forceRtmpStream", forceRtmpStream);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public static void toggleNoStatusBar() {
|
||||
noStatusBar = !noStatusBar;
|
||||
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
|
||||
|
|
@ -1196,9 +1219,21 @@ public class SharedConfig {
|
|||
}
|
||||
|
||||
public static boolean canBlurChat() {
|
||||
return BuildVars.DEBUG_VERSION && getDevicePerformanceClass() == PERFORMANCE_CLASS_HIGH;
|
||||
return getDevicePerformanceClass() == PERFORMANCE_CLASS_HIGH;
|
||||
}
|
||||
public static boolean chatBlurEnabled() {
|
||||
return canBlurChat() && chatBlur;
|
||||
}
|
||||
|
||||
public static class BackgroundActivityPrefs {
|
||||
private static SharedPreferences prefs;
|
||||
|
||||
public static long getLastCheckedBackgroundActivity() {
|
||||
return prefs.getLong("last_checked", 0);
|
||||
}
|
||||
|
||||
public static void setLastCheckedBackgroundActivity(long l) {
|
||||
prefs.edit().putLong("last_checked", l).apply();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue