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.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import com.nextcloud.client.network.ClientFactory;
|
||||||
import com.nextcloud.common.NextcloudClient;
|
import com.nextcloud.common.NextcloudClient;
|
||||||
import com.owncloud.android.R;
|
import com.owncloud.android.R;
|
||||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||||
|
@ -100,6 +101,7 @@ public class ActivitiesActivity extends FileActivity implements ActivityListInte
|
||||||
private ActivitiesContract.ActionListener mActionListener;
|
private ActivitiesContract.ActionListener mActionListener;
|
||||||
@Inject ActivitiesRepository activitiesRepository;
|
@Inject ActivitiesRepository activitiesRepository;
|
||||||
@Inject FilesRepository filesRepository;
|
@Inject FilesRepository filesRepository;
|
||||||
|
@Inject ClientFactory clientFactory;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
@ -169,8 +171,13 @@ public class ActivitiesActivity extends FileActivity implements ActivityListInte
|
||||||
PorterDuff.Mode.SRC_IN);
|
PorterDuff.Mode.SRC_IN);
|
||||||
|
|
||||||
FileDataStorageManager storageManager = new FileDataStorageManager(getAccount(), getContentResolver());
|
FileDataStorageManager storageManager = new FileDataStorageManager(getAccount(), getContentResolver());
|
||||||
adapter = new ActivityListAdapter(this, getUserAccountManager(), this, storageManager,
|
adapter = new ActivityListAdapter(this,
|
||||||
getCapabilities(), false);
|
getUserAccountManager(),
|
||||||
|
this,
|
||||||
|
storageManager,
|
||||||
|
getCapabilities(),
|
||||||
|
clientFactory,
|
||||||
|
false);
|
||||||
recyclerView.setAdapter(adapter);
|
recyclerView.setAdapter(adapter);
|
||||||
|
|
||||||
LinearLayoutManager layoutManager = new LinearLayoutManager(this);
|
LinearLayoutManager layoutManager = new LinearLayoutManager(this);
|
||||||
|
|
|
@ -32,6 +32,7 @@ import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.nextcloud.client.account.CurrentAccountProvider;
|
import com.nextcloud.client.account.CurrentAccountProvider;
|
||||||
|
import com.nextcloud.client.network.ClientFactory;
|
||||||
import com.nextcloud.common.NextcloudClient;
|
import com.nextcloud.common.NextcloudClient;
|
||||||
import com.owncloud.android.R;
|
import com.owncloud.android.R;
|
||||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||||
|
@ -62,9 +63,10 @@ public class ActivityAndVersionListAdapter extends ActivityListAdapter {
|
||||||
ActivityListInterface activityListInterface,
|
ActivityListInterface activityListInterface,
|
||||||
VersionListInterface.View versionListInterface,
|
VersionListInterface.View versionListInterface,
|
||||||
FileDataStorageManager storageManager,
|
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;
|
this.versionListInterface = versionListInterface;
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,6 +107,7 @@ public class ActivityListAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
||||||
ActivityListInterface activityListInterface,
|
ActivityListInterface activityListInterface,
|
||||||
FileDataStorageManager storageManager,
|
FileDataStorageManager storageManager,
|
||||||
OCCapability capability,
|
OCCapability capability,
|
||||||
|
ClientFactory clientFactory,
|
||||||
boolean isDetailView
|
boolean isDetailView
|
||||||
) {
|
) {
|
||||||
this.values = new ArrayList<>();
|
this.values = new ArrayList<>();
|
||||||
|
@ -115,6 +116,7 @@ public class ActivityListAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
||||||
this.activityListInterface = activityListInterface;
|
this.activityListInterface = activityListInterface;
|
||||||
this.storageManager = storageManager;
|
this.storageManager = storageManager;
|
||||||
this.capability = capability;
|
this.capability = capability;
|
||||||
|
this.clientFactory = clientFactory;
|
||||||
px = getThumbnailDimension();
|
px = getThumbnailDimension();
|
||||||
this.isDetailView = isDetailView;
|
this.isDetailView = isDetailView;
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,9 +256,14 @@ public class FileDetailActivitiesFragment extends Fragment implements
|
||||||
PorterDuff.Mode.SRC_IN);
|
PorterDuff.Mode.SRC_IN);
|
||||||
emptyContentIcon.setImageDrawable(getResources().getDrawable(R.drawable.ic_activity_light_grey));
|
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,
|
storageManager,
|
||||||
capability);
|
capability,
|
||||||
|
clientFactory
|
||||||
|
);
|
||||||
recyclerView.setAdapter(adapter);
|
recyclerView.setAdapter(adapter);
|
||||||
|
|
||||||
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
|
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
|
||||||
|
|
Loading…
Reference in a new issue