Search in sources :

Example 1 with EditorWebView

use of com.owncloud.android.ui.activity.EditorWebView in project android by nextcloud.

the class TextEditorLoadUrlTask method onPostExecute.

@Override
protected void onPostExecute(String url) {
    EditorWebView editorWebView = editorWebViewWeakReference.get();
    if (editorWebView == null) {
        return;
    }
    editorWebView.onUrlLoaded(url);
}
Also used : EditorWebView(com.owncloud.android.ui.activity.EditorWebView)

Example 2 with EditorWebView

use of com.owncloud.android.ui.activity.EditorWebView in project android by nextcloud.

the class TextEditorLoadUrlTask method doInBackground.

@Override
protected String doInBackground(Void... voids) {
    final EditorWebView editorWebView = editorWebViewWeakReference.get();
    if (editorWebView == null) {
        return "";
    }
    Editor editor = FileMenuFilter.getEditor(editorWebView.getContentResolver(), user, file.getMimeType());
    if (editor == null) {
        return "";
    }
    RemoteOperationResult result = new DirectEditingOpenFileRemoteOperation(file.getRemotePath(), editor.getId()).execute(account, editorWebViewWeakReference.get());
    if (!result.isSuccess()) {
        return "";
    }
    return (String) result.getData().get(0);
}
Also used : DirectEditingOpenFileRemoteOperation(com.nextcloud.android.lib.resources.directediting.DirectEditingOpenFileRemoteOperation) RemoteOperationResult(com.owncloud.android.lib.common.operations.RemoteOperationResult) Editor(com.owncloud.android.lib.common.Editor) EditorWebView(com.owncloud.android.ui.activity.EditorWebView)

Example 3 with EditorWebView

use of com.owncloud.android.ui.activity.EditorWebView in project android by nextcloud.

the class RichDocumentsLoadUrlTask method onPostExecute.

@Override
protected void onPostExecute(String url) {
    EditorWebView editorWebView = editorWebViewWeakReference.get();
    if (editorWebView == null) {
        return;
    }
    editorWebView.onUrlLoaded(url);
}
Also used : EditorWebView(com.owncloud.android.ui.activity.EditorWebView)

Example 4 with EditorWebView

use of com.owncloud.android.ui.activity.EditorWebView in project android by nextcloud.

the class RichDocumentsLoadUrlTask method doInBackground.

@Override
protected String doInBackground(Void... voids) {
    final EditorWebView editorWebView = editorWebViewWeakReference.get();
    if (editorWebView == null) {
        return "";
    }
    RemoteOperationResult result = new RichDocumentsUrlOperation(file.getLocalId()).execute(account, editorWebView);
    if (!result.isSuccess()) {
        return "";
    }
    return (String) result.getData().get(0);
}
Also used : RemoteOperationResult(com.owncloud.android.lib.common.operations.RemoteOperationResult) EditorWebView(com.owncloud.android.ui.activity.EditorWebView) RichDocumentsUrlOperation(com.owncloud.android.operations.RichDocumentsUrlOperation)

Aggregations

EditorWebView (com.owncloud.android.ui.activity.EditorWebView)4 RemoteOperationResult (com.owncloud.android.lib.common.operations.RemoteOperationResult)2 DirectEditingOpenFileRemoteOperation (com.nextcloud.android.lib.resources.directediting.DirectEditingOpenFileRemoteOperation)1 Editor (com.owncloud.android.lib.common.Editor)1 RichDocumentsUrlOperation (com.owncloud.android.operations.RichDocumentsUrlOperation)1