1
0
mirror of https://github.com/NekoX-Dev/NekoX.git synced 2024-11-22 17:45:23 +01:00

fix telegram translate crash on polls

This commit is contained in:
luvletter2333 2023-03-16 05:20:43 +08:00
parent 1e59e4e335
commit 733feb011e
No known key found for this signature in database
GPG Key ID: 9EB7723F3A0ACF92

View File

@ -32078,7 +32078,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
break;
}
case nkbtn_translate: {
if (NekoConfig.useTelegramTranslateInChat.Bool()) {
if (NekoConfig.useTelegramTranslateInChat.Bool() && !selectedObject.isPoll()) {
String toLang = LocaleController.getInstance().getCurrentLocale().getLanguage();
int[] messageIdToTranslate = new int[] { selectedObject.getId() };
final CharSequence finalMessageText = getMessageCaption(selectedObject, selectedObjectGroup, messageIdToTranslate);