Browse Source
crash resolution
renovate/org.robolectric-robolectric-4.x
Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
3 changed files with
4 additions and
4 deletions
-
app/src/main/java/awais/instagrabber/adapters/FeedAdapter.java
-
app/src/main/java/awais/instagrabber/customviews/RamboTextView.java
-
app/src/main/java/awais/instagrabber/fragments/SavedViewerFragment.java
|
|
@ -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); |
|
|
|