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

modified ShareVisibility condition to update hidden field in model #2537

Closed
wants to merge 1 commit into from
Closed

Conversation

vanhalt
Copy link

@vanhalt vanhalt commented Dec 20, 2011

Bug #2501

@jhass
Copy link
Member

jhass commented Dec 20, 2011

Thanks, I think we need a cucumber feature for this.

@Pistos
Copy link
Contributor

Pistos commented Dec 21, 2011

@vanhalt: I don't have any records in production with a NULL value for the hidden field. So if all values are always true or false, your code just collapses to this:

@vis.hidden = true

Unless I don't fully follow what the problem is/was?

@vanhalt
Copy link
Author

vanhalt commented Dec 21, 2011

This is what is happening.

Scenario #1:
Alice posts "hello"
Bob from Alice's profile "hide/mute" Alice's "hello" post.
As Alice's post still visible for Bob from Alice's profile. Bob can click again "hide/mute" and make visible Alice's post from his own profile.

Scenario #2:
Alice posts "hello"
Bob from his own profile "hide/mute" Alice's "hello" post.
As Alice's post still visible for Bob from Alice's profile. Bob can click again "hide/mute" and make visible Alice's post from his own profile.

And checking if post it's allready hidden it doesn't hidden it again. Cuz this "hide/mute" functionality is where you click on the X button to "hide/mute" so it can't unhide the post. That's what I'm trying to fix

@Pistos
Copy link
Contributor

Pistos commented Dec 21, 2011

Well then, my point still stands. Your code boils down to this:

@vis.hidden = true

And I have my doubts that this fixes the issue that the post sometimes is not being hidden when you click X in your typical stream page.

@vanhalt
Copy link
Author

vanhalt commented Dec 21, 2011

Well yes... it sets always visibility to hidden. And the scenarios that sometimes the post is not hidden it is the scenario that I explained before. I don't see any other place where you can hide a post.

@sarahmei
Copy link
Member

sarahmei commented Jan 9, 2012

Thank you for this code! Unfortunately you hit us at a bad time - we are about to completely change how hidden posts work. Moving forward, we'll be storing a list of the posts that each user has hidden in a serialized hash in the users table, instead of storing them individually in the share_visibilities table.

We're making the change because we need to allow people to hide posts that they don't have a ShareVisibility for - such as tag posts and community spotlight posts.

I really appreciate the pull request though and please come talk to us in IRC if you want to find another issue to work on.

@sarahmei sarahmei closed this Jan 9, 2012
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.

None yet

4 participants