Interface NewsfeedListView

    • Method Detail

      • showNewsfeedList

        void showNewsfeedList​(Post pinnedPost,
                              java.util.List<Post> newsfeed,
                              java.util.List<Flag> flags,
                              int totalEntries,
                              boolean isUserAllowedToPost,
                              boolean isUserAllowedToComment)
        Notifies the view to show the list of Post. This also means the GET newsfeed API was successful.
        Parameters:
        pinnedPost - pinned post in the feed
        newsfeed - list of Post objects
        flags - list of Flag objects
        totalEntries - total number of posts regardless of pagination
        isUserAllowedToPost - member posting is allowed or not allowed
        isUserAllowedToComment - member commenting is allowed or not allowed
      • appendNews

        void appendNews​(Post pinnedPost,
                        java.util.List<Post> newsfeed,
                        int totalEntries,
                        boolean isUserAllowedToPost,
                        boolean isUserAllowedToComment)
        Notifies the view to append list of Post to the existing post list. This also means that the GET newsfeed API with pagination was successful
        Parameters:
        pinnedPost - pinned post in the feed
        newsfeed - list of Post objects
        totalEntries - total number of posts regardless of pagination
        isUserAllowedToPost - member posting is allowed or not allowed
        isUserAllowedToComment - member commenting is allowed or not allowed
      • deletePost

        void deletePost​(Post post)
        Notifies the view to delete the post from the list. This also means delete post API was successful.
        Parameters:
        post - deleted Post
      • showErrorDialog

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

        void revertChanges​(int postId)
        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:
        postId - id of the post to revert
      • 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