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 edit comment view text is being empty #897

Merged
merged 2 commits into from
Jun 28, 2023
Merged

Conversation

MV-GH
Copy link
Collaborator

@MV-GH MV-GH commented Jun 28, 2023

Fixes the edit comment view being empty

It was composed first before the initialize was called which sets the commentView. Causing it to set the remember with empty text. I changed the remember to change when commentView changes. Not sure if it is normal that it compose before initialize fires. @nahwneeth ?

Fixes #895

studio64_WiCPugC9g7.mp4

@nahwneeth
Copy link
Contributor

nahwneeth commented Jun 28, 2023

Yeah I must have forgotten or lost in merge conflict ig. One suggestion: the commentView to be edited is passed to the composable / activity. That could be used directly instead of reading from the viewmodel. The launched effect won't be needed then. The rememberSaveable can be used without a key.

@MV-GH
Copy link
Collaborator Author

MV-GH commented Jun 28, 2023

Yeah that worked too. Kinda do feel like that Viewmodel isnt even needed there

@twizmwazin twizmwazin merged commit aaad47c into LemmyNet:main Jun 28, 2023
@MV-GH MV-GH deleted the bug/895 branch September 20, 2023 15:56
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.

CommentEditActivity: content is empty
3 participants