Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scroll to quoted message #568

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mbarashkov
Copy link
Contributor

This pull request fixes issue #566 by calculating the proper index of message that we want to go to, substracting number of additional album-contained messages from it.

@jgibbon
Copy link
Collaborator

jgibbon commented May 18, 2024

Hi @mbarashkov, thanks for the PR!

It may be easier to just ask the proxy model for the id without any c++ changes, because that is the model for chatView:

            var proxyIndex = chatProxyModel.mapRowFromSource(index, -1);
            if(proxyIndex !== -1) {
                chatPage.messageIdToScrollTo = "";
                chatView.scrollToIndex(proxyIndex);
                navigatedTo(proxyIndex);
            }

Or did you try that and it didn't work?

cheers

@mbarashkov
Copy link
Contributor Author

@jgibbon
I just tried it, and mapRowFromSource doesn't seem to work correctly in a very simple test.
Actually this method just infinitely loops.

@jgibbon
Copy link
Collaborator

jgibbon commented May 18, 2024

Hm, weird.
If I'm not mistaken that should be exactly what it's intended for – in that case there could be another bug… I'll have another look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants