mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
Changes in FileDisplayActivity from comments in PR#500
This commit is contained in:
parent
e790c8f83f
commit
9740acc17e
1 changed files with 12 additions and 11 deletions
|
@ -1,6 +1,6 @@
|
||||||
/* ownCloud Android client application
|
/* ownCloud Android client application
|
||||||
* Copyright (C) 2011 Bartek Przybylski
|
* Copyright (C) 2011 Bartek Przybylski
|
||||||
* Copyright (C) 2012-2013 ownCloud Inc.
|
* Copyright (C) 2012-2014 ownCloud Inc.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License version 2,
|
* it under the terms of the GNU General Public License version 2,
|
||||||
|
@ -1365,18 +1365,19 @@ FileFragment.ContainerActivity, OnNavigationListener, OnSslUntrustedCertListener
|
||||||
OCFile renamedFile = operation.getFile();
|
OCFile renamedFile = operation.getFile();
|
||||||
if (result.isSuccess()) {
|
if (result.isSuccess()) {
|
||||||
FileFragment details = getSecondFragment();
|
FileFragment details = getSecondFragment();
|
||||||
if (details != null)
|
if (details != null) {
|
||||||
if (details instanceof FileDetailFragment && renamedFile.equals(details.getFile()) ) {
|
if (details instanceof FileDetailFragment && renamedFile.equals(details.getFile()) ) {
|
||||||
((FileDetailFragment) details).updateFileDetails(renamedFile, getAccount());
|
((FileDetailFragment) details).updateFileDetails(renamedFile, getAccount());
|
||||||
showDetails(renamedFile);
|
showDetails(renamedFile);
|
||||||
|
|
||||||
} else if (details instanceof PreviewMediaFragment && renamedFile.equals(details.getFile())) {
|
} else if (details instanceof PreviewMediaFragment && renamedFile.equals(details.getFile())) {
|
||||||
((PreviewMediaFragment) details).updateFile(renamedFile);
|
((PreviewMediaFragment) details).updateFile(renamedFile);
|
||||||
if (PreviewMediaFragment.canBePreviewed(renamedFile)) {
|
if (PreviewMediaFragment.canBePreviewed(renamedFile)) {
|
||||||
int position = ((PreviewMediaFragment)details).getPosition();
|
int position = ((PreviewMediaFragment)details).getPosition();
|
||||||
startMediaPreview(renamedFile, position, true);
|
startMediaPreview(renamedFile, position, true);
|
||||||
} else {
|
} else {
|
||||||
getFileOperationsHelper().openFile(renamedFile);
|
getFileOperationsHelper().openFile(renamedFile);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue