Added debug feature for clear all sticks cache

This commit is contained in:
gdlbo
2022-04-27 20:15:47 +03:00
parent afc2a5b258
commit b089c7d7f9
2 changed files with 19 additions and 0 deletions
@@ -3,6 +3,7 @@ package ru.vtosters.lite.ui.fragments;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.preference.Preference;
import android.widget.Toast;
@@ -103,11 +104,25 @@ public class OtherFragment extends MaterialPreferenceToolbarFragment {
}
}
public class f implements Preference.c {
@Override // android.support.v7.preference.Preference.c
public boolean a(Preference preference) {
SharedPreferences prefs = Helper.GetContext().getSharedPreferences("stickers", Context.MODE_PRIVATE);
prefs.edit().clear().commit();
Helper.restarting();
return true;
}
f() {
}
}
private void prefs() {
a("firebasefix").a((Preference.c) new a());
a("applicationstop").a((Preference.c) new b());
a("tokencopy").a((Preference.c) new c());
a("applicationrestart").a((Preference.c) new d());
a("clearcache").a((Preference.c) new e());
a("stickfix").a((Preference.c) new f());
}
}
+4
View File
@@ -12,6 +12,10 @@
<Preference
android:key="tokencopy"
android:title="@string/copytokenbtn" />
<Preference
android:key="stickfix"
android:title="Очистить кэш стикеров"
android:summary="Исправление загрузки стикеров при их полном отсутствии" />
<Preference
android:key="applicationrestart"
android:title="@string/applicationrestart" />