浏览代码

missing share type: federated group

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky 3 年之前
父节点
当前提交
4a6aa837c8

+ 11 - 4
src/main/java/com/owncloud/android/datamodel/FileDataStorageManager.java

@@ -1373,12 +1373,19 @@ public class FileDataStorageManager {
     }
 
     // TODO shares null?
-    public void saveShares(Collection<OCShare> shares) {
-        cleanShares();
-        ArrayList<ContentProviderOperation> operations = new ArrayList<>(shares.size());
+    public void saveShares(ArrayList<OCShare> shares) {
+        cleanShares(); // 190
+
+        ArrayList<OCShare> temp = new ArrayList<>();
+        
+        for (int i = 188; i <= 189; i++) {
+            temp.add(shares.get(i));
+        }
+
+        ArrayList<ContentProviderOperation> operations = new ArrayList<>(temp.size());
 
         // prepare operations to insert or update files to save in the given folder
-        for (OCShare share : shares) {
+        for (OCShare share : temp) {
             ContentValues contentValues = createContentValueForShare(share);
 
             if (shareExistsForRemoteId(share.getRemoteId())) {

+ 1 - 1
src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java

@@ -895,7 +895,7 @@ public class OCFileListAdapter extends RecyclerView.Adapter<RecyclerView.ViewHol
     }
 
     private void parseShares(List<Object> objects) {
-        List<OCShare> shares = new ArrayList<>();
+        ArrayList<OCShare> shares = new ArrayList<>();
 
         for (Object shareObject : objects) {
             // check type before cast as of long running data fetch it is possible that old result is filled