Added successmessage to NotificationManager

This commit is contained in:
glax 2023-06-15 19:02:30 +02:00
parent 02a382a99a
commit c11e3993ea

View File

@ -68,13 +68,17 @@ public class TrangaSettings
if (values.Length != 2)
return;
notificationManagers.RemoveWhere(nm => nm.GetType() == typeof(Gotify));
notificationManagers.Add(new Gotify(values[0], values[1], logger));
Gotify newGotify = new(values[0], values[1], logger);
notificationManagers.Add(newGotify);
newGotify.SendNotification("Success!", "Gotify was added to Tranga!");
break;
case UpdateField.LunaSea:
if(values.Length != 1)
return;
notificationManagers.RemoveWhere(nm => nm.GetType() == typeof(LunaSea));
notificationManagers.Add(new LunaSea(values[0], logger));
LunaSea newLunaSea = new(values[0], logger);
notificationManagers.Add(newLunaSea);
newLunaSea.SendNotification("Success!", "LunaSea was added to Tranga!");
break;
}
}