Last minor review comments addressed

This commit is contained in:
Torsten Grote
2016-10-31 13:13:59 -02:00
parent c0aa255bb6
commit 656a947f5a
7 changed files with 14 additions and 13 deletions

View File

@@ -50,7 +50,7 @@ public class ThreadItemAdapter<I extends ThreadItem>
ViewGroup parent, int viewType) {
View v = LayoutInflater.from(parent.getContext())
.inflate(R.layout.list_item_thread, parent, false);
return new ThreadItemViewHolder<>(v);
return new ThreadPostViewHolder<>(v);
}
@Override

View File

@@ -35,7 +35,7 @@ import static android.support.design.widget.Snackbar.make;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
public abstract class ThreadListActivity<G extends NamedGroup, I extends ThreadItem, H extends PostHeader, A extends ThreadItemAdapter<I>>
public abstract class ThreadListActivity<G extends NamedGroup, I extends ThreadItem, H extends PostHeader>
extends BriarActivity
implements ThreadListListener<H>, TextInputListener,
ThreadItemListener<I> {
@@ -46,7 +46,7 @@ public abstract class ThreadListActivity<G extends NamedGroup, I extends ThreadI
private static final Logger LOG =
Logger.getLogger(ThreadListActivity.class.getName());
protected A adapter;
protected ThreadItemAdapter<I> adapter;
protected BriarRecyclerView list;
protected TextInputView textInput;
protected GroupId groupId;
@@ -88,7 +88,8 @@ public abstract class ThreadListActivity<G extends NamedGroup, I extends ThreadI
@LayoutRes
protected abstract int getLayout();
protected abstract A createAdapter(LinearLayoutManager layoutManager);
protected abstract ThreadItemAdapter<I> createAdapter(
LinearLayoutManager layoutManager);
protected void loadNamedGroup() {
getController().loadNamedGroup(

View File

@@ -14,14 +14,14 @@ import static android.view.View.VISIBLE;
@UiThread
@NotNullByDefault
public class ThreadItemViewHolder<I extends ThreadItem>
public class ThreadPostViewHolder<I extends ThreadItem>
extends BaseThreadItemViewHolder<I> {
private final TextView lvlText, repliesText;
private final View[] lvls;
private final View chevron, replyButton;
public ThreadItemViewHolder(View v) {
public ThreadPostViewHolder(View v) {
super(v);
lvlText = (TextView) v.findViewById(R.id.nested_line_text);