Added ability to read comments on claims #920
|
@ -0,0 +1,52 @@
|
||||||
|
package io.lbry.browser.adapter;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
import io.lbry.browser.R;
|
||||||
|
import io.lbry.browser.model.Comment;
|
||||||
|
|
||||||
|
public class CommentListAdapter extends RecyclerView.Adapter<CommentListAdapter.ViewHolder> {
|
||||||
|
private List<Comment> items;
|
||||||
|
private Context context;
|
||||||
|
|
||||||
|
public CommentListAdapter(List<Comment> items, Context context) {
|
||||||
|
this.items = items;
|
||||||
|
this.context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return items != null ? items.size() : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
protected TextView channelName;
|
||||||
|
protected TextView commentText;
|
||||||
|
|
||||||
|
public ViewHolder (View v) {
|
||||||
|
super(v);
|
||||||
|
channelName = v.findViewById(R.id.comment_channel_name);
|
||||||
|
commentText = v.findViewById(R.id.comment_text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
|
View v = LayoutInflater.from(context).inflate(R.layout.list_item_comment, parent, false);
|
||||||
|
return new CommentListAdapter.ViewHolder(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(ViewHolder holder, int position) {
|
||||||
|
Comment comment = items.get(position);
|
||||||
|
holder.channelName.setText(comment.getChannelName());
|
||||||
|
holder.commentText.setText(comment.getText());
|
||||||
|
}
|
||||||
|
}
|
40
app/src/main/java/io/lbry/browser/model/Comment.java
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
package io.lbry.browser.model;
|
||||||
|
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import org.json.JSONException;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Comment {
|
||||||
Done in Done in e88706e
|
|||||||
|
private final String channelName, text, id, parentId;
|
||||||
|
|
||||||
|
public Comment(String channelName, String text, String id, String parentId) {
|
||||||
|
this.channelName = channelName;
|
||||||
|
this.text = text;
|
||||||
|
this.id = id;
|
||||||
|
this.parentId = parentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Comment fromJSONObject(JSONObject jsonObject) {
|
||||||
|
try {
|
||||||
|
String parentId = null;
|
||||||
|
if (jsonObject.has("parent_id")) {
|
||||||
|
parentId = jsonObject.getString("parent_id");
|
||||||
|
}
|
||||||
|
|
||||||
|
return new Comment(
|
||||||
|
jsonObject.getString("channel_name"),
|
||||||
|
jsonObject.getString("comment"),
|
||||||
|
jsonObject.getString("comment_id"),
|
||||||
|
parentId
|
||||||
|
);
|
||||||
|
} catch (JSONException ex) {
|
||||||
|
// TODO: Throw exception
|
||||||
|
Log.e("Comments", ex.toString());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
package io.lbry.browser.tasks;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import io.lbry.browser.model.Comment;
|
||||||
|
|
||||||
|
public interface CommentListHandler {
|
||||||
|
void onSuccess(List<Comment> comments);
|
||||||
|
void onError(Exception error);
|
||||||
|
}
|
77
app/src/main/java/io/lbry/browser/tasks/CommentListTask.java
Normal file
|
@ -0,0 +1,77 @@
|
||||||
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.
|
|||||||
|
package io.lbry.browser.tasks;
|
||||||
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.
|
|||||||
|
import android.os.AsyncTask;
|
||||||
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 android.view.View;
|
||||||
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 android.widget.ProgressBar;
|
||||||
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.
|
|||||||
|
import org.json.JSONArray;
|
||||||
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 org.json.JSONObject;
|
||||||
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.
|
|||||||
|
import java.util.ArrayList;
|
||||||
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 java.util.HashMap;
|
||||||
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 java.util.List;
|
||||||
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 java.util.Map;
|
||||||
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.
|
|||||||
|
import io.lbry.browser.model.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.
|
|||||||
|
import io.lbry.browser.utils.Helper;
|
||||||
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;
|
||||||
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.
|
|||||||
|
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.
|
|||||||
|
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.
|
|||||||
|
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;
|
||||||
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 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.
|
|||||||
|
private Exception error;
|
||||||
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.
|
|||||||
|
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.
|
|||||||
|
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;
|
||||||
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.progressBar = progressBar;
|
||||||
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.handler = 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.
|
|||||||
|
|
||||||
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.
|
|||||||
|
protected void onPreExecute() {
|
||||||
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.
|
|||||||
|
Helper.setViewVisibility(progressBar, View.VISIBLE);
|
||||||
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.
|
|||||||
|
|
||||||
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.
|
|||||||
|
protected List<Comment> doInBackground(Void... voids) {
|
||||||
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.
|
|||||||
|
List<Comment> comments = null;
|
||||||
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.
|
|||||||
|
try {
|
||||||
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<>();
|
||||||
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("claim_id", 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.
|
|||||||
|
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.
|
|||||||
|
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.
|
|||||||
|
options.put("include_replies", false);
|
||||||
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("is_channel_signature_valid", 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.
|
|||||||
|
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.
|
|||||||
|
options.put("hidden", false);
|
||||||
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.
|
|||||||
|
JSONObject result = (JSONObject) Lbry.genericApiCall(Lbry.METHOD_COMMENT_LIST, options);
|
||||||
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.
|
|||||||
|
JSONArray items = result.getJSONArray("items");
|
||||||
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.
|
|||||||
|
comments = new ArrayList<>();
|
||||||
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.
|
|||||||
|
for (int i = 0; i < items.length(); i++) {
|
||||||
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.
|
|||||||
|
comments.add(Comment.fromJSONObject(items.getJSONObject(i)));
|
||||||
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.
|
|||||||
|
} catch (Exception ex) {
|
||||||
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.
|
|||||||
|
error = ex;
|
||||||
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.
|
|||||||
|
return comments;
|
||||||
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.
|
|||||||
|
|
||||||
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.
|
|||||||
|
protected void onPostExecute(List<Comment> comments) {
|
||||||
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.
|
|||||||
|
Helper.setViewVisibility(progressBar, View.GONE);
|
||||||
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.
|
|||||||
|
if (handler != null) {
|
||||||
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.
|
|||||||
|
if (comments != null && error == null) {
|
||||||
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.
|
|||||||
|
handler.onSuccess(comments);
|
||||||
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.
|
|||||||
|
} else {
|
||||||
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.
|
|||||||
|
handler.onError(error);
|
||||||
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.
|
|||||||
|
if (error != null) {
|
||||||
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.
|
|||||||
|
}
|
||||||
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.
|
|||||||
|
}
|
||||||
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.
|
|
@ -91,6 +91,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
import io.lbry.browser.MainActivity;
|
import io.lbry.browser.MainActivity;
|
||||||
import io.lbry.browser.R;
|
import io.lbry.browser.R;
|
||||||
import io.lbry.browser.adapter.ClaimListAdapter;
|
import io.lbry.browser.adapter.ClaimListAdapter;
|
||||||
|
import io.lbry.browser.adapter.CommentListAdapter;
|
||||||
import io.lbry.browser.adapter.TagListAdapter;
|
import io.lbry.browser.adapter.TagListAdapter;
|
||||||
import io.lbry.browser.dialog.RepostClaimDialogFragment;
|
import io.lbry.browser.dialog.RepostClaimDialogFragment;
|
||||||
import io.lbry.browser.dialog.SendTipDialogFragment;
|
import io.lbry.browser.dialog.SendTipDialogFragment;
|
||||||
|
@ -103,6 +104,7 @@ import io.lbry.browser.listener.StoragePermissionListener;
|
||||||
import io.lbry.browser.listener.WalletBalanceListener;
|
import io.lbry.browser.listener.WalletBalanceListener;
|
||||||
import io.lbry.browser.model.Claim;
|
import io.lbry.browser.model.Claim;
|
||||||
import io.lbry.browser.model.ClaimCacheKey;
|
import io.lbry.browser.model.ClaimCacheKey;
|
||||||
|
import io.lbry.browser.model.Comment;
|
||||||
import io.lbry.browser.model.Fee;
|
import io.lbry.browser.model.Fee;
|
||||||
import io.lbry.browser.model.LbryFile;
|
import io.lbry.browser.model.LbryFile;
|
||||||
import io.lbry.browser.model.NavMenuItem;
|
import io.lbry.browser.model.NavMenuItem;
|
||||||
|
@ -111,6 +113,8 @@ import io.lbry.browser.model.UrlSuggestion;
|
||||||
import io.lbry.browser.model.WalletBalance;
|
import io.lbry.browser.model.WalletBalance;
|
||||||
import io.lbry.browser.model.lbryinc.Reward;
|
import io.lbry.browser.model.lbryinc.Reward;
|
||||||
import io.lbry.browser.model.lbryinc.Subscription;
|
import io.lbry.browser.model.lbryinc.Subscription;
|
||||||
|
import io.lbry.browser.tasks.CommentListHandler;
|
||||||
|
import io.lbry.browser.tasks.CommentListTask;
|
||||||
import io.lbry.browser.tasks.GenericTaskHandler;
|
import io.lbry.browser.tasks.GenericTaskHandler;
|
||||||
import io.lbry.browser.tasks.LighthouseSearchTask;
|
import io.lbry.browser.tasks.LighthouseSearchTask;
|
||||||
import io.lbry.browser.tasks.ReadTextFileTask;
|
import io.lbry.browser.tasks.ReadTextFileTask;
|
||||||
|
@ -163,6 +167,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
private Claim claim;
|
private Claim claim;
|
||||||
private String currentUrl;
|
private String currentUrl;
|
||||||
private ClaimListAdapter relatedContentAdapter;
|
private ClaimListAdapter relatedContentAdapter;
|
||||||
|
private CommentListAdapter commentListAdapter;
|
||||||
private BroadcastReceiver sdkReceiver;
|
private BroadcastReceiver sdkReceiver;
|
||||||
private Player.EventListener fileViewPlayerListener;
|
private Player.EventListener fileViewPlayerListener;
|
||||||
|
|
||||||
|
@ -314,6 +319,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
if (claim != null) {
|
if (claim != null) {
|
||||||
Helper.saveViewHistory(currentUrl, claim);
|
Helper.saveViewHistory(currentUrl, claim);
|
||||||
checkAndLoadRelatedContent();
|
checkAndLoadRelatedContent();
|
||||||
|
checkAndLoadComments();
|
||||||
renderClaim();
|
renderClaim();
|
||||||
if (claim.getFile() == null) {
|
if (claim.getFile() == null) {
|
||||||
loadFile();
|
loadFile();
|
||||||
|
@ -448,6 +454,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
loadFile();
|
loadFile();
|
||||||
}
|
}
|
||||||
checkOwnClaim();
|
checkOwnClaim();
|
||||||
|
checkAndLoadComments();
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getStreamingUrl() {
|
private String getStreamingUrl() {
|
||||||
|
@ -529,6 +536,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
if (claim != null) {
|
if (claim != null) {
|
||||||
Helper.saveViewHistory(url, claim);
|
Helper.saveViewHistory(url, claim);
|
||||||
checkAndLoadRelatedContent();
|
checkAndLoadRelatedContent();
|
||||||
|
checkAndLoadComments();
|
||||||
renderClaim();
|
renderClaim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -568,7 +576,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
loadAndScheduleDurations();
|
loadAndScheduleDurations();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Lbry.SDK_READY) {
|
if (!Lbry.SDK_READY) {
|
||||||
if (context instanceof MainActivity) {
|
if (context instanceof MainActivity) {
|
||||||
((MainActivity) context).addSdkStatusListener(this);
|
((MainActivity) context).addSdkStatusListener(this);
|
||||||
}
|
}
|
||||||
|
@ -648,6 +656,7 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
loadFile();
|
loadFile();
|
||||||
|
|
||||||
checkAndLoadRelatedContent();
|
checkAndLoadRelatedContent();
|
||||||
|
checkAndLoadComments();
|
||||||
renderClaim();
|
renderClaim();
|
||||||
} else {
|
} else {
|
||||||
// render nothing at location
|
// render nothing at location
|
||||||
|
@ -985,9 +994,13 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
});
|
});
|
||||||
|
|
||||||
RecyclerView relatedContentList = root.findViewById(R.id.file_view_related_content_list);
|
RecyclerView relatedContentList = root.findViewById(R.id.file_view_related_content_list);
|
||||||
|
RecyclerView commentsList = root.findViewById(R.id.file_view_comments_list);
|
||||||
relatedContentList.setNestedScrollingEnabled(false);
|
relatedContentList.setNestedScrollingEnabled(false);
|
||||||
LinearLayoutManager llm = new LinearLayoutManager(getContext());
|
commentsList.setNestedScrollingEnabled(false);
|
||||||
relatedContentList.setLayoutManager(llm);
|
LinearLayoutManager relatedContentListLLM = new LinearLayoutManager(getContext());
|
||||||
|
LinearLayoutManager commentsListLLM = new LinearLayoutManager(getContext());
|
||||||
|
relatedContentList.setLayoutManager(relatedContentListLLM);
|
||||||
|
commentsList.setLayoutManager(commentsListLLM);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void deleteCurrentClaim() {
|
private void deleteCurrentClaim() {
|
||||||
|
@ -1300,6 +1313,22 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkAndLoadComments() {
|
||||||
|
View root = getView();
|
||||||
|
if (root != null) {
|
||||||
|
RecyclerView commentsList = root.findViewById(R.id.file_view_comments_list);
|
||||||
|
if (commentsList == null || commentsList.getAdapter() == null || commentsList.getAdapter().getItemCount() == 0) {
|
||||||
|
TextView commentsSDKInitializing = root.findViewById(R.id.file_view_comments_sdk_initializing);
|
||||||
|
if (Lbry.SDK_READY) {
|
||||||
|
Helper.setViewVisibility(commentsSDKInitializing, View.GONE);
|
||||||
|
loadComments();
|
||||||
|
} else {
|
||||||
|
Helper.setViewVisibility(commentsSDKInitializing, View.VISIBLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void showUnsupportedView() {
|
private void showUnsupportedView() {
|
||||||
View root = getView();
|
View root = getView();
|
||||||
if (root != null) {
|
if (root != null) {
|
||||||
|
@ -1839,6 +1868,39 @@ public class FileViewFragment extends BaseFragment implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void loadComments() {
|
||||||
|
View root = getView();
|
||||||
|
ProgressBar relatedLoading = root.findViewById(R.id.file_view_comments_progress);
|
||||||
|
if (claim != null && root != null) {
|
||||||
|
CommentListTask relatedTask = new CommentListTask(1, 999, claim.getClaimId(), relatedLoading, new CommentListHandler() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(List<Comment> comments) {
|
||||||
|
Context ctx = getContext();
|
||||||
|
if (ctx != null) {
|
||||||
|
commentListAdapter = new CommentListAdapter(comments, ctx);
|
||||||
|
|
||||||
|
View v = getView();
|
||||||
|
if (v != null) {
|
||||||
|
RecyclerView relatedContentList = root.findViewById(R.id.file_view_comments_list);
|
||||||
|
relatedContentList.setAdapter(commentListAdapter);
|
||||||
|
commentListAdapter.notifyDataSetChanged();
|
||||||
|
|
||||||
|
Helper.setViewVisibility(
|
||||||
|
v.findViewById(R.id.file_view_no_comments),
|
||||||
|
commentListAdapter == null || commentListAdapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(Exception error) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
relatedTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public boolean onBackPressed() {
|
public boolean onBackPressed() {
|
||||||
if (isInFullscreenMode()) {
|
if (isInFullscreenMode()) {
|
||||||
disableFullScreenMode();
|
disableFullScreenMode();
|
||||||
|
|
|
@ -102,6 +102,8 @@ public final class Lbry {
|
||||||
public static final String METHOD_STREAM_ABANDON = "stream_abandon";
|
public static final String METHOD_STREAM_ABANDON = "stream_abandon";
|
||||||
public static final String METHOD_STREAM_REPOST = "stream_repost";
|
public static final String METHOD_STREAM_REPOST = "stream_repost";
|
||||||
|
|
||||||
|
public static final String METHOD_COMMENT_LIST = "comment_list";
|
||||||
|
|
||||||
public static KeyStore KEYSTORE;
|
public static KeyStore KEYSTORE;
|
||||||
public static boolean SDK_READY = false;
|
public static boolean SDK_READY = false;
|
||||||
|
|
||||||
|
|
|
@ -480,23 +480,24 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginRight="16dp">
|
android:layout_marginRight="16dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/file_view_publisher_name_area"
|
android:id="@+id/file_view_publisher_name_area"
|
||||||
android:clickable="true"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:clickable="true"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/file_view_publisher_name"
|
android:id="@+id/file_view_publisher_name"
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:clickable="true"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
android:background="?attr/selectableItemBackground"
|
||||||
android:textColor="@color/lbryGreen"
|
android:clickable="true"
|
||||||
android:fontFamily="@font/inter"
|
android:fontFamily="@font/inter"
|
||||||
android:textFontWeight="600" />
|
android:textColor="@color/lbryGreen"
|
||||||
|
android:textFontWeight="600"
|
||||||
|
android:textSize="14sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<io.lbry.browser.ui.controls.SolidIconView
|
<io.lbry.browser.ui.controls.SolidIconView
|
||||||
android:id="@+id/file_view_icon_follow_unfollow"
|
android:id="@+id/file_view_icon_follow_unfollow"
|
||||||
|
@ -611,6 +612,75 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:layout_height="wrap_content" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0.5dp"
|
||||||
|
android:layout_marginBottom="12dp"
|
||||||
|
android:background="@color/divider" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/file_view_comments_area"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp">
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/file_view_comments_progress"
|
||||||
|
android:layout_width="16dp"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/comments"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/file_view_no_comments"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/no_comments"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/file_view_comments_sdk_initializing"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="@string/sdk_initializing_comments"
|
||||||
|
android:textFontWeight="300"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/file_view_comments_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:overScrollMode="never" />
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
36
app/src/main/res/layout/list_item_comment.xml
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="?attr/selectableItemBackground"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:paddingBottom="8dp"
|
||||||
|
android:paddingLeft="16dp"
|
||||||
|
android:paddingRight="16dp"
|
||||||
|
android:paddingTop="8dp">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/comment_channel_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="channel_name"
|
||||||
|
android:textColor="@color/lbryGreen"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/comment_text"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:fontFamily="@font/inter"
|
||||||
|
android:text="comment_text" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
|
@ -59,6 +59,9 @@
|
||||||
<string name="report">Report</string>
|
<string name="report">Report</string>
|
||||||
<string name="loading_decentralized_data">Loading decentralized data...</string>
|
<string name="loading_decentralized_data">Loading decentralized data...</string>
|
||||||
<string name="related_content">Related Content</string>
|
<string name="related_content">Related Content</string>
|
||||||
|
<string name="comments">Comments</string>
|
||||||
|
<string name="no_comments">No comments to display.</string>
|
||||||
|
<string name="sdk_initializing_comments">Comments will display once the background service is done initializing.</string>
|
||||||
<string name="share_lbry_content">Share LBRY content</string>
|
<string name="share_lbry_content">Share LBRY content</string>
|
||||||
<string name="view">View</string>
|
<string name="view">View</string>
|
||||||
<string name="play">Play</string>
|
<string name="play">Play</string>
|
||||||
|
|
You can add the @Data annotation from lombok so you don't have to implement the boilerplate toString and getter methods. https://projectlombok.org/features/Data