Skip to content

Commit

Permalink
Update MessageService.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-DoHa committed Nov 24, 2022
1 parent 879188b commit 4999669
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ public List<MessageListResponse> getMessageFeed(Long cursor, Pageable pageable,
f.setNextCursor(mainList.get(mainList.size()-1).getMessageId());
});

if(!mainList.get(mainList.size() - 1).getHaveNextMessage()) {
mainList.forEach(f -> f.setNextCursor(null));
if (mainList.size() > 0) {
if(!mainList.get(mainList.size() - 1).getHaveNextMessage()) {
mainList.forEach(f -> f.setNextCursor(null));
}
}

return mainList;
Expand Down

0 comments on commit 4999669

Please sign in to comment.