fixed crashes
This commit is contained in:
parent
2d5bde0ee5
commit
fec060bbdb
|
@ -71,7 +71,7 @@ public class MediaEvent extends BaseEvent implements Parcelable {
|
|||
@ParcelableThisPlease
|
||||
boolean previewEnabled;
|
||||
|
||||
public static MediaEvent create(Context context, ParcelableStatus status, ParcelableMedia media,
|
||||
public static MediaEvent create(Context context, ParcelableStatus status,@NonNull ParcelableMedia media,
|
||||
@TimelineType String timelineType, boolean previewEnabled) {
|
||||
final MediaEvent event = new MediaEvent();
|
||||
event.markStart(context);
|
||||
|
|
|
@ -358,7 +358,7 @@ public abstract class AbsActivitiesFragment extends AbsContentListRecyclerViewFr
|
|||
public void onMediaClick(IStatusViewHolder holder, View view, ParcelableMedia media, int position) {
|
||||
final ParcelableActivitiesAdapter adapter = getAdapter();
|
||||
final ParcelableStatus status = ParcelableActivityUtils.getActivityStatus(adapter.getActivity(position));
|
||||
if (status == null) return;
|
||||
if (status == null || media == null) return;
|
||||
IntentUtils.openMedia(getActivity(), status, media, null,
|
||||
mPreferences.getBoolean(KEY_NEW_DOCUMENT_API));
|
||||
// BEGIN HotMobi
|
||||
|
|
|
@ -346,7 +346,7 @@ public abstract class AbsStatusesFragment extends AbsContentListRecyclerViewFrag
|
|||
public void onMediaClick(IStatusViewHolder holder, View view, ParcelableMedia media, int statusPosition) {
|
||||
final ParcelableStatusesAdapter adapter = getAdapter();
|
||||
final ParcelableStatus status = adapter.getStatus(statusPosition);
|
||||
if (status == null) return;
|
||||
if (status == null || media == null) return;
|
||||
IntentUtils.openMedia(getActivity(), status, media, null,
|
||||
mPreferences.getBoolean(KEY_NEW_DOCUMENT_API));
|
||||
// BEGIN HotMobi
|
||||
|
|
|
@ -416,7 +416,7 @@ public class StatusFragment extends BaseSupportFragment implements LoaderCallbac
|
|||
@Override
|
||||
public void onMediaClick(IStatusViewHolder holder, View view, ParcelableMedia media, int statusPosition) {
|
||||
final ParcelableStatus status = mStatusAdapter.getStatus(statusPosition);
|
||||
if (status == null) return;
|
||||
if (status == null || media == null) return;
|
||||
IntentUtils.openMedia(getActivity(), status, media, null,
|
||||
mPreferences.getBoolean(KEY_NEW_DOCUMENT_API));
|
||||
|
||||
|
@ -462,7 +462,7 @@ public class StatusFragment extends BaseSupportFragment implements LoaderCallbac
|
|||
@Override
|
||||
public void onMediaClick(View view, ParcelableMedia media, UserKey accountKey, long extraId) {
|
||||
final ParcelableStatus status = mStatusAdapter.getStatus();
|
||||
if (status == null) return;
|
||||
if (status == null || media == null) return;
|
||||
IntentUtils.openMediaDirectly(getActivity(), accountKey, status, media, null,
|
||||
mPreferences.getBoolean(KEY_NEW_DOCUMENT_API));
|
||||
// BEGIN HotMobi
|
||||
|
|
Loading…
Reference in New Issue