mirror of https://github.com/NekoX-Dev/NekoX.git
Fix cursor
This commit is contained in:
parent
d69ea8934f
commit
abb802f8bc
|
@ -1041,6 +1041,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||
private final static int translate = 101;
|
||||
private final static int show_pinned = 102;
|
||||
private final static int share_key = 103;
|
||||
private final static int reply = 104;
|
||||
|
||||
private final static int bot_help = 30;
|
||||
private final static int bot_settings = 31;
|
||||
|
@ -1761,6 +1762,20 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||
finishFragment();
|
||||
}
|
||||
}
|
||||
} else if (id == reply) {
|
||||
MessageObject messageObject = null;
|
||||
for (int a = 1; a >= 0; a--) {
|
||||
if (messageObject == null && selectedMessagesIds[a].size() != 0) {
|
||||
messageObject = messagesDict[a].get(selectedMessagesIds[a].keyAt(0));
|
||||
}
|
||||
selectedMessagesIds[a].clear();
|
||||
selectedMessagesCanCopyIds[a].clear();
|
||||
selectedMessagesCanStarIds[a].clear();
|
||||
}
|
||||
hideActionMode();
|
||||
if (messageObject != null && (messageObject.messageOwner.id > 0 || messageObject.messageOwner.id < 0 && currentEncryptedChat != null)) {
|
||||
showFieldPanelForReply(messageObject);
|
||||
}
|
||||
} else if (id == copy) {
|
||||
String str = "";
|
||||
int previousUid = 0;
|
||||
|
@ -2371,6 +2386,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||
actionMode.addView(selectedMessagesCountTextView, LayoutHelper.createLinear(0, LayoutHelper.MATCH_PARENT, 1.0f, 65, 0, 0, 0));
|
||||
selectedMessagesCountTextView.setOnTouchListener((v, event) -> true);
|
||||
|
||||
actionModeViews.add(actionMode.addItemWithWidth(reply, R.drawable.baseline_reply_24, AndroidUtilities.dp(54), LocaleController.getString("Reply", R.string.Reply)));
|
||||
actionModeViews.add(actionMode.addItemWithWidth(edit, R.drawable.baseline_edit_24, AndroidUtilities.dp(54), LocaleController.getString("Edit", R.string.Edit)));
|
||||
actionModeViews.add(actionMode.addItemWithWidth(select_between, R.drawable.ic_select_between, AndroidUtilities.dp(54), LocaleController.getString("SelectBetween", R.string.SelectBetween)));
|
||||
actionModeViews.add(actionMode.addItemWithWidth(copy, R.drawable.baseline_content_copy_24, AndroidUtilities.dp(54), LocaleController.getString("Copy", R.string.Copy)));
|
||||
|
@ -2383,13 +2399,14 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||
actionModeViews.add(actionModeOtherItem = actionMode.addItemWithWidth(action_mode_other, R.drawable.ic_ab_other, AndroidUtilities.dp(54), LocaleController.getString("MessageMenu", R.string.MessageMenu)));
|
||||
|
||||
if (currentEncryptedChat == null || NekoXConfig.disableFlagSecure) {
|
||||
actionModeOtherItem.addSubItem(forward_noquote, R.drawable.msg_forward_noquote, LocaleController.getString("NoQuoteForward", R.string.NoQuoteForward));
|
||||
actionModeOtherItem.addSubItem(forward_noquote, R.drawable.baseline_forward_24, LocaleController.getString("NoQuoteForward", R.string.NoQuoteForward));
|
||||
actionModeOtherItem.addSubItem(star, R.drawable.baseline_favorite_20, LocaleController.getString("AddToFavorites", R.string.AddToFavorites));
|
||||
actionModeOtherItem.addSubItem(save_to, R.drawable.msg_download, LocaleController.getString("SaveToMusic", R.string.SaveToMusic));
|
||||
}
|
||||
|
||||
actionModeOtherItem.addSubItem(translate, R.drawable.ic_translate, LocaleController.getString("Translate", R.string.Translate));
|
||||
|
||||
actionMode.getItem(reply).setVisibility(ChatObject.canSendMessages(currentChat) && selectedMessagesIds[0].size() + selectedMessagesIds[1].size() == 1 ? View.VISIBLE : View.GONE);
|
||||
actionMode.getItem(edit).setVisibility(canEditMessagesCount == 1 && selectedMessagesIds[0].size() + selectedMessagesIds[1].size() == 1 ? View.VISIBLE : View.GONE);
|
||||
actionMode.getItem(copy).setVisibility(selectedMessagesCanCopyIds[0].size() + selectedMessagesCanCopyIds[1].size() != 0 ? View.VISIBLE : View.GONE);
|
||||
actionMode.getItem(delete).setVisibility(cantDeleteMessagesCount == 0 ? View.VISIBLE : View.GONE);
|
||||
|
@ -5955,7 +5972,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||
bottomMessagesActionContainer.setVisibility(View.INVISIBLE);
|
||||
bottomMessagesActionContainer.setWillNotDraw(false);
|
||||
bottomMessagesActionContainer.setPadding(0, AndroidUtilities.dp(2), 0, 0);
|
||||
contentView.addView(bottomMessagesActionContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 51, Gravity.BOTTOM));
|
||||
// contentView.addView(bottomMessagesActionContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 51, Gravity.BOTTOM));
|
||||
bottomMessagesActionContainer.setOnTouchListener((v, event) -> true);
|
||||
|
||||
chatActivityEnterView = new ChatActivityEnterView(getParentActivity(), contentView, this, true) {
|
||||
|
@ -11422,6 +11439,11 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||
hideActionMode();
|
||||
updatePinnedMessageView(true);
|
||||
} else {
|
||||
ActionBarMenuItem replyItem = actionBar.createActionMode().getItem(reply);
|
||||
if (replyItem != null) {
|
||||
replyItem.setVisibility(ChatObject.canSendMessages(currentChat) &&
|
||||
selectedMessagesIds[0].size() + selectedMessagesIds[1].size() == 1 ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
ActionBarMenuItem copyItem = actionBar.createActionMode().getItem(copy);
|
||||
ActionBarMenuItem editItem = actionBar.createActionMode().getItem(edit);
|
||||
ActionBarMenuItem forwardItem = actionBar.createActionMode().getItem(forward);
|
||||
|
@ -11646,7 +11668,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||
}
|
||||
}
|
||||
|
||||
actionModeOtherItem.setSubItemVisibility(translate, selectedMessagesCanCopyIds[0].size() + selectedMessagesCanCopyIds[1].size() > 1);
|
||||
actionModeOtherItem.setSubItemVisibility(translate, selectedMessagesCanCopyIds[0].size() + selectedMessagesCanCopyIds[1].size() > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -18984,9 +19006,6 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||
if (undoView != null) {
|
||||
undoView.hide(true, 1);
|
||||
}
|
||||
if (chatActivityEnterView != null) {
|
||||
chatActivityEnterView.getEditField().setAllowDrawCursor(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1768,13 +1768,13 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
/*@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
if (preventInput) {
|
||||
return false;
|
||||
}
|
||||
return super.dispatchKeyEvent(event);
|
||||
}
|
||||
}*/
|
||||
|
||||
@Override
|
||||
protected void onSelectionChanged(int selStart, int selEnd) {
|
||||
|
|
|
@ -26,7 +26,6 @@ object SubManager {
|
|||
enable = public?.enable ?: true
|
||||
|
||||
urls = listOf(
|
||||
"https://gitlab.com/NekohaSekai/nekox-proxy-list/-/raw/master/proxy_list",
|
||||
"https://nekox-dev.github.io/ProxyList/proxy_list",
|
||||
"https://gitee.com/nekoshizuku/AwesomeRepo/raw/master/proxy_list"
|
||||
)
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
cat > local.properties << EOF
|
||||
ndk.dir=$NDK
|
||||
EOF
|
Loading…
Reference in New Issue