mirror of https://github.com/nextcloud/android
Add fix me
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
b0fee010fa
commit
8e36d951ca
|
@ -1105,6 +1105,18 @@ public class FileDataStorageManager {
|
|||
return share;
|
||||
}
|
||||
|
||||
public OCShare getShareByShareLink(String shareLink) {
|
||||
OCShare share = null;
|
||||
Cursor cursor = getShareCursorForValue(ProviderTableMeta.OCSHARES_SHARE_LINK, shareLink);
|
||||
if (cursor != null) {
|
||||
if (cursor.moveToFirst()) {
|
||||
share = createShareInstance(cursor);
|
||||
}
|
||||
cursor.close();
|
||||
}
|
||||
return share;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks the existence of an stored {@link OCShare} matching the given remote id (not to be confused with the local
|
||||
|
|
|
@ -2389,9 +2389,22 @@ public class FileDisplayActivity extends FileActivity
|
|||
|
||||
Log_OC.d(TAG, "ShareLink is: " + shareLink);
|
||||
|
||||
|
||||
// FIXME share is nul
|
||||
OCShare share = storageManager.getShareByShareLink(shareLink);
|
||||
OCFile file = storageManager.getFileByDecryptedRemotePath(share.getPath());
|
||||
if (file != null) {
|
||||
setFile(file);
|
||||
showFile(file, "");
|
||||
} else {
|
||||
showFile(null, getString(R.string.file_not_found));
|
||||
}
|
||||
|
||||
/*
|
||||
// FIXME Nextcloud not configured.
|
||||
FetchRemoteFileTask fetchRemoteFileTask = new FetchRemoteFileTask(user, shareLink, storageManager, this);
|
||||
fetchRemoteFileTask.execute();
|
||||
*/
|
||||
}
|
||||
|
||||
private void openFileByPath(User user, String filepath) {
|
||||
|
|
|
@ -41,6 +41,7 @@ public class FetchRemoteFileTask extends AsyncTask<Void, Void, String> {
|
|||
this.fileDisplayActivity = fileDisplayActivity;
|
||||
}
|
||||
|
||||
// FIXME Nextcloud not configured.
|
||||
@Override
|
||||
protected String doInBackground(Void... voids) {
|
||||
SearchRemoteOperation searchRemoteOperation = new SearchRemoteOperation(fileId,
|
||||
|
|
Loading…
Reference in New Issue