diaspora/diaspora — pull request #3831 by fabianrbz (2013-01-11 23:00:10+00:00)
Title: Fix reshare

Hi guys,

These pull request fixes issue #3671 and some other problems.
Basically what it does is to remove the Reshare link after the user reshares the post by adding a new condition to this function https://github.com/marpo60/diaspora/pull/new/fix-reshare#L1R130. It asks if the post is reshared by the current user, so when the reshare model is saved, the reshare models is added to the reshare's collection in backbone and the 'change' event is triggered which causes the view to be re-rendered.

It looks a bit strange because the interactions are implemented as a collection in backbone but , that collection should be empty or contain the reshare of the current user afaik.

This also brings back the error message in case you try to reshare the same post twice (the only way that it can happen is by having multiple tabs open at the same time).

Cheers!