Added ability to read comments on claims #920
|
@ -17,12 +17,16 @@ import io.lbry.browser.utils.Helper;
|
||||||
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
|
|||||||
import io.lbry.browser.utils.Lbry;
|
import io.lbry.browser.utils.Lbry;
|
||||||
|
|
||||||
public class CommentListTask extends AsyncTask<Void, Void, List<Comment>> {
|
public class CommentListTask extends AsyncTask<Void, Void, List<Comment>> {
|
||||||
private String claim;
|
private final int page;
|
||||||
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
|
|||||||
|
private final int pageSize;
|
||||||
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
|
|||||||
|
private final String claim;
|
||||||
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
|
|||||||
private ProgressBar progressBar;
|
private ProgressBar progressBar;
|
||||||
private CommentListHandler handler;
|
private CommentListHandler handler;
|
||||||
private Exception error;
|
private Exception error;
|
||||||
|
|
||||||
public CommentListTask(String claim, ProgressBar progressBar, CommentListHandler handler) {
|
public CommentListTask(int page, int pageSize, String claim, ProgressBar progressBar, CommentListHandler handler) {
|
||||||
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
|
|||||||
|
this.page = page;
|
||||||
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
|
|||||||
|
this.pageSize = pageSize;
|
||||||
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
|
|||||||
this.claim = claim;
|
this.claim = claim;
|
||||||
this.progressBar = progressBar;
|
this.progressBar = progressBar;
|
||||||
this.handler = handler;
|
this.handler = handler;
|
||||||
|
@ -39,8 +43,8 @@ public class CommentListTask extends AsyncTask<Void, Void, List<Comment>> {
|
||||||
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
|
|||||||
Map<String, Object> options = new HashMap<>();
|
Map<String, Object> options = new HashMap<>();
|
||||||
|
|
||||||
options.put("claim_id", claim);
|
options.put("claim_id", claim);
|
||||||
options.put("page", 1);
|
options.put("page", page);
|
||||||
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
|
|||||||
options.put("page_size", 999);
|
options.put("page_size", pageSize);
|
||||||
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
|
|||||||
options.put("include_replies", false);
|
options.put("include_replies", false);
|
||||||
options.put("is_channel_signature_valid", true);
|
options.put("is_channel_signature_valid", true);
|
||||||
options.put("visible", true);
|
options.put("visible", true);
|
||||||
|
|
||||||
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
![]() Could you change this to handle pagination by adding Could you change this to handle pagination by adding `page` and `pageSize` parameters? For a simple example showing how pagination works for infinite scroll, refer to `PurchaseListTask` and the recycler view scroll listener `contentList.addScrollListener` in `LibraryFragment.java`.
![]() Where are new comments added? I'm a little worried about comments getting added while users are scrolling. Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
![]() I added the handling but I didn't implement it (I don't think you requested I implement and I'm not sure how to do that because of the above question so I just added handling). I added the handling but I didn't implement it (I don't _think_ you requested I implement and I'm not sure how to do that because of the above question so I just added handling). 9e6acd9
![]()
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks. > Where are new comments added? I'm a little worried about comments getting added while users are scrolling.
Usually, you could use a flag to check if comments are loading and then simply return instead of sending another request to fetch the next page. I'll accept this and make some tweaks.
|
|
@ -1872,7 +1872,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
View root = getView();
|
View root = getView();
|
||||||
ProgressBar relatedLoading = root.findViewById(R.id.file_view_comments_progress);
|
ProgressBar relatedLoading = root.findViewById(R.id.file_view_comments_progress);
|
||||||
if (claim != null && root != null) {
|
if (claim != null && root != null) {
|
||||||
CommentListTask relatedTask = new CommentListTask(claim.getClaimId(), relatedLoading, new CommentListHandler() {
|
CommentListTask relatedTask = new CommentListTask(1, 999, claim.getClaimId(), relatedLoading, new CommentListHandler() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<Comment> comments) {
|
public void onSuccess(List<Comment> comments) {
|
||||||
Context ctx = getContext();
|
Context ctx = getContext();
|
||||||
|
|
Could you change this to handle pagination by adding
page
andpageSize
parameters? For a simple example showing how pagination works for infinite scroll, refer toPurchaseListTask
and the recycler view scroll listenercontentList.addScrollListener
inLibraryFragment.java
.