Prune dead code and key elements by stable ids
This commit is contained in:
@@ -52,7 +52,7 @@ pub fn init(window: &mut Window, cx: &mut App) -> Entity<Workspace> {
|
||||
cx.new(|cx| Workspace::new(window, cx))
|
||||
}
|
||||
|
||||
struct DeviceNotifcation;
|
||||
struct DeviceNotification;
|
||||
struct MsgRelayNotification;
|
||||
|
||||
#[derive(Action, Clone, PartialEq, Eq, Deserialize)]
|
||||
@@ -141,7 +141,7 @@ impl Workspace {
|
||||
one shown there before approving.";
|
||||
|
||||
let note = Notification::new()
|
||||
.id::<DeviceNotifcation>()
|
||||
.id::<DeviceNotification>()
|
||||
.autohide(false)
|
||||
.title(format!("Wait for approval · {code}"))
|
||||
.message(MSG)
|
||||
@@ -155,7 +155,7 @@ impl Workspace {
|
||||
from the settings.";
|
||||
|
||||
let note = Notification::new()
|
||||
.id::<DeviceNotifcation>()
|
||||
.id::<DeviceNotification>()
|
||||
.message(MSG)
|
||||
.with_type(NotificationType::Info)
|
||||
.action(|_this, _window, _cx| {
|
||||
@@ -165,7 +165,7 @@ impl Workspace {
|
||||
device.update(cx, |this, cx| {
|
||||
this.get_announcement(cx);
|
||||
});
|
||||
window.remove_notification::<DeviceNotifcation>(cx);
|
||||
window.remove_notification::<DeviceNotification>(cx);
|
||||
},
|
||||
)
|
||||
});
|
||||
@@ -174,7 +174,7 @@ impl Workspace {
|
||||
}
|
||||
DeviceEvent::Set => {
|
||||
let note = Notification::new()
|
||||
.id::<DeviceNotifcation>()
|
||||
.id::<DeviceNotification>()
|
||||
.message("Encryption Key has been set")
|
||||
.with_type(NotificationType::Success);
|
||||
|
||||
@@ -231,14 +231,6 @@ impl Workspace {
|
||||
::nip60::WalletEvent::Error(error) => {
|
||||
window.push_notification(Notification::error(error.clone()), cx);
|
||||
}
|
||||
::nip60::WalletEvent::TokenCreated(_) => {
|
||||
window.push_notification(
|
||||
Notification::new()
|
||||
.message("Cashu token created, copy it from the wallet panel")
|
||||
.with_type(NotificationType::Success),
|
||||
cx,
|
||||
);
|
||||
}
|
||||
::nip60::WalletEvent::Updated => {}
|
||||
},
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user