We are using discourse-solved plugin for accepting answers from the Users.
Now we have to display/hide a popup at the bottom whenever the user accepts/unaccepts a reply as an answer by clicking on the Solution button. How we can do this?
Here we have to display a popup similar to a cookie notice (i.e. fixed at the bottom) on the Topic page if the logged-in user is the author of the topic and none of the replies is marked as Solution.
And whenever the topic author checks/unchecks the reply as Solution then hides/shows the popup.
So for this, we have created a widget that returns the popup (say: accept-answer-popup) only based on the required conditions (as I mentioned above) and attached it after the post-stream widget.
By this whenever the topic author checks/unchecks the reply as Solution then the post-stream widget is refreshed and also the accept-answer-popup is refreshed as they are in the chain. This solved our problem.
Please give us feedback if we are missing anything in our implementation.