jerboa icon indicating copy to clipboard operation
jerboa copied to clipboard

Add Community, Instance, and User blocks to user settings

Open jeanflajeunesse opened this issue 1 year ago • 4 comments

  • [x ] Did you check to see if this issue already exists?
  • [x ] Is this only a single feature request? Do not put multiple feature requests in one issue.
  • [ x] Is this a question or discussion? Don't use this, use https://lemmy.ml/c/jerboa

** Describe the feature request below **

It appears theres no way in the app to unblock a community. Blocked communities should be listed somewhere with the option to unblock and/or blocked communities should have their block button replaced with unblock.

jeanflajeunesse avatar Jun 15 '23 22:06 jeanflajeunesse

Are you talking about a moderator function here or an user option?

Schoolkid1 avatar Jun 16 '23 11:06 Schoolkid1

A user option

jeanflajeunesse avatar Jun 16 '23 14:06 jeanflajeunesse

To clarify, when you block a community, even if you manage to navigate back to that community again (say, through your inbox) the "block community" option remains and is not replaced with an unblock option. Hitting the button anyway just tries to block the already blocked community and nothing interesting happens.

At the very least, an initial fix of changing that button to an unblock button just as the web-interface does should be prioritized over creating a space for your blocked communities list. I do agree that list should also happen eventually.

Screenshot_20230622-215702~2

0hCome0n avatar Jun 23 '23 02:06 0hCome0n

I want to push the following code but i cannot test it right from my pc. Can some one check if this would fix the issue?

var isCommunityBlocked = false // I added the var to keep track if something is blocked I could not find a tracker for it in the existing code

           onBlockCommunityClick = {
                account?.also { acct ->
                    communityViewModel.blockCommunity(
                        account = acct,
                        ctx = ctx,
                    )isCommunityBlocked = true
                } else {
                // Here i added the unblock option
                communityViewModel.unblockCommunity(account = acct, ctx = ctx)
                isCommunityBlocked = false
            }

Schoolkid1 avatar Aug 09 '23 23:08 Schoolkid1