IPostPageVm
Namespace: SlottyMedia.Backend.ViewModel.Pages.Post
This ViewModel represents the state of the PostPage.
public interface IPostPageVm
Properties
IsLoadingPage
Indicates whether the post is being fetched (i.e. the whole page is loading)
public abstract bool IsLoadingPage { get; }
Property Value
IsLoadingComments
Indicates whether additional comments are being fetched
public abstract bool IsLoadingComments { get; }
Property Value
Post
The post that will be showcased. If null, then the post is either being fetched or it does not exist.
public abstract PostDto Post { get; }
Property Value
Comments
The comments that belong to the post
public abstract IPage<CommentDto> Comments { get; }
Property Value
IPage<CommentDto>
AuthPrincipalId
The ID of the currently logged in user.
public abstract Nullable<Guid> AuthPrincipalId { get; }
Property Value
Methods
Initialize(Guid)
Attempts to load the given post. If no such post exists, then IPostPageVm.Post will be null.
Otherwise, it will be a PostDto that corresponds to the requested post.
Task Initialize(Guid postId)
Parameters
postId Guid
The ID of the post to showcase
Returns
LoadCommentsPage(Int32)
Attempts to load more comments than were already showcased. Does nothing if no further comments exist.
Task LoadCommentsPage(int pageNumber)
Parameters
pageNumber Int32