Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

fix #5773
First of all:
The app is doing way too much work on the main thread and this needs to be investigated in general. The problem described here has certainly only caused the barrel to overflow.
The problem:
I realized that the app is freezing when pinning messages.
As i wont have more time today, could you please take over if possible @rapterjet2004 ?
I debugged and found out this is happening because of
ComposeChatAdapter().GetComposableForMessage(message)in PinnedMessage.kt
Initializing a class like ComposeChatAdapter in a Composable is not a good idea. It does way too much work incl injections.
The log even shows needless repeating calls to
/ocs/v2.php/core/autocomplete/getwhen this is initialized.
I replaced it with a plain Text composable for now which seems to fix the freeze (please test and confirm!).
Spoiler:
I already realized that the ComposeChatAdapter is a problem in the last days and i modify/delete it in #5635
So there is no need to come up with a perfect solution but it should be good enough until #5635 is merged (which will not be for v23.0).
So as we need to release 23.0RC1 (postponed to tomorrow i guess) we need a lightweight Composable that does no heavy work behind the scenes. Just the messages text and author name and and maybe avatar is fine i think.
Best will be: Do the heavy work elsewhere and pass the ready to use data into the Composable, also inside ChatActivity might be fine.
🏁 Checklist
/backport to stable-xx.x