Skip to content

Commit

Permalink
プロクシ設定が再起動時に読み込まれていなかったのを修正 #6
Browse files Browse the repository at this point in the history
  • Loading branch information
onihusube committed May 7, 2022
1 parent 76bd305 commit 43f7442
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions 2chAPIProxy/ViewModels/ViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ public void Init()
DatProxy.AllUAReplace = (UserAgent3 == "") ? (false) : (AllUAReplace);
DatProxy.BeLogin = BeLogin;
DatProxy.SetReferrer = SetReferrer;
DatProxy.Proxy = ProxyAddress;
DatProxy.EnablePostv2 = EnablePostv2;
DatProxy.EnablePostv2onPink = EnablePostv2onPink;
DatProxy.EnableUTF8Post = EnableUTF8Post;
Expand All @@ -221,7 +222,7 @@ public void Init()

//設定の適用、html変換クラス
DatProxy.HtmlConverter.UserAgent = _UserAgent4;
DatProxy.HtmlConverter.ProxyAddress = _ProxyAddress;
DatProxy.HtmlConverter.ProxyAddress = ProxyAddress;
DatProxy.HtmlConverter.IsDifferenceDetect = !_AllReturn;
DatProxy.HtmlConverter.IsAliveCheckSkip = _SkipAliveCheck;
DatProxy.HtmlConverter.Is5chURIReplace = _Replace5chURI;
Expand All @@ -230,18 +231,18 @@ public void Init()

//エラー通知用コールバック登録
DatProxy.APIMediator.PropertyChanged += (sender, e) =>
{
if (e.PropertyName == nameof(DatProxy.APIMediator.CurrentError))
{
//ここで取得しておく
string error = DatProxy.APIMediator.CurrentError;
App.Current.Dispatcher.BeginInvoke((Action)(() =>
{
this.SystemLog = error;
}));
}
};
{
if (e.PropertyName == nameof(DatProxy.APIMediator.CurrentError))
{
//ここで取得しておく
string error = DatProxy.APIMediator.CurrentError;
App.Current.Dispatcher.BeginInvoke((Action)(() =>
{
this.SystemLog = error;
}));
}
};

DatProxy.HtmlConverter.PropertyChanged += (sender, e) =>
{
Expand Down

0 comments on commit 43f7442

Please sign in to comment.