mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
when resuming note directly after creating, url is not working anymore, thus we need a new one
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
dfc9193b15
commit
5c1c97efa1
1 changed files with 6 additions and 6 deletions
|
@ -60,24 +60,24 @@ class TextEditorWebView : EditorWebView() {
|
|||
val editor = editorUtils.getEditor(user.get(), file.mimeType)
|
||||
|
||||
if (editor != null && editor.id == "onlyoffice") {
|
||||
getWebView().settings.userAgentString = generateOnlyOfficeUserAgent()
|
||||
webView.settings.userAgentString = generateOnlyOfficeUserAgent()
|
||||
}
|
||||
|
||||
getWebView().addJavascriptInterface(MobileInterface(), "DirectEditingMobileInterface")
|
||||
webView.addJavascriptInterface(MobileInterface(), "DirectEditingMobileInterface")
|
||||
|
||||
if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK_STRATEGY)) {
|
||||
WebSettingsCompat.setForceDarkStrategy(
|
||||
getWebView().settings,
|
||||
webView.settings,
|
||||
WebSettingsCompat.DARK_STRATEGY_WEB_THEME_DARKENING_ONLY
|
||||
)
|
||||
}
|
||||
if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK) && PlatformThemeUtil.isDarkMode(this)) {
|
||||
WebSettingsCompat.setForceDark(getWebView().settings, WebSettingsCompat.FORCE_DARK_ON)
|
||||
WebSettingsCompat.setForceDark(webView.settings, WebSettingsCompat.FORCE_DARK_ON)
|
||||
}
|
||||
|
||||
getWebView().setDownloadListener { url, _, _, _, _ -> downloadFile(Uri.parse(url)) }
|
||||
webView.setDownloadListener { url, _, _, _, _ -> downloadFile(Uri.parse(url)) }
|
||||
|
||||
loadUrl(intent.getStringExtra(ExternalSiteWebView.EXTRA_URL))
|
||||
loadUrl(null)
|
||||
}
|
||||
|
||||
override fun loadUrl(url: String?) {
|
||||
|
|
Loading…
Reference in a new issue