|
@@ -60,6 +60,8 @@ import com.owncloud.android.ui.fragment.FileFragment;
|
|
|
import com.owncloud.android.utils.MimeTypeUtil;
|
|
|
import com.owncloud.android.utils.theme.ThemeToolbarUtils;
|
|
|
|
|
|
+import java.io.Serializable;
|
|
|
+
|
|
|
import javax.inject.Inject;
|
|
|
|
|
|
import androidx.annotation.NonNull;
|
|
@@ -137,8 +139,9 @@ public class PreviewImageActivity extends FileActivity implements
|
|
|
|
|
|
private void initViewPager(User user) {
|
|
|
// virtual folder
|
|
|
- if (getIntent().getSerializableExtra(EXTRA_VIRTUAL_TYPE) != null) {
|
|
|
- VirtualFolderType type = (VirtualFolderType) getIntent().getSerializableExtra(EXTRA_VIRTUAL_TYPE);
|
|
|
+ final Serializable virtualFolderType = getIntent().getSerializableExtra(EXTRA_VIRTUAL_TYPE);
|
|
|
+ if (virtualFolderType != null && virtualFolderType != VirtualFolderType.NONE) {
|
|
|
+ VirtualFolderType type = (VirtualFolderType) virtualFolderType;
|
|
|
|
|
|
mPreviewImagePagerAdapter = new PreviewImagePagerAdapter(getSupportFragmentManager(),
|
|
|
type,
|