FileMenuFilter mf = new FileMenuFilter(
getFile(),
mContainerActivity.getStorageManager().getAccount(),
+ mContainerActivity,
getSherlockActivity()
);
mf.filter(menu);
// configure UI for depending upon local state of the file
FileDownloaderBinder downloaderBinder = mContainerActivity.getFileDownloaderBinder();
FileUploaderBinder uploaderBinder = mContainerActivity.getFileUploaderBinder();
- if (transferring || file.isDownloading() || file.isUploading()) {
+ if (transferring ||
+ (downloaderBinder != null && downloaderBinder.isDownloading(mAccount, file)) ||
+ (uploaderBinder != null && uploaderBinder.isUploading(mAccount, file))
+ ) {
setButtonsForTransferring();
} else if (file.isDown()) {
getView().findViewById(R.id.fdProgressBlock).setVisibility(View.VISIBLE);
TextView progressText = (TextView)getView().findViewById(R.id.fdProgressText);
progressText.setVisibility(View.VISIBLE);
- if (getFile().isDownloading()) {
+ FileDownloaderBinder downloaderBinder = mContainerActivity.getFileDownloaderBinder();
+ FileUploaderBinder uploaderBinder = mContainerActivity.getFileUploaderBinder();
+ //if (getFile().isDownloading()) {
+ if (downloaderBinder != null && downloaderBinder.isDownloading(mAccount, getFile())) {
progressText.setText(R.string.downloader_download_in_progress_ticker);
- } else if (getFile().isUploading()) {
+ } else if (uploaderBinder != null && uploaderBinder.isUploading(mAccount, getFile())) {
progressText.setText(R.string.uploader_upload_in_progress_ticker);
}
}