feat: added previous and the new IP to the notifications (#2743)

* Issue ID: #2637
Added details on ip change

* added Translations to the ip change notification

* Revert "added Translations to the ip change notification"

This reverts commit 559a8069afbff5f2b67de84d58ed44fa22e10193.

* Added "From and to" portion of IP change notification

* Added "From and to" portion of IP change notification

* removed unintentional extra line at bottom of gitignore file
This commit is contained in:
Tangil Hossain Shawon
2025-10-11 15:35:01 +06:00
committed by GitHub
parent 9a70b48128
commit 3dd16e4c98

View File

@@ -119,7 +119,7 @@ class Notifications: NotificationsWrapper {
if self.localIPState {
let addr = value.laddr.v4 ?? value.laddr.v6
if addr != self.localIP {
self.newNotification(id: self.localID, title: localizedString("Local IP changed"), subtitle: nil)
self.newNotification(id: self.localID, title: localizedString("Local IP changed from \(addr ?? "unknown") to \(self.localIP ?? "unknown")"), subtitle: nil)
}
self.localIP = addr
}
@@ -127,7 +127,7 @@ class Notifications: NotificationsWrapper {
if self.publicIPState {
let addr = value.raddr.v4 ?? value.raddr.v6
if addr != self.publicIP {
self.newNotification(id: self.publicID, title: localizedString("Public IP changed"), subtitle: nil)
self.newNotification(id: self.localID, title: localizedString("Public IP changed from \(addr ?? "unknown") to \(self.localIP ?? "unknown")"), subtitle: nil)
}
self.publicIP = addr
}