Extend SyncFolderOperation to check local changes of all files and trigger uploads
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / fragment / FileDetailFragment.java
index 24f7248..bf8d798 100644 (file)
@@ -48,6 +48,7 @@ import com.owncloud.android.ui.activity.FileDisplayActivity;
 import com.owncloud.android.ui.dialog.RemoveFileDialogFragment;
 import com.owncloud.android.ui.dialog.RenameFileDialogFragment;
 import com.owncloud.android.utils.DisplayUtils;
 import com.owncloud.android.ui.dialog.RemoveFileDialogFragment;
 import com.owncloud.android.ui.dialog.RenameFileDialogFragment;
 import com.owncloud.android.utils.DisplayUtils;
+import com.owncloud.android.utils.MimetypeIconUtil;
 
 import java.lang.ref.WeakReference;
 
 
 import java.lang.ref.WeakReference;
 
@@ -251,7 +252,7 @@ public class FileDetailFragment extends FileFragment implements OnClickListener
             }
             case R.id.action_download_file:
             case R.id.action_sync_file: {
             }
             case R.id.action_download_file:
             case R.id.action_sync_file: {
-                mContainerActivity.getFileOperationsHelper().syncFile(getFile());
+                mContainerActivity.getFileOperationsHelper().syncFile(getFile(), true);
                 return true;
             }
             case R.id.action_send_file: {
                 return true;
             }
             case R.id.action_send_file: {
@@ -296,7 +297,6 @@ public class FileDetailFragment extends FileFragment implements OnClickListener
         }
     }
 
         }
     }
 
-
     /**
      * Check if the fragment was created with an empty layout. An empty fragment can't show file details, must be replaced.
      *
     /**
      * Check if the fragment was created with an empty layout. An empty fragment can't show file details, must be replaced.
      *
@@ -403,7 +403,7 @@ public class FileDetailFragment extends FileFragment implements OnClickListener
         }
         ImageView iv = (ImageView) getView().findViewById(R.id.fdIcon);
         if (iv != null) {
         }
         ImageView iv = (ImageView) getView().findViewById(R.id.fdIcon);
         if (iv != null) {
-            iv.setImageResource(DisplayUtils.getFileTypeIconId(mimetype, filename));
+            iv.setImageResource(MimetypeIconUtil.getFileTypeIconId(mimetype, filename));
         }
     }
 
         }
     }