mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
fix activity image loading
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
fac23bf2ea
commit
c0c631fe64
4 changed files with 22 additions and 6 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -107,6 +107,7 @@ public class ActivityListAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
ActivityListInterface activityListInterface,
|
||||
FileDataStorageManager storageManager,
|
||||
OCCapability capability,
|
||||
ClientFactory clientFactory,
|
||||
boolean isDetailView
|
||||
) {
|
||||
this.values = new ArrayList<>();
|
||||
|
@ -115,6 +116,7 @@ public class ActivityListAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
this.activityListInterface = activityListInterface;
|
||||
this.storageManager = storageManager;
|
||||
this.capability = capability;
|
||||
this.clientFactory = clientFactory;
|
||||
px = getThumbnailDimension();
|
||||
this.isDetailView = isDetailView;
|
||||
}
|
||||
|
|
|
@ -256,9 +256,14 @@ public class FileDetailActivitiesFragment extends Fragment implements
|
|||
PorterDuff.Mode.SRC_IN);
|
||||
emptyContentIcon.setImageDrawable(getResources().getDrawable(R.drawable.ic_activity_light_grey));
|
||||
|
||||
adapter = new ActivityAndVersionListAdapter(getContext(), accountManager, this, this,
|
||||
adapter = new ActivityAndVersionListAdapter(getContext(),
|
||||
accountManager,
|
||||
this,
|
||||
this,
|
||||
storageManager,
|
||||
capability);
|
||||
capability,
|
||||
clientFactory
|
||||
);
|
||||
recyclerView.setAdapter(adapter);
|
||||
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
|
||||
|
|
Loading…
Reference in a new issue