mirror of
https://github.com/NekoX-Dev/NekoX.git
synced 2025-01-22 12:10:04 +01:00
Fixes
This commit is contained in:
parent
2debb39e74
commit
e85a773906
@ -18945,6 +18945,47 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
icons.add(R.drawable.baseline_call_24);
|
||||
}
|
||||
}
|
||||
MessageObject messageObject = getMessageForTranslate();
|
||||
boolean docsWithMessages = false;
|
||||
if (selectedObjectGroup != null && selectedObjectGroup.isDocuments) {
|
||||
for (MessageObject object : selectedObjectGroup.messages) {
|
||||
if (StrUtil.isNotBlank(object.messageOwner.message)) {
|
||||
docsWithMessages = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (NekoConfig.showTranslate) {
|
||||
if (messageObject != null || docsWithMessages) {
|
||||
boolean td;
|
||||
if (messageObject != null) {
|
||||
td = messageObject.messageOwner.translated;
|
||||
} else {
|
||||
td = selectedObjectGroup.messages.get(0).messageOwner.translated;
|
||||
}
|
||||
items.add(td ? LocaleController.getString("UndoTranslate", R.string.UndoTranslate) : LocaleController.getString("Translate", R.string.Translate));
|
||||
options.add(88);
|
||||
icons.add(R.drawable.ic_translate);
|
||||
}
|
||||
}
|
||||
if (messageObject != null && StrUtil.isNotBlank(messageObject.messageOwner.message) && StrUtil.isNotBlank(NekoConfig.openPGPApp)) {
|
||||
if (PgpHelper.PGP_CLEARTEXT_SIGNATURE.matcher(selectedObject.messageOwner.message).matches()) {
|
||||
items.add(LocaleController.getString("PGPVerify", R.string.PGPVerify));
|
||||
options.add(200);
|
||||
icons.add(R.drawable.baseline_vpn_key_24);
|
||||
} else if (PgpHelper.PGP_MESSAGE.matcher(selectedObject.messageOwner.message).matches()) {
|
||||
items.add(LocaleController.getString("PGPDecrypt", R.string.PGPDecrypt));
|
||||
options.add(201);
|
||||
icons.add(R.drawable.baseline_vpn_key_24);
|
||||
} else if (PgpHelper.PGP_PRIVATE_KEY.matcher(selectedObject.messageOwner.message).matches()) {
|
||||
items.add(LocaleController.getString("PGPImportPrivate", R.string.PGPImportPrivate));
|
||||
options.add(202);
|
||||
icons.add(R.drawable.baseline_vpn_key_24);
|
||||
} else if (PgpHelper.PGP_PUBLIC_KEY.matcher(selectedObject.messageOwner.message).matches()) {
|
||||
items.add(LocaleController.getString("PGPImport", R.string.PGPImport));
|
||||
options.add(203);
|
||||
icons.add(R.drawable.baseline_vpn_key_24);
|
||||
}
|
||||
}
|
||||
items.add(LocaleController.getString("Delete", R.string.Delete));
|
||||
options.add(1);
|
||||
icons.add(R.drawable.baseline_delete_24);
|
||||
@ -20400,10 +20441,13 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
if (dids.size() > 1 || dids.get(0) == getUserConfig().getClientUserId() || message != null) {
|
||||
for (int a = 0; a < dids.size(); a++) {
|
||||
long did = dids.get(a);
|
||||
if (message != null) {
|
||||
if (message != null && !NekoConfig.sendCommentAfterForward) {
|
||||
getSendMessagesHelper().sendMessage(message.toString(), did, null, null, null, true, null, null, null, true, 0);
|
||||
}
|
||||
forwardMessages(fmessages, noForwardQuote, true, 0, did);
|
||||
if (message != null && NekoConfig.sendCommentAfterForward) {
|
||||
getSendMessagesHelper().sendMessage(message.toString(), did, null, null, null, true, null, null, null, true, 0);
|
||||
}
|
||||
}
|
||||
fragment.finishFragment();
|
||||
if (dids.size() == 1) {
|
||||
|
@ -2965,7 +2965,6 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
||||
menuPopupWindow.dismiss();
|
||||
}
|
||||
signComment(true);
|
||||
|
||||
});
|
||||
cell.setOnLongClickListener(v -> {
|
||||
if (menuPopupWindow != null && menuPopupWindow.isShowing()) {
|
||||
@ -3256,7 +3255,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
||||
|
||||
Intent intent = new Intent();
|
||||
|
||||
if (NekoConfig.openPGPKeyId > 0L && save)
|
||||
if (NekoConfig.openPGPKeyId != 0L && save)
|
||||
intent.putExtra(OpenPgpApi.EXTRA_SIGN_KEY_ID, NekoConfig.openPGPKeyId);
|
||||
|
||||
signComment(intent, save);
|
||||
|
@ -356,7 +356,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
||||
private boolean canDeletePsaSelected;
|
||||
|
||||
private int topPadding;
|
||||
private int lastMeasuredTopPadding;
|
||||
private int lastMeasuredTopPadding;
|
||||
private int folderId;
|
||||
|
||||
private final static int pin = 100;
|
||||
@ -609,7 +609,7 @@ private int lastMeasuredTopPadding;
|
||||
}
|
||||
tabsYOffset = 0;
|
||||
if (filtersTabAnimator != null && filterTabsView != null && filterTabsView.getVisibility() == View.VISIBLE) {
|
||||
tabsYOffset = - (1f - filterTabsProgress) * filterTabsView.getMeasuredHeight();
|
||||
tabsYOffset = -(1f - filterTabsProgress) * filterTabsView.getMeasuredHeight();
|
||||
filterTabsView.setTranslationY(actionBar.getTranslationY() + tabsYOffset);
|
||||
filterTabsView.setAlpha(filterTabsProgress);
|
||||
viewPages[0].setTranslationY(-(1f - filterTabsProgress) * filterTabsMoveFrom);
|
||||
@ -1924,7 +1924,7 @@ private int lastMeasuredTopPadding;
|
||||
searchViewPager.removeSearchFilter(filterData);
|
||||
searchViewPager.onTextChanged(searchItem.getSearchField().getText().toString());
|
||||
|
||||
updateFiltersView(true, null, null,true);
|
||||
updateFiltersView(true, null, null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -2031,7 +2031,7 @@ private int lastMeasuredTopPadding;
|
||||
// }
|
||||
getMessagesController().removeFilter(dialogFilter);
|
||||
getMessagesStorage().deleteDialogFilter(dialogFilter);
|
||||
// filterTabsView.commitCrossfade();
|
||||
// filterTabsView.commitCrossfade();
|
||||
});
|
||||
AlertDialog alertDialog = builder.create();
|
||||
showDialog(alertDialog);
|
||||
@ -2219,7 +2219,7 @@ private int lastMeasuredTopPadding;
|
||||
filterTabsView.setIsEditing(true);
|
||||
showDoneItem(true);
|
||||
} else if (i == 1) {
|
||||
if (N == 2) {
|
||||
if (N == 3) {
|
||||
presentFragment(new FiltersSetupActivity());
|
||||
} else {
|
||||
presentFragment(new FilterCreateActivity(dialogFilter));
|
||||
@ -2227,7 +2227,17 @@ private int lastMeasuredTopPadding;
|
||||
} else if (i == 2) {
|
||||
showDeleteAlert(dialogFilter);
|
||||
} else {
|
||||
getMessagesStorage().readAllDialogs(tabView.getId());
|
||||
if (dialogFilter == null) {
|
||||
int folderId = tabView.getId() == Integer.MAX_VALUE ? -1 : -1;
|
||||
getMessagesStorage().readAllDialogs(folderId);
|
||||
} else {
|
||||
for (TLRPC.Dialog dialog : dialogFilter.dialogs) {
|
||||
if (dialog.unread_count == 0 && dialog.unread_mentions_count == 0)
|
||||
continue;
|
||||
getMessagesController().markDialogAsRead(dialog.id, dialog.top_message, dialog.top_message, dialog.last_message_date, false, 0, dialog.unread_count, true, 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (scrimPopupWindow != null) {
|
||||
scrimPopupWindow.dismiss();
|
||||
@ -4032,7 +4042,7 @@ private int lastMeasuredTopPadding;
|
||||
editText.setHintTextColor(Theme.getColor(Theme.key_actionBarDefaultSearchPlaceholder));
|
||||
editText.setTextColor(Theme.getColor(Theme.key_actionBarDefaultSearch));
|
||||
}
|
||||
searchViewPager.setKeyboardHeight(((ContentView)fragmentView).getKeyboardHeight());
|
||||
searchViewPager.setKeyboardHeight(((ContentView) fragmentView).getKeyboardHeight());
|
||||
parentLayout.getDrawerLayoutContainer().setAllowOpenDrawerBySwipe(true);
|
||||
} else {
|
||||
if (filterTabsView != null) {
|
||||
@ -4052,7 +4062,7 @@ private int lastMeasuredTopPadding;
|
||||
if (show) {
|
||||
searchViewPager.setVisibility(View.VISIBLE);
|
||||
searchViewPager.reset();
|
||||
updateFiltersView(true, null, null,false);
|
||||
updateFiltersView(true, null, null, false);
|
||||
if (searchTabsView != null) {
|
||||
searchTabsView.hide(false, false);
|
||||
searchTabsView.setVisibility(View.VISIBLE);
|
||||
@ -6065,6 +6075,7 @@ private int lastMeasuredTopPadding;
|
||||
}
|
||||
|
||||
private String showingSuggestion;
|
||||
|
||||
private void showNextSupportedSuggestion() {
|
||||
if (showingSuggestion != null) {
|
||||
return;
|
||||
|
@ -4100,17 +4100,25 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
||||
});
|
||||
|
||||
ActionBarMenu menu = actionBar.createMenu();
|
||||
|
||||
masksItem = menu.addItem(gallery_menu_masks, R.drawable.deproko_baseline_masks_24);
|
||||
masksItem.setContentDescription(LocaleController.getString("Masks", R.string.Masks));
|
||||
masksItem.setIconColor(Theme.getColor(Theme.key_actionBarDefaultIcon));
|
||||
|
||||
pipItem = menu.addItem(gallery_menu_pip, R.drawable.ic_goinline);
|
||||
pipItem.setContentDescription(LocaleController.getString("AccDescrPipMode", R.string.AccDescrPipMode));
|
||||
pipItem.setIconColor(Theme.getColor(Theme.key_actionBarDefaultIcon));
|
||||
|
||||
sendNoQuoteItem = menu.addItem(gallery_menu_send_noquote, R.drawable.baseline_forward_24);
|
||||
sendNoQuoteItem.setContentDescription(LocaleController.getString("NoQuoteForward", R.string.Forward));
|
||||
sendNoQuoteItem.setIconColor(Theme.getColor(Theme.key_actionBarDefaultIcon));
|
||||
|
||||
sendItem = menu.addItem(gallery_menu_send, R.drawable.baseline_forward_24);
|
||||
sendItem.setContentDescription(LocaleController.getString("Forward", R.string.Forward));
|
||||
sendItem.setIconColor(Theme.getColor(Theme.key_actionBarDefaultIcon));
|
||||
|
||||
shareItem = menu.addItem(gallery_menu_share2, R.drawable.share);
|
||||
shareItem.setContentDescription(LocaleController.getString("ShareFile", R.string.ShareFile));
|
||||
shareItem.setIconColor(Theme.getColor(Theme.key_actionBarDefaultIcon));
|
||||
|
||||
menuItem = menu.addItem(0, R.drawable.ic_ab_other);
|
||||
menuItem.addSubItem(gallery_menu_openin, R.drawable.baseline_open_in_browser_24, LocaleController.getString("OpenInExternalApp", R.string.OpenInExternalApp)).setColors(0xfffafafa, 0xfffafafa);
|
||||
|
Loading…
x
Reference in New Issue
Block a user