Skip to content

Commit

Permalink
Fix webview break caused by updated dependency (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoonghyunCho authored and rookiejava committed Oct 12, 2021
1 parent 6b53b4c commit 3f96a80
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.Extensions.FileProviders;
using Microsoft.Maui.Handlers;
using Tizen.WebView;
Expand Down Expand Up @@ -101,7 +102,8 @@ private void StartWebViewCoreIfPossible()
var resContentRootDir = Path.Combine(TApplication.Current.DirectoryInfo.Resource, contentRootDir);
var mauiAssetFileProvider = new PhysicalFileProvider(resContentRootDir);

_webviewManager = new TizenWebViewManager(this, NativeWebView, Services!, MauiDispatcher.Instance, mauiAssetFileProvider, hostPageRelativePath);
var jsComponents = new JSComponentConfigurationStore();
_webviewManager = new TizenWebViewManager(this, NativeWebView, Services!, MauiDispatcher.Instance, mauiAssetFileProvider, jsComponents, hostPageRelativePath);
if (RootComponents != null)
{
foreach (var rootComponent in RootComponents)
Expand Down
5 changes: 3 additions & 2 deletions src/BlazorWebView/src/Maui/Tizen/TizenWebViewManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Text.Encodings.Web;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.Extensions.FileProviders;
using TWebView = Tizen.WebView.WebView;

Expand All @@ -14,8 +15,8 @@ public class TizenWebViewManager : WebViewManager
private readonly BlazorWebViewHandler _blazorMauiWebViewHandler;
private readonly TWebView _webview;

public TizenWebViewManager(BlazorWebViewHandler blazorMauiWebViewHandler, TWebView webview, IServiceProvider services, Dispatcher dispatcher, IFileProvider fileProvider, string hostPageRelativePath)
: base(services, dispatcher, new Uri(AppOrigin), fileProvider, hostPageRelativePath)
public TizenWebViewManager(BlazorWebViewHandler blazorMauiWebViewHandler, TWebView webview, IServiceProvider services, Dispatcher dispatcher, IFileProvider fileProvider, JSComponentConfigurationStore jsComponents, string hostPageRelativePath)
: base(services, dispatcher, new Uri(AppOrigin), fileProvider, jsComponents, hostPageRelativePath)
{
_blazorMauiWebViewHandler = blazorMauiWebViewHandler ?? throw new ArgumentNullException(nameof(blazorMauiWebViewHandler));
_webview = webview ?? throw new ArgumentNullException(nameof(webview));
Expand Down

0 comments on commit 3f96a80

Please sign in to comment.