Interface NewsfeedListView
-
- All Superinterfaces:
EndlessListView
,LceView
,ListView
,MvpLceView
,MvpView
,RefreshableView
- All Known Implementing Classes:
NewsfeedListFragment
public interface NewsfeedListView extends EndlessListView
TheMvpView
class forNewsfeedListFragment
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
appendNews(Post pinnedPost, java.util.List<Post> newsfeed, int totalEntries, boolean isUserAllowedToPost, boolean isUserAllowedToComment)
Notifies the view to append list ofPost
to the existing post list.void
deletePost(Post post)
Notifies the view to delete the post from the list.void
revertChanges(int postId)
Notifies the view to revert any changes made to the post.void
showErrorDialog(java.lang.String error)
Notifies the view to show a dialog with the provided error messagevoid
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 ofPost
.void
updatePost(Post post)
Notifies the view to update the Post.-
Methods inherited from interface com.cheetahdigital.uikit.widget.list.EndlessListView
onFinishLoadMore, onLoadMoreFailed
-
Methods inherited from interface com.cheetahdigital.uikit.architecture.lce.LceView
onLoadFailed, onLoadSuccess, setErrorViewClickListener
-
Methods inherited from interface com.cheetahdigital.uikit.architecture.lce.MvpLceView
showContent, showError, showLoading
-
Methods inherited from interface com.cheetahdigital.uikit.architecture.refreshable.RefreshableView
onFinishRefresh, onRefreshFailed
-
-
-
-
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 ofPost
. This also means the GET newsfeed API was successful.- Parameters:
pinnedPost
- pinned post in the feednewsfeed
- list ofPost
objectsflags
- list ofFlag
objectstotalEntries
- total number of posts regardless of paginationisUserAllowedToPost
- member posting is allowed or not allowedisUserAllowedToComment
- 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 ofPost
to the existing post list. This also means that the GET newsfeed API with pagination was successful- Parameters:
pinnedPost
- pinned post in the feednewsfeed
- list ofPost
objectstotalEntries
- total number of posts regardless of paginationisUserAllowedToPost
- member posting is allowed or not allowedisUserAllowedToComment
- 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
- deletedPost
-
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
-
-