Skip to content
This repository was archived by the owner on May 23, 2025. It is now read-only.

Conversation

@connyduck
Copy link
Collaborator

@connyduck connyduck commented Apr 28, 2025

A better version for confirming boosts, because there is space for describing what the privacy options do.
This was quite difficult to get into the StatusBaseViewHolder, I had to add a callback that plays the button animation which is very hacky. It seems to work fine but I'm a bit worried about weird effects when the view holder gets recycled.
I found a better way to do it without callback and without leaking views.

@connyduck connyduck requested review from Tak and charlag April 28, 2025 19:52
Copy link
Collaborator

@Tak Tak left a comment

Choose a reason for hiding this comment

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

Looks reasonable, I'll try it out


if (favourite) {
confirmFavourite(preferences) {
viewModel.favorite(true, status)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We really can't decide between favorite and favourite, huh

val status = adapter?.peek(position)?.asStatusOrNull() ?: return

if (favourite) {
confirmReblog(preferences) { visibility ->
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be confirmFavorite, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, thank you!

viewModel.favorite(favourite, status)

if (favourite) {
confirmReblog(preferences) { visibility ->
Copy link
Collaborator

Choose a reason for hiding this comment

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

and here

<string name="reblog_privacy_followers_only_description">Only your followers can see your boost</string>

<string name="reblog_confirm">Boost this post?</string>
<string name="favourite_confirm">Favourite this post?</string>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the base strings file uk english (favourite) or us english (favorite)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is US, I'll change it to favorite

@connyduck connyduck requested a review from Tak April 29, 2025 19:22
@connyduck connyduck merged commit 2dc1f3f into develop Apr 30, 2025
1 check passed
@connyduck connyduck deleted the confirmation-bottomsheet branch April 30, 2025 17:23
connyduck added a commit that referenced this pull request May 17, 2025
It is not necessary because the settings are read when the buttons are
clicked since #5084
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants