Use the callback even if there is nothing shared from other users issue_4140
authorChristos KK Loverdos <loverdos@gmail.com>
Thu, 18 Jul 2013 16:10:20 +0000 (19:10 +0300)
committerChristos KK Loverdos <loverdos@gmail.com>
Thu, 18 Jul 2013 16:10:20 +0000 (19:10 +0300)
Fixes #4140
Refs #4140

src/gr/grnet/pithos/web/client/othersharedtree/OtherSharedTreeViewModel.java

index 53b68c3..0023057 100644 (file)
@@ -189,6 +189,16 @@ public class OtherSharedTreeViewModel implements TreeViewModel {
                 if(userLevelDataProviderForIDs.getList().isEmpty()) {
                     userLevelDataProviderForIDs.getList().add(dummy);
                     app.LOG("OtherSharedTreeViewModel::fetchSharingUsers()::onSuccess() NO sharing users, adding [dummy]=\"", dummy, "\"");
+
+                    // #4140 Must also use the callback before returning!
+                    if(callback != null) {
+                        try {
+                            callback.execute();
+                        }
+                        catch(Exception e) {
+                            Pithos.LOG("Error callback-ing after NO sharing users found", e);
+                        }
+                    }
                     return; // Only the dummy node is present, nothing to fetch from the server
                 }