fix: fix compilation errors
This commit is contained in:
parent
c6ded3d505
commit
73944675fa
|
@ -71,4 +71,9 @@ public class CustomLocalTimelineFragment extends StatusListFragment {
|
|||
if(!getArguments().getBoolean("noAutoLoad") && !loaded && !dataLoading)
|
||||
loadData();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Filter.FilterContext getFilterContext() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,14 +45,6 @@ public class FileStatusDisplayItem extends StatusDisplayItem{
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onBind(FileStatusDisplayItem item){
|
||||
title.setText(item.attachment.description == null ? title.getContext().getText(R.string.media_no_description) : item.attachment.description);
|
||||
domain.setText(Uri.parse(item.attachment.remoteUrl == null ? item.attachment.url : item.attachment.remoteUrl).getHost());
|
||||
|
||||
}
|
||||
|
||||
private void onClick(View v){
|
||||
UiUtils.openURL(itemView.getContext(), item.parentFragment.getAccountID(), item.attachment.remoteUrl == null ? item.attachment.url : item.attachment.remoteUrl);
|
||||
public void onBind(FileStatusDisplayItem item) {
|
||||
Uri url = Uri.parse(getUrl());
|
||||
title.setText(item.attachment.description != null
|
||||
|
|
|
@ -185,11 +185,11 @@ public abstract class StatusDisplayItem{
|
|||
|
||||
statusForContent.mediaAttachments.stream()
|
||||
.filter(att->att.type.equals(Attachment.Type.UNKNOWN))
|
||||
.map(att -> new FileStatusDisplayItem(parentID, fragment, att))
|
||||
.map(att -> new FileStatusDisplayItem(parentID, fragment, att, statusForContent))
|
||||
.forEach(items::add);
|
||||
|
||||
if(statusForContent.poll!=null){
|
||||
buildPollItems(parentID, fragment, statusForContent.poll, items);
|
||||
buildPollItems(parentID, fragment, statusForContent.poll, items, statusForContent);
|
||||
}
|
||||
if(statusForContent.card!=null && statusForContent.mediaAttachments.isEmpty() && TextUtils.isEmpty(statusForContent.spoilerText)){
|
||||
items.add(new LinkCardStatusDisplayItem(parentID, fragment, statusForContent));
|
||||
|
@ -222,11 +222,11 @@ public abstract class StatusDisplayItem{
|
|||
return result;
|
||||
}
|
||||
|
||||
public static void buildPollItems(String parentID, BaseStatusListFragment fragment, Poll poll, List<StatusDisplayItem> items){
|
||||
public static void buildPollItems(String parentID, BaseStatusListFragment fragment, Poll poll, List<StatusDisplayItem> items, Status status){
|
||||
for(Poll.Option opt:poll.options){
|
||||
items.add(new PollOptionStatusDisplayItem(parentID, poll, opt, fragment));
|
||||
items.add(new PollOptionStatusDisplayItem(parentID, poll, opt, fragment, status));
|
||||
}
|
||||
items.add(new PollFooterStatusDisplayItem(parentID, fragment, poll));
|
||||
items.add(new PollFooterStatusDisplayItem(parentID, fragment, poll, status));
|
||||
}
|
||||
|
||||
public enum Type{
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.joinmastodon.android.model.Status;
|
|||
import org.joinmastodon.android.ui.drawables.SawtoothTearDrawable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
// Mind the gap!
|
||||
public class WarningFilteredStatusDisplayItem extends StatusDisplayItem{
|
||||
|
@ -40,7 +41,7 @@ public class WarningFilteredStatusDisplayItem extends StatusDisplayItem{
|
|||
public final View warningWrap;
|
||||
public final Button showBtn;
|
||||
public final TextView text;
|
||||
public ArrayList<StatusDisplayItem> filteredItems;
|
||||
public List<StatusDisplayItem> filteredItems;
|
||||
|
||||
public Holder(Context context, ViewGroup parent){
|
||||
super(context, R.layout.display_item_warning, parent);
|
||||
|
|
Loading…
Reference in New Issue