Fixed infinity loop in media previews when the icon in the action bar (UP button) is pressed

This commit is contained in:
David A. Velasco 2013-03-01 16:05:19 +01:00
parent 48e7e40394
commit cf2ba0bc07

View file

@ -258,7 +258,11 @@ public class FileDetailActivity extends SherlockFragmentActivity implements File
private void backToDisplayActivity() { private void backToDisplayActivity() {
Intent intent = new Intent(this, FileDisplayActivity.class); Intent intent = new Intent(this, FileDisplayActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra(FileDetailFragment.EXTRA_FILE, mFile); OCFile targetFile = null;
if (mFile != null) {
targetFile = mStorageManager.getFileById(mFile.getParentId());
}
intent.putExtra(FileDetailFragment.EXTRA_FILE, targetFile);
intent.putExtra(FileDetailFragment.EXTRA_ACCOUNT, mAccount); intent.putExtra(FileDetailFragment.EXTRA_ACCOUNT, mAccount);
startActivity(intent); startActivity(intent);
finish(); finish();