some imp
This commit is contained in:
@@ -102,8 +102,9 @@ public class DNRInjector {
|
||||
public static boolean onClickMsg(Context context, MsgAction action, Msg msg) {
|
||||
var text = ((MsgFromUser) msg).f();
|
||||
|
||||
if (action == MsgAction.valueOf("TRANSLATE") && text != null) {
|
||||
Translate.showTranslatedText(context, text);
|
||||
if (action == MsgAction.valueOf("TRANSLATE")) {
|
||||
if (text.isEmpty() || text.equals(" ")) sendToast("Невозможно перевести этот текст");
|
||||
else Translate.showTranslatedText(context, text);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -4,6 +4,7 @@ import static ru.vtosters.lite.ui.dialogs.MessageSettings.argDialog;
|
||||
import static ru.vtosters.lite.ui.dialogs.MessageSettings.bombCount;
|
||||
import static ru.vtosters.lite.ui.dialogs.MessageSettings.isSilentEnabled;
|
||||
import static ru.vtosters.lite.utils.Preferences.getBoolValue;
|
||||
import static ru.vtosters.lite.utils.Preferences.savemsgsett;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
@@ -31,10 +32,12 @@ public class MessagesHook {
|
||||
|
||||
if (time > 0) {
|
||||
req.a("expire_ttl", time);
|
||||
if (!savemsgsett()) bombCount = "0";
|
||||
}
|
||||
|
||||
if (isSilentEnabled) {
|
||||
req.a("silent", 1);
|
||||
if (!savemsgsett()) isSilentEnabled = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -189,6 +189,10 @@ public class Preferences {
|
||||
return getBoolValue("miniapps", true);
|
||||
}
|
||||
|
||||
public static boolean savemsgsett() {
|
||||
return getBoolValue("savemsgsett", false);
|
||||
}
|
||||
|
||||
public static boolean friendsblock() {
|
||||
return getBoolValue("friendsblock", false);
|
||||
}
|
||||
|
||||
@@ -105,6 +105,11 @@
|
||||
android:title="Глобальный обход онлайна" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="@string/privacy_vtl">
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="savemsgsett"
|
||||
android:summary="Сохранять положение тумблеров в настройках сообщений"
|
||||
android:title="Сохранять настройки сообщений" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="screenshotdetect"
|
||||
|
||||
Reference in New Issue
Block a user