|
161 | 161 | import org.telegram.tgnet.SerializedData;
|
162 | 162 | import org.telegram.tgnet.TLObject;
|
163 | 163 | import org.telegram.tgnet.TLRPC;
|
164 |
| -import org.telegram.tgnet.tl.TL_stories; |
165 | 164 | import org.telegram.ui.ActionBar.ActionBar;
|
166 | 165 | import org.telegram.ui.ActionBar.ActionBarMenu;
|
167 | 166 | import org.telegram.ui.ActionBar.ActionBarMenuItem;
|
@@ -9624,10 +9623,12 @@ private void createActionBarMenu(boolean animated) {
|
9624 | 9623 | }
|
9625 | 9624 | if (ChatObject.isChannel(chat)) {
|
9626 | 9625 | if (isTopic) {
|
| 9626 | + createAutoTranslateItem(chatId, topicId); |
9627 | 9627 | if (ChatObject.canManageTopic(currentAccount, chat, topicId)) {
|
9628 | 9628 | editItemVisible = true;
|
9629 | 9629 | }
|
9630 | 9630 | } else {
|
| 9631 | + createAutoTranslateItem(chatId); |
9631 | 9632 | if ((ChatObject.hasAdminRights(chat) || chat.megagroup && ChatObject.canChangeChatInfo(chat)) || chat.megagroup) {
|
9632 | 9633 | editItemVisible = true;
|
9633 | 9634 | }
|
@@ -9839,7 +9840,7 @@ private void createAutoTranslateItem(long dialogId) {
|
9839 | 9840 | createAutoTranslateItem(dialogId, 0);
|
9840 | 9841 | }
|
9841 | 9842 |
|
9842 |
| - private void createAutoTranslateItem(long dialogId, int topicId) { |
| 9843 | + private void createAutoTranslateItem(long dialogId, long topicId) { |
9843 | 9844 | var autoTranslatePopupWrapper = new AutoTranslatePopupWrapper(ProfileActivity.this, otherItem.getPopupLayout().getSwipeBack(), dialogId, topicId, getResourceProvider());
|
9844 | 9845 | otherItem.addSwipeBackItem(R.drawable.msg_translate, null, LocaleController.getString("AutoTranslate", R.string.AutoTranslate), autoTranslatePopupWrapper.windowLayout);
|
9845 | 9846 | otherItem.addColoredGap();
|
|
0 commit comments