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

Update subscribed communities in sidebar when user subscribes #948

Conversation

twizmwazin
Copy link
Contributor

No description provided.

@twizmwazin twizmwazin requested a review from dessalines as a code owner July 2, 2023 05:57
@@ -144,6 +145,8 @@ class CommunityViewModel : ViewModel(), Initializable {

else -> {}
}

onComplete()
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would only do it on Success, there is no point on updating if the following has failed

@@ -234,6 +235,13 @@ fun CommunityActivity(
follow = cfv.subscribed == SubscribedType.NotSubscribed,
auth = acct.jwt,
),
onComplete = {
Copy link
Member

Choose a reason for hiding this comment

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

Nice, this is simple enough and works.

@twizmwazin twizmwazin merged commit 655940e into LemmyNet:main Jul 4, 2023
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