mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 13:45:35 +03:00
Merge pull request #11402 from nextcloud/loadNotes
when resuming note directly after creating, url is not working anymore, thus we need a new one
This commit is contained in:
commit
10034e6bf9
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