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 blocks screen #1545

Merged
merged 4 commits into from
Jun 13, 2024
Merged

Conversation

MV-GH
Copy link
Collaborator

@MV-GH MV-GH commented Jun 10, 2024

Thanks @rodrigo-fm , I have largely based this PR from yours.

XveWT9Tlws.mp4

@MV-GH MV-GH requested a review from dessalines as a code owner June 10, 2024 02:37
@rodrigo-fm
Copy link
Contributor

I ran the app and blocked one community and one user. Then I navigated to the BlocksActivity, but I couldn't see the user and the community I blocked, I had to drag the screen to trigger the reload, only then the screen showed the user and the community I blocked.

I think you can run the update event when the user opens the BlocksActivity to avoid the need to drag the screen to update. Other solution is to update the blocked users/community/instance lists when a block occurs. I think I used the first solution when I worked on this.

@rodrigo-fm
Copy link
Contributor

Btw thank you very much for continuing the blocks screen work! :)

@MV-GH
Copy link
Collaborator Author

MV-GH commented Jun 10, 2024

I didn't want to do that initially because it would make it load first each time they open the screen. But I guess this a common usecase

Edit: I have made it so that you can see the current state and in the meantime it loads a newer state. So that you don't see a empty loading screen.

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.

I tested and this works great.

Lots of thanks to @rodrigo-fm for laying this foundation!

@@ -442,7 +442,7 @@ fun PostOptionsDropdown(
),
)
withContext(Dispatchers.Main) {
showBlockCommunityToast(resp, instance, ctx)
showBlockInstanceToast(resp, instance, ctx)
Copy link
Member

Choose a reason for hiding this comment

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

Good catch

onClick = null,
)

IconButton(
Copy link
Member

Choose a reason for hiding this comment

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

I like this one a lot, there might be other places we can use this style.

@dessalines dessalines enabled auto-merge (squash) June 13, 2024 16:05
@dessalines dessalines merged commit 955accc into LemmyNet:main Jun 13, 2024
1 check passed
@MV-GH MV-GH deleted the ft/add_user_unblocking_screen branch June 13, 2024 21:39
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