Interface NewsfeedDetailsView

    • Method Detail

      • showNewsDetails

        void showNewsDetails​(Post post,
                             java.util.List<Comment> comments,
                             int totalEntries,
                             java.util.List<Flag> flag)
        Notifies the view to show the Post and list of Comment. This also means the following API calls were successful:
        • GET Post
        • GET Comments
        • GET Flags
        Parameters:
        post - Post object
        comments - list of Comment object
        totalEntries - total number of comments regardless of pagination
        flag - list of Flag object
      • appendComments

        void appendComments​(java.util.List<Comment> comments,
                            int totalEntries)
        Notifies the view to append list of Comment to the existing comment list. This also means that the GET comments API with pagination was successful
        Parameters:
        comments - list of Comment object
        totalEntries - total number of comments regardless of pagination
      • deleteComment

        void deleteComment​(int commentId)
        Notifies the view to delete the comment from the existing list. This also means that the delete comment API was successful.
        Parameters:
        commentId - id of comment
      • showErrorDialog

        void showErrorDialog​(java.lang.String error)
        Notifies the view to show a dialog with the provided error message
        Parameters:
        error - error message
      • deletePost

        void deletePost()
        Notifies the view to delete the Post. Deleting the post also deletes the comments associated to it. This also means that the delete Post API was successful
      • updateComment

        void updateComment​(SingleComment comment)
        Notifies the view to update a comment from the existing list. This also means that the GET comment API with clearing of response cache was successful
        Parameters:
        comment - updated SingleComment
      • hideRefreshProgress

        void hideRefreshProgress()
        Notifies the view to hide refresh progress. This also means that add comment API failed
      • clearCommentEditText

        void clearCommentEditText()
        Notifies the view to clear the content of Comment Edit Text. This also means that add comment API was successful
      • updatePost

        void updatePost​(Post post)
        Notifies the view to update the Post. This also means that the GET post API with clearing of cache was successful
        Parameters:
        post - updated Post
      • revertPostChanges

        void revertPostChanges​(java.lang.String error)
        Notifies the view to revert any changes made to the post. This also means that Like/Unlike and Flag/Unflag of Post API failed
        Parameters:
        error - error message
      • revertCommentChanges

        void revertCommentChanges​(java.lang.String error,
                                  int commentId)
        Notifies the view to revert any changes made to the comment associated to the post. This also means that Like/Unlike and Flag/Unflag of a comment failed
        Parameters:
        error - error message
        commentId - id of the comment to revert