mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-12-22 21:16:57 +00:00
crash resolution
This commit is contained in:
parent
3e7097ff6d
commit
1cc21896b7
@ -68,8 +68,8 @@ public final class FeedAdapter extends ListAdapter<FeedModel, FeedItemViewHolder
|
||||
final ItemFeedSliderBinding binding = ItemFeedSliderBinding.inflate(layoutInflater, parent, false);
|
||||
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);
|
||||
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 Runnable longPressRunnable = () -> {
|
||||
longClickListener.onLongClick(this);
|
||||
if (longClickListener != null) longClickListener.onLongClick(this);
|
||||
};
|
||||
|
||||
public RamboTextView(final Context context) {
|
||||
|
@ -106,7 +106,7 @@ public final class SavedViewerFragment extends Fragment implements SwipeRefreshL
|
||||
@Override
|
||||
public void onResult(final PostModel[] result) {
|
||||
final List<PostModel> current = postsViewModel.getList().getValue();
|
||||
if (result != null) {
|
||||
if (result != null && result.length > 0) {
|
||||
final List<PostModel> resultList = Arrays.asList(result);
|
||||
if (current == null) {
|
||||
postsViewModel.getList().postValue(resultList);
|
||||
|
Loading…
Reference in New Issue
Block a user