Fixed a bug that would cause the details view to be shown upon turning off and on the screen

This commit is contained in:
Jorge Antonio Diaz-Benito Soriano 2014-10-26 15:38:57 +01:00
parent 093bf4fb5c
commit b1ef5d94d4

View file

@ -304,6 +304,8 @@ public class FileDisplayActivity extends HookActivity implements
} else {
cleanSecondFragment();
if (file.isDown() && PreviewTextFragment.canBePreviewed(file))
startTextPreview(file);
}
} else {
@ -327,9 +329,9 @@ public class FileDisplayActivity extends HookActivity implements
boolean autoplay = getIntent().getBooleanExtra(PreviewVideoActivity.EXTRA_AUTOPLAY, true);
secondFragment = new PreviewMediaFragment(file, getAccount(), startPlaybackPosition, autoplay);
} else {
secondFragment = new FileDetailFragment(file, getAccount());
}
} else if (file.isDown() && PreviewTextFragment.canBePreviewed(file)) {
secondFragment = null;
} else secondFragment = new FileDetailFragment(file, getAccount());
}
return secondFragment;
}