Fix notifyicon maxlength issue

This commit is contained in:
2dust 2022-07-24 20:38:56 +08:00
parent 99fa98844c
commit 61b7997ae9
3 changed files with 5 additions and 3 deletions

View file

@ -1082,7 +1082,7 @@ namespace v2rayN.Forms
/// <param name="msg"></param> /// <param name="msg"></param>
private void notifyMsg(string msg) private void notifyMsg(string msg)
{ {
notifyMain.Text = msg; notifyMain.Text = (msg.Length <= 63 ? msg : msg.Substring(1, 63));
} }
#endregion #endregion

View file

@ -81,7 +81,8 @@ namespace v2rayN.Handler
Utils.ToJsonFile(v2rayConfig, fileName, false); Utils.ToJsonFile(v2rayConfig, fileName, false);
msg = string.Format(ResUI.SuccessfulConfiguration, $"[{config.GetGroupRemarks(node.groupId)}] {node.GetSummary()}"); //msg = string.Format(ResUI.SuccessfulConfiguration, $"[{config.GetGroupRemarks(node.groupId)}] {node.GetSummary()}");
msg = string.Format(ResUI.SuccessfulConfiguration, "");
} }
catch (Exception ex) catch (Exception ex)
{ {

View file

@ -57,7 +57,8 @@ namespace v2rayN.Handler
} }
else else
{ {
ShowMsg(true, msg); ShowMsg(false, msg);
ShowMsg(true, $"[{config.GetGroupRemarks(item.groupId)}] {item.GetSummary()}");
V2rayRestart(); V2rayRestart();
} }
} }