cheogram-android

created pr with cheogram-android/jump-to-parent.1 on 2026-11-07T18:27:56Z · by 9e834e0d
commented on 2026-11-09T15:13:46Z · by 3c31bc8c
lgtm
cmds
checkout latest patchset:
ssh pr.pico.sh pull cheogram-android:jump-to-parent | git am -3
checkout specific patchset revision:
ssh pr.pico.sh pull cheogram-android:jump-to-parent [rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh cheogram-android:jump-to-parent
add comment to patch request:
ssh pr.pico.sh comment cheogram-android:jump-to-parent "lgtm!"

Patchset cheogram-android/jump-to-parent.1 on 2026-11-07T18:27:56Z · commit 66214c3

Fix jump to reply parent
Stephen Paul Weber 2026-11-07T18:26:56Z
Semantic diff summary
0 added, 0 modified, 0 signature changed, 0 removed across 0 analyzed files (2 files skipped: unsupported file type)
+15 -3 src/main/java/eu/siacs/conversations/ui/ConversationFragment.java #
......@@ -1888,6 +1888,19 @@ public class ConversationFragment extends XmppFragment
18881888 }
18891889
18901890
1891+ public void jumpToMessage(final String uuid) {
1892+ if (uuid == null || binding == null) {
1893+ return;
1894+ }
1895+ final Runnable postSelectionRunnable = () -> highlightMessage(uuid);
1896+ updateSelection(
1897+ uuid,
1898+ binding.messagesView.getHeight() / 2,
1899+ postSelectionRunnable,
1900+ false,
1901+ false);
1902+ }
1903+
18911904 private void highlightMessage(String uuid) {
18921905 binding.messagesView.postDelayed(() -> {
18931906 int actualIndex = getIndexOfExtended(uuid, messageList);
......@@ -4064,10 +4077,9 @@ public class ConversationFragment extends XmppFragment
40644077 conversation.startCommand(commandFor(Jid.of("cheogram.com/CHEOGRAM%jabber:iq:register"), "jabber:iq:register"), requireXmppActivity().xmppConnectionService);
40654078 }
40664079 }
4067- String messageUuid = extras.getString(ConversationsActivity.EXTRA_MESSAGE_UUID);
4080+ final String messageUuid = extras.getString(ConversationsActivity.EXTRA_MESSAGE_UUID);
40684081 if (messageUuid != null) {
4069- Runnable postSelectionRunnable = () -> highlightMessage(messageUuid);
4070- updateSelection(messageUuid, binding.messagesView.getHeight() / 2, postSelectionRunnable, false, false);
4082+ jumpToMessage(messageUuid);
40714083 }
40724084 }
40734085
+1 -10 src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java #
......@@ -1567,16 +1567,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
15671567 final var replyToClickListener = (View.OnClickListener) (v) -> {
15681568 final Message inReplyTo = message.getInReplyTo();
15691569 if (inReplyTo == null || inReplyTo.getUuid() == null) return;
1570- final var replyConversation = mConversationFragment.getConversation();
1571- activity.xmppConnectionService.jumpToMessage(replyConversation, inReplyTo.getUuid(), new XmppConnectionService.JumpToMessageListener() {
1572- @Override
1573- public void onSuccess() {
1574- activity.runOnUiThread(() -> mConversationFragment.refresh());
1575- }
1576-
1577- @Override
1578- public void onNotFound() {}
1579- });
1570+ mConversationFragment.jumpToMessage(inReplyTo.getUuid());
15801571 };
15811572 viewHolder.inReplyTo().setOnClickListener(replyToClickListener);
15821573 viewHolder.inReplyToQuote().setOnClickListener(replyToClickListener);
Back to top