style<Repository>: normalize repository's path

This commit is contained in:
leo 2024-03-01 13:40:12 +08:00
parent 1c005983c7
commit e3a7abe776
7 changed files with 26 additions and 19 deletions

View file

@ -66,17 +66,15 @@ namespace SourceGit {
public static void RaiseException(string context, string message) {
if (Current is App app && app._notificationReceiver != null) {
var ctx = context.Replace('\\', '/');
var notice = new Models.Notification() { IsError = true, Message = message };
app._notificationReceiver.OnReceiveNotification(ctx, notice);
app._notificationReceiver.OnReceiveNotification(context, notice);
}
}
public static void SendNotification(string context, string message) {
if (Current is App app && app._notificationReceiver != null) {
var ctx = context.Replace('\\', '/');
var notice = new Models.Notification() { IsError = false, Message = message };
app._notificationReceiver.OnReceiveNotification(ctx, notice);
app._notificationReceiver.OnReceiveNotification(context, notice);
}
}