Update to 7.3.0 (2195)

This commit is contained in:
DrKLO 2020-12-23 11:48:30 +04:00
parent 5a47056c7b
commit d52b2c921a
4526 changed files with 73002 additions and 104030 deletions

View file

@ -64,8 +64,11 @@ public class SharedConfig {
public static int lockRecordAudioVideoHint;
public static boolean searchMessagesAsListUsed;
public static boolean stickersReorderingHintUsed;
public static boolean disableVoiceAudioEffects;
private static int lastLocalId = -210000;
public static String storageCacheDir;
private static String passportConfigJson = "";
private static HashMap<String, String> passportConfigMap;
public static int passportConfigHash;
@ -182,6 +185,8 @@ public class SharedConfig {
editor.putInt("textSelectionHintShows", textSelectionHintShows);
editor.putInt("scheduledOrNoSoundHintShows", scheduledOrNoSoundHintShows);
editor.putInt("lockRecordAudioVideoHint", lockRecordAudioVideoHint);
editor.putBoolean("disableVoiceAudioEffects", disableVoiceAudioEffects);
editor.putString("storageCacheDir", !TextUtils.isEmpty(storageCacheDir) ? storageCacheDir : "");
editor.commit();
} catch (Exception e) {
FileLog.e(e);
@ -220,6 +225,7 @@ public class SharedConfig {
pushString = preferences.getString("pushString2", "");
passportConfigJson = preferences.getString("passportConfigJson", "");
passportConfigHash = preferences.getInt("passportConfigHash", 0);
storageCacheDir = preferences.getString("storageCacheDir", null);
String authKeyString = preferences.getString("pushAuthKey", null);
if (!TextUtils.isEmpty(authKeyString)) {
pushAuthKey = Base64.decode(authKeyString, Base64.DEFAULT);
@ -239,7 +245,6 @@ public class SharedConfig {
preferences = ApplicationLoader.applicationContext.getSharedPreferences("mainconfig", Activity.MODE_PRIVATE);
saveToGallery = preferences.getBoolean("save_gallery", false);
autoplayGifs = preferences.getBoolean("autoplay_gif", true);
chatBubbles = preferences.getBoolean("chatBubbles", Build.VERSION.SDK_INT >= 30);
autoplayVideo = preferences.getBoolean("autoplay_video", true);
mapPreviewType = preferences.getInt("mapPreviewType", 2);
raiseToSpeak = preferences.getBoolean("raise_to_speak", true);
@ -280,6 +285,7 @@ public class SharedConfig {
textSelectionHintShows = preferences.getInt("textSelectionHintShows", 0);
scheduledOrNoSoundHintShows = preferences.getInt("scheduledOrNoSoundHintShows", 0);
lockRecordAudioVideoHint = preferences.getInt("lockRecordAudioVideoHint", 0);
disableVoiceAudioEffects = preferences.getBoolean("disableVoiceAudioEffects", false);
preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE);
showNotificationsForAllAccounts = preferences.getBoolean("AllAccounts", true);
@ -527,6 +533,14 @@ public class SharedConfig {
});
}
public static void toggleDisableVoiceAudioEffects() {
disableVoiceAudioEffects = !disableVoiceAudioEffects;
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean("disableVoiceAudioEffects", disableVoiceAudioEffects);
editor.commit();
}
public static void toggleLoopStickers() {
loopStickers = !loopStickers;
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
@ -590,14 +604,6 @@ public class SharedConfig {
editor.commit();
}
public static void toggleChatBubbles() {
chatBubbles = !chatBubbles;
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean("chatBubbles", chatBubbles);
editor.commit();
}
public static void setUseThreeLinesLayout(boolean value) {
useThreeLinesLayout = value;
SharedPreferences preferences = MessagesController.getGlobalMainSettings();