Fix "Translator enabled by default"

This commit is contained in:
Ivan K
2022-04-17 15:15:52 +03:00
parent 017cfdf5cc
commit 60a36d24c0
3 changed files with 3 additions and 3 deletions

View File

@@ -3685,7 +3685,7 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
textSelectionHelper = new TextSelectionHelper.ArticleTextSelectionHelper();
textSelectionHelper.setParentView(listView[0]);
if (MessagesController.getGlobalMainSettings().getBoolean("translate_button", false)) {
if (MessagesController.getGlobalMainSettings().getBoolean("translate_button", true)) {
textSelectionHelper.setOnTranslate((text, fromLang, toLang, onAlertDismiss) -> {
TranslateAlert.showAlert(parentActivity, parentFragment, fromLang, toLang, text, false, null, onAlertDismiss);
});

View File

@@ -22057,7 +22057,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
popupLayout.getSwipeBack().setOnClickListener(e -> closeMenu());
}
final boolean translateButtonEnabled = MessagesController.getGlobalMainSettings().getBoolean("translate_button", false);
final boolean translateButtonEnabled = MessagesController.getGlobalMainSettings().getBoolean("translate_button", true);
scrimPopupWindowItems = new ActionBarMenuSubItem[items.size() + (selectedObject.isSponsored() ? 1 : 0)];
for (int a = 0, N = items.size(); a < N; a++) {
if (a == 0 && selectedObject.isSponsored()) {

View File

@@ -430,7 +430,7 @@ public class LanguageSelectActivity extends BaseFragment implements Notification
value
);
showButtonCheck.setOnClickListener(e -> {
preferences.edit().putBoolean("translate_button", !getValue()).apply();
preferences.edit().putBoolean("translate_button", true);
});
addView(showButtonCheck, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));