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

Add markdown preview #1002

Merged
merged 12 commits into from
Jul 10, 2023
Merged

Add markdown preview #1002

merged 12 commits into from
Jul 10, 2023

Conversation

MV-GH
Copy link
Collaborator

@MV-GH MV-GH commented Jul 9, 2023

I fixed up #734

studio64_N3gFaKgmLL

It has one slight issue that i have been unable to fix after many attempts. If it is a dealbreaker someone else will have to solve this. Basically texts longer than 5 lines are "scrollable". They don't get truncated to 5 lines. But you can only scroll them using links. Maybe if you disable linkmovementmethod you can solve that. But it doesn't solve the root problem that it doesn't actually truncate the long text.

studio64_zKQUktAuNv.mp4

This doesn't seem to do anything but where attempts for possible fix. I kept them to highlight some things I have tried. Can be removed.

            layoutParams = LinearLayout.LayoutParams(MATCH_PARENT, WRAP_CONTENT)
            this.movementMethod = null
            this.linksClickable = false
            ellipsize = TextUtils.TruncateAt.END
            focusable = NOT_FOCUSABLE

Copy link
Member

@dessalines dessalines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it works great. Thx!

@dessalines dessalines enabled auto-merge (squash) July 10, 2023 20:34
@dessalines dessalines disabled auto-merge July 10, 2023 20:41
@dessalines dessalines merged commit 59a5cbb into LemmyNet:main Jul 10, 2023
@MV-GH MV-GH deleted the feat/md_body_preview branch July 10, 2023 21:43
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.

3 participants