mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
get rename message from RichDocuments
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
4221ae50d9
commit
bf8e50c1fc
1 changed files with 13 additions and 0 deletions
|
@ -405,6 +405,19 @@ public class RichDocumentsWebView extends ExternalSiteWebView {
|
|||
|
||||
downloadmanager.enqueue(request);
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void fileRename(String renameString) {
|
||||
// when shared file is renamed in another instance, we will get notified about it
|
||||
// need to change filename for sharing
|
||||
try {
|
||||
JSONObject renameJson = new JSONObject(renameString);
|
||||
String newName = renameJson.getString("NewName");
|
||||
file.setFileName(newName);
|
||||
} catch (JSONException e) {
|
||||
Log_OC.e(this, "Failed to parse rename json message: " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue