diff --git a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs
index 86355997..c05493d4 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs
+++ b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs
@@ -3131,7 +3131,7 @@ namespace ServiceLib.Resx {
}
///
- /// 查找类似 Language (Restart) 的本地化字符串。
+ /// 查找类似 Language 的本地化字符串。
///
public static string TbSettingsLanguage {
get {
diff --git a/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayN/ServiceLib/Resx/ResUI.resx
index 50f47431..a413baf7 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.resx
@@ -488,7 +488,7 @@
Follow System Theme
- Language (Restart)
+ Language
Import Share Links from clipboard (Ctrl+V)
diff --git a/v2rayN/ServiceLib/Resx/ResUI.ru.resx b/v2rayN/ServiceLib/Resx/ResUI.ru.resx
index 77d2314b..9edbf8eb 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.ru.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.ru.resx
@@ -488,7 +488,7 @@
Следить за системной темой
- Язык (требуется перезапуск)
+ Язык
Импорт массива URL из буфера обмена (Ctrl+V)
diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx
index e6c33ce8..064ccffa 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx
@@ -488,7 +488,7 @@
是否跟随系统主题
- 语言(重启)
+ 语言
从剪贴板导入分享链接 (Ctrl+V)
diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx
index 05aaf56e..642ce1ba 100644
--- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx
+++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx
@@ -487,7 +487,7 @@
是否跟隨系統主題
- 語言(重啟)
+ 語言
從剪貼簿導入分享鏈接 (Ctrl+V)
diff --git a/v2rayN/v2rayN.Desktop/ViewModels/ThemeSettingViewModel.cs b/v2rayN/v2rayN.Desktop/ViewModels/ThemeSettingViewModel.cs
index c3c664a3..a0311657 100644
--- a/v2rayN/v2rayN.Desktop/ViewModels/ThemeSettingViewModel.cs
+++ b/v2rayN/v2rayN.Desktop/ViewModels/ThemeSettingViewModel.cs
@@ -1,5 +1,6 @@
using Avalonia;
using Avalonia.Controls;
+using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Controls.Notifications;
using Avalonia.Controls.Primitives;
using Avalonia.Media;
@@ -7,6 +8,7 @@ using Avalonia.Styling;
using ReactiveUI;
using ReactiveUI.Fody.Helpers;
using System.Reactive.Linq;
+using v2rayN.Desktop.Views;
namespace v2rayN.Desktop.ViewModels
{
@@ -86,7 +88,11 @@ namespace v2rayN.Desktop.ViewModels
_config.UiItem.CurrentLanguage = CurrentLanguage;
Thread.CurrentThread.CurrentUICulture = new(CurrentLanguage);
ConfigHandler.SaveConfig(_config);
- NoticeHandler.Instance.Enqueue(ResUI.NeedRebootTips);
+
+ Window oldMainWindow = (Application.Current!.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime)!.MainWindow!;
+ (Application.Current!.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime)!.MainWindow = new MainWindow();
+ oldMainWindow.Close();
+ (Application.Current!.ApplicationLifetime as IClassicDesktopStyleApplicationLifetime)!.MainWindow!.Show();
}
});
}
diff --git a/v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs b/v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs
index 2970c1d9..9960d320 100644
--- a/v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs
+++ b/v2rayN/v2rayN/ViewModels/ThemeSettingViewModel.cs
@@ -9,6 +9,7 @@ using System.Reactive.Linq;
using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Interop;
+using v2rayN.Views;
namespace v2rayN.ViewModels
{
@@ -143,7 +144,11 @@ namespace v2rayN.ViewModels
_config.UiItem.CurrentLanguage = CurrentLanguage;
Thread.CurrentThread.CurrentUICulture = new(CurrentLanguage);
ConfigHandler.SaveConfig(_config);
- NoticeHandler.Instance.Enqueue(ResUI.NeedRebootTips);
+
+ Window oldMainWindow = Application.Current.MainWindow;
+ Application.Current.MainWindow = new MainWindow();
+ oldMainWindow.Close();
+ Application.Current.MainWindow.Show();
}
});
}