diff --git a/files/classes/submission.py b/files/classes/submission.py index 290cb87a8..0008b8339 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -508,3 +508,7 @@ class Submission(Base): @lazy def is_saved(self, v): return g.db.query(SaveRelationship).filter_by(user_id=v.id, submission_id=self.id).first() + + @lazy + def is_subscribed(self, v): + return g.db.query(Subscription).filter_by(user_id=v.id, submission_id=self.id).first() \ No newline at end of file diff --git a/files/templates/post_actions.html b/files/templates/post_actions.html index 8ae3f3ef0..0717f8b2b 100644 --- a/files/templates/post_actions.html +++ b/files/templates/post_actions.html @@ -15,7 +15,7 @@ Copy link {% if v %} - Subscribe + Subscribe Unsubscribe {% endif %} diff --git a/files/templates/post_actions_mobile.html b/files/templates/post_actions_mobile.html index f5e655155..9bc28658a 100644 --- a/files/templates/post_actions_mobile.html +++ b/files/templates/post_actions_mobile.html @@ -14,8 +14,8 @@ - - + +