From c0c631fe644c0f79a24f1aba436373236a4fbb6e Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Thu, 19 Mar 2020 20:33:48 +0100 Subject: [PATCH] fix activity image loading Signed-off-by: tobiasKaminsky --- .../android/ui/activities/ActivitiesActivity.java | 11 +++++++++-- .../ui/adapter/ActivityAndVersionListAdapter.java | 6 ++++-- .../android/ui/adapter/ActivityListAdapter.java | 2 ++ .../ui/fragment/FileDetailActivitiesFragment.java | 9 +++++++-- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/owncloud/android/ui/activities/ActivitiesActivity.java b/src/main/java/com/owncloud/android/ui/activities/ActivitiesActivity.java index 586abdd74e..c1da530238 100644 --- a/src/main/java/com/owncloud/android/ui/activities/ActivitiesActivity.java +++ b/src/main/java/com/owncloud/android/ui/activities/ActivitiesActivity.java @@ -28,6 +28,7 @@ import android.widget.LinearLayout; import android.widget.ProgressBar; import android.widget.TextView; +import com.nextcloud.client.network.ClientFactory; import com.nextcloud.common.NextcloudClient; import com.owncloud.android.R; import com.owncloud.android.datamodel.FileDataStorageManager; @@ -100,6 +101,7 @@ public class ActivitiesActivity extends FileActivity implements ActivityListInte private ActivitiesContract.ActionListener mActionListener; @Inject ActivitiesRepository activitiesRepository; @Inject FilesRepository filesRepository; + @Inject ClientFactory clientFactory; @Override protected void onCreate(Bundle savedInstanceState) { @@ -169,8 +171,13 @@ public class ActivitiesActivity extends FileActivity implements ActivityListInte PorterDuff.Mode.SRC_IN); FileDataStorageManager storageManager = new FileDataStorageManager(getAccount(), getContentResolver()); - adapter = new ActivityListAdapter(this, getUserAccountManager(), this, storageManager, - getCapabilities(), false); + adapter = new ActivityListAdapter(this, + getUserAccountManager(), + this, + storageManager, + getCapabilities(), + clientFactory, + false); recyclerView.setAdapter(adapter); LinearLayoutManager layoutManager = new LinearLayoutManager(this); diff --git a/src/main/java/com/owncloud/android/ui/adapter/ActivityAndVersionListAdapter.java b/src/main/java/com/owncloud/android/ui/adapter/ActivityAndVersionListAdapter.java index 1f96921bde..8f3d3f793e 100644 --- a/src/main/java/com/owncloud/android/ui/adapter/ActivityAndVersionListAdapter.java +++ b/src/main/java/com/owncloud/android/ui/adapter/ActivityAndVersionListAdapter.java @@ -32,6 +32,7 @@ import android.widget.ImageView; import android.widget.TextView; import com.nextcloud.client.account.CurrentAccountProvider; +import com.nextcloud.client.network.ClientFactory; import com.nextcloud.common.NextcloudClient; import com.owncloud.android.R; import com.owncloud.android.datamodel.FileDataStorageManager; @@ -62,9 +63,10 @@ public class ActivityAndVersionListAdapter extends ActivityListAdapter { ActivityListInterface activityListInterface, VersionListInterface.View versionListInterface, FileDataStorageManager storageManager, - OCCapability capability + OCCapability capability, + ClientFactory clientFactory ) { - super(context, currentAccountProvider, activityListInterface, storageManager, capability, true); + super(context, currentAccountProvider, activityListInterface, storageManager, capability, clientFactory, true); this.versionListInterface = versionListInterface; } diff --git a/src/main/java/com/owncloud/android/ui/adapter/ActivityListAdapter.java b/src/main/java/com/owncloud/android/ui/adapter/ActivityListAdapter.java index fa48e990a6..ad510103c6 100644 --- a/src/main/java/com/owncloud/android/ui/adapter/ActivityListAdapter.java +++ b/src/main/java/com/owncloud/android/ui/adapter/ActivityListAdapter.java @@ -107,6 +107,7 @@ public class ActivityListAdapter extends RecyclerView.Adapter(); @@ -115,6 +116,7 @@ public class ActivityListAdapter extends RecyclerView.Adapter