*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
protected void onResume() {
super.onResume();
Log_OC.e(TAG, "onResume() start");
protected void onResume() {
super.onResume();
Log_OC.e(TAG, "onResume() start");
// Listen for sync messages
IntentFilter syncIntentFilter = new IntentFilter(FileSyncAdapter.EVENT_FULL_SYNC_START);
// Listen for sync messages
IntentFilter syncIntentFilter = new IntentFilter(FileSyncAdapter.EVENT_FULL_SYNC_START);
Log_OC.e(TAG, "onPause() start");
if (mSyncBroadcastReceiver != null) {
unregisterReceiver(mSyncBroadcastReceiver);
Log_OC.e(TAG, "onPause() start");
if (mSyncBroadcastReceiver != null) {
unregisterReceiver(mSyncBroadcastReceiver);
OCFile renamedFile = operation.getFile();
if (result.isSuccess()) {
FileFragment details = getSecondFragment();
OCFile renamedFile = operation.getFile();
if (result.isSuccess()) {
FileFragment details = getSecondFragment();
if (details instanceof FileDetailFragment && renamedFile.equals(details.getFile()) ) {
((FileDetailFragment) details).updateFileDetails(renamedFile, getAccount());
showDetails(renamedFile);
if (details instanceof FileDetailFragment && renamedFile.equals(details.getFile()) ) {
((FileDetailFragment) details).updateFileDetails(renamedFile, getAccount());
showDetails(renamedFile);
-
- } else if (details instanceof PreviewMediaFragment && renamedFile.equals(details.getFile())) {
- ((PreviewMediaFragment) details).updateFile(renamedFile);
- if (PreviewMediaFragment.canBePreviewed(renamedFile)) {
- int position = ((PreviewMediaFragment)details).getPosition();
- startMediaPreview(renamedFile, position, true);
- } else {
- getFileOperationsHelper().openFile(renamedFile);
+
+ } else if (details instanceof PreviewMediaFragment && renamedFile.equals(details.getFile())) {
+ ((PreviewMediaFragment) details).updateFile(renamedFile);
+ if (PreviewMediaFragment.canBePreviewed(renamedFile)) {
+ int position = ((PreviewMediaFragment)details).getPosition();
+ startMediaPreview(renamedFile, position, true);
+ } else {
+ getFileOperationsHelper().openFile(renamedFile);
+ }
if (getStorageManager().getFileById(renamedFile.getParentId()).equals(getCurrentDir())) {
refreshListOfFilesFragment();
}
if (getStorageManager().getFileById(renamedFile.getParentId()).equals(getCurrentDir())) {
refreshListOfFilesFragment();
}
showDetailsIntent.putExtra(EXTRA_FILE, file);
showDetailsIntent.putExtra(EXTRA_ACCOUNT, getAccount());
startActivity(showDetailsIntent);
showDetailsIntent.putExtra(EXTRA_FILE, file);
showDetailsIntent.putExtra(EXTRA_ACCOUNT, getAccount());
startActivity(showDetailsIntent);