Merge pull request #206 from mouse-reeve/ui-overhaul

Ui overhaul
This commit is contained in:
Mouse Reeve
2020-09-30 17:15:22 -07:00
committed by GitHub
68 changed files with 1140 additions and 1755 deletions

View File

@ -91,6 +91,11 @@ class Status(OrderedCollectionPageMixin, BookWyrmModel):
to write this so it's just a property '''
return cls.objects.filter(reply_parent=status).select_subclasses()
@property
def status_type(self):
''' expose the type of status for the ui using activity type '''
return self.activity_serializer.__name__
def to_replies(self, **kwargs):
''' helper function for loading AP serialized replies to a status '''
return self.to_ordered_collection(
@ -211,7 +216,7 @@ class Boost(Status):
ActivityMapping('object', 'boosted_status'),
]
activity_serializer = activitypub.Like
activity_serializer = activitypub.Boost
# This constraint can't work as it would cross tables.
# class Meta: