Watch for replacements of favorite file besides than direct notifications
authorDavid A. Velasco <dvelasco@solidgear.es>
Tue, 8 Jul 2014 08:15:41 +0000 (10:15 +0200)
committerDavid A. Velasco <dvelasco@solidgear.es>
Tue, 8 Jul 2014 08:26:54 +0000 (10:26 +0200)
src/com/owncloud/android/files/OwnCloudFolderObserver.java

index db84448..d958e2f 100644 (file)
@@ -92,27 +92,14 @@ public class OwnCloudFolderObserver extends FileObserver {
         synchronized(mObservedChildren) {
             if (path != null && path.length() > 0 && mObservedChildren.containsKey(path)) {
                 
-                if ((event & FileObserver.MODIFY) != 0) {
-                    if (!mObservedChildren.get(path)) {
-                        mObservedChildren.put(path, Boolean.valueOf(true));
-                    }
-                }
-        
-                /*
-                if ((event & FileObserver.ATTRIB) != 0) {
-                    if (mObservedChildren.get(path) != true) {
-                        mObservedChildren.put(path, Boolean.valueOf(true));
-                    }
-                }
-                */
-                
-                /*
-                if ((event & FileObserver.MOVED_TO) != 0) {
+                if (    ((event & FileObserver.MODIFY) != 0) ||
+                        ((event & FileObserver.ATTRIB) != 0) ||
+                        ((event & FileObserver.MOVED_TO) != 0) ) {
+                    
                     if (mObservedChildren.get(path) != true) {
                         mObservedChildren.put(path, Boolean.valueOf(true));
                     }
                 }
-                */
                 
                 if ((event & FileObserver.CLOSE_WRITE) != 0) {
                     mObservedChildren.put(path, Boolean.valueOf(false));