1
0
mirror of https://github.com/NekoX-Dev/NekoX.git synced 2024-12-04 10:20:38 +01:00

Fix crash

This commit is contained in:
NekoInverter 2020-03-07 15:45:34 +08:00
parent f894de15d8
commit 31072e7095
No known key found for this signature in database
GPG Key ID: 280D6CCCF95715F9

View File

@ -1563,6 +1563,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
if (pressedBotButton != -1) {
BotButton button = botButtons.get(pressedBotButton);
Gson gson = new Gson();
if (button.button != null) {
if (!TextUtils.isEmpty(button.button.url)) {
AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
builder.setItems(new CharSequence[]{LocaleController.getString("Copy", R.string.Copy), LocaleController.getString("CopyLink", R.string.CopyLink), LocaleController.getString("CopyDetails", R.string.CopyDetails)}, (dialogInterface, i) -> {
@ -1611,6 +1612,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
});
builder.show();
}
}
pressedBotButton = -1;
invalidate();
}