mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
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:
committed by
GitHub
parent
9a70b48128
commit
3dd16e4c98
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user