Actually form thread lines properly in the thread view. Closes #57

This commit is contained in:
Vavassor 2017-08-03 22:30:37 -04:00
commit af1d92c965
4 changed files with 72 additions and 15 deletions

View file

@ -15,6 +15,7 @@
package com.keylesspalace.tusky.adapter;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
@ -129,6 +130,15 @@ public class ThreadAdapter extends RecyclerView.Adapter {
}
}
@Nullable
public StatusViewData getItem(int position) {
if (position != RecyclerView.NO_POSITION && position >= 0 && position < statuses.size()) {
return statuses.get(position);
} else {
return null;
}
}
public void setMediaPreviewEnabled(boolean enabled) {
mediaPreviewEnabled = enabled;
}