fix gaps not showing time
closes sk22#889
This commit is contained in:
@@ -64,16 +64,14 @@ public class GapStatusDisplayItem extends StatusDisplayItem{
|
|||||||
}
|
}
|
||||||
top.setClickable(!item.loading);
|
top.setClickable(!item.loading);
|
||||||
bottom.setClickable(!item.loading);
|
bottom.setClickable(!item.loading);
|
||||||
StatusDisplayItem next=item.parentFragment instanceof StatusListFragment
|
Status next=!(item.parentFragment instanceof StatusListFragment) ? null : getNextVisibleDisplayItem(i->{
|
||||||
? getNextVisibleDisplayItem(i->{
|
|
||||||
Status s=((StatusListFragment) item.parentFragment).getStatusByID(i.parentID);
|
Status s=((StatusListFragment) item.parentFragment).getStatusByID(i.parentID);
|
||||||
return s!=null && !s.fromStatusCreated;
|
return s!=null && !s.fromStatusCreated;
|
||||||
}).orElse(null)
|
})
|
||||||
: null;
|
.map(i->((StatusListFragment) item.parentFragment).getStatusByID(i.parentID))
|
||||||
|
.orElse(null);
|
||||||
bottom.setVisibility(next==null ? View.GONE : View.VISIBLE);
|
bottom.setVisibility(next==null ? View.GONE : View.VISIBLE);
|
||||||
Instant dateBelow=next instanceof HeaderStatusDisplayItem h ? h.status.createdAt
|
Instant dateBelow=next!=null ? next.createdAt : null;
|
||||||
: next instanceof ReblogOrReplyLineStatusDisplayItem l ? l.status.createdAt
|
|
||||||
: null;
|
|
||||||
String text=dateBelow!=null && item.status.createdAt!=null && dateBelow.isBefore(item.status.createdAt)
|
String text=dateBelow!=null && item.status.createdAt!=null && dateBelow.isBefore(item.status.createdAt)
|
||||||
? UiUtils.formatPeriodBetween(item.parentFragment.getContext(), dateBelow, item.status.createdAt)
|
? UiUtils.formatPeriodBetween(item.parentFragment.getContext(), dateBelow, item.status.createdAt)
|
||||||
: null;
|
: null;
|
||||||
|
|||||||
Reference in New Issue
Block a user