Skip to content

Commit 77f4bda

Browse files
committed
fix: missing auto translate switcher
Signed-off-by: qwq233 <qwq233@qwq2333.top>
1 parent b52fc57 commit 77f4bda

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@
161161
import org.telegram.tgnet.SerializedData;
162162
import org.telegram.tgnet.TLObject;
163163
import org.telegram.tgnet.TLRPC;
164-
import org.telegram.tgnet.tl.TL_stories;
165164
import org.telegram.ui.ActionBar.ActionBar;
166165
import org.telegram.ui.ActionBar.ActionBarMenu;
167166
import org.telegram.ui.ActionBar.ActionBarMenuItem;
@@ -9624,10 +9623,12 @@ private void createActionBarMenu(boolean animated) {
96249623
}
96259624
if (ChatObject.isChannel(chat)) {
96269625
if (isTopic) {
9626+
createAutoTranslateItem(chatId, topicId);
96279627
if (ChatObject.canManageTopic(currentAccount, chat, topicId)) {
96289628
editItemVisible = true;
96299629
}
96309630
} else {
9631+
createAutoTranslateItem(chatId);
96319632
if ((ChatObject.hasAdminRights(chat) || chat.megagroup && ChatObject.canChangeChatInfo(chat)) || chat.megagroup) {
96329633
editItemVisible = true;
96339634
}
@@ -9839,7 +9840,7 @@ private void createAutoTranslateItem(long dialogId) {
98399840
createAutoTranslateItem(dialogId, 0);
98409841
}
98419842

9842-
private void createAutoTranslateItem(long dialogId, int topicId) {
9843+
private void createAutoTranslateItem(long dialogId, long topicId) {
98439844
var autoTranslatePopupWrapper = new AutoTranslatePopupWrapper(ProfileActivity.this, otherItem.getPopupLayout().getSwipeBack(), dialogId, topicId, getResourceProvider());
98449845
otherItem.addSwipeBackItem(R.drawable.msg_translate, null, LocaleController.getString("AutoTranslate", R.string.AutoTranslate), autoTranslatePopupWrapper.windowLayout);
98459846
otherItem.addColoredGap();

0 commit comments

Comments
 (0)