mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 06:37:30 +00:00
Merge remote-tracking branch 'origin/task/update-feed-view' into task/update-feed-view
This commit is contained in:
commit
6fa13a6fbb
@ -68,8 +68,8 @@ public final class FeedAdapter extends ListAdapter<FeedModel, FeedItemViewHolder
|
|||||||
final ItemFeedSliderBinding binding = ItemFeedSliderBinding.inflate(layoutInflater, parent, false);
|
final ItemFeedSliderBinding binding = ItemFeedSliderBinding.inflate(layoutInflater, parent, false);
|
||||||
return new FeedSliderViewHolder(binding, mentionClickListener, clickListener, longClickListener);
|
return new FeedSliderViewHolder(binding, mentionClickListener, clickListener, longClickListener);
|
||||||
}
|
}
|
||||||
default:
|
case MEDIA_TYPE_IMAGE:
|
||||||
case MEDIA_TYPE_IMAGE: {
|
default: {
|
||||||
final ItemFeedPhotoBinding binding = ItemFeedPhotoBinding.inflate(layoutInflater, parent, false);
|
final ItemFeedPhotoBinding binding = ItemFeedPhotoBinding.inflate(layoutInflater, parent, false);
|
||||||
return new FeedPhotoViewHolder(binding, mentionClickListener, clickListener, longClickListener);
|
return new FeedPhotoViewHolder(binding, mentionClickListener, clickListener, longClickListener);
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ public final class RamboTextView extends AppCompatTextView {
|
|||||||
|
|
||||||
private final Handler handler = new Handler();
|
private final Handler handler = new Handler();
|
||||||
private final Runnable longPressRunnable = () -> {
|
private final Runnable longPressRunnable = () -> {
|
||||||
longClickListener.onLongClick(this);
|
if (longClickListener != null) longClickListener.onLongClick(this);
|
||||||
};
|
};
|
||||||
|
|
||||||
public RamboTextView(final Context context) {
|
public RamboTextView(final Context context) {
|
||||||
|
@ -106,7 +106,7 @@ public final class SavedViewerFragment extends Fragment implements SwipeRefreshL
|
|||||||
@Override
|
@Override
|
||||||
public void onResult(final PostModel[] result) {
|
public void onResult(final PostModel[] result) {
|
||||||
final List<PostModel> current = postsViewModel.getList().getValue();
|
final List<PostModel> current = postsViewModel.getList().getValue();
|
||||||
if (result != null) {
|
if (result != null && result.length > 0) {
|
||||||
final List<PostModel> resultList = Arrays.asList(result);
|
final List<PostModel> resultList = Arrays.asList(result);
|
||||||
if (current == null) {
|
if (current == null) {
|
||||||
postsViewModel.getList().postValue(resultList);
|
postsViewModel.getList().postValue(resultList);
|
||||||
|
Loading…
Reference in New Issue
Block a user