feat: rewrite the nip-4e implementation (#1)
Some checks are pending
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run
Some checks are pending
Rust / build (macos-latest, stable) (push) Waiting to run
Rust / build (ubuntu-latest, stable) (push) Waiting to run
Rust / build (windows-latest, stable) (push) Waiting to run
Make NIP-4e a core feature, not an optional feature. Note: - The UI is broken and needs to be updated in a separate PR. Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
@@ -182,16 +182,15 @@ impl TabPanel {
|
||||
|
||||
// Sync the active state to all panels
|
||||
cx.spawn(async move |view, cx| {
|
||||
_ = cx.update(|cx| {
|
||||
_ = view.update(cx, |view, cx| {
|
||||
if let Some(last_active) = view.panels.get(last_active_ix) {
|
||||
last_active.set_active(false, cx);
|
||||
}
|
||||
if let Some(active) = view.panels.get(view.active_ix) {
|
||||
active.set_active(true, cx);
|
||||
}
|
||||
});
|
||||
});
|
||||
view.update(cx, |view, cx| {
|
||||
if let Some(last_active) = view.panels.get(last_active_ix) {
|
||||
last_active.set_active(false, cx);
|
||||
}
|
||||
if let Some(active) = view.panels.get(view.active_ix) {
|
||||
active.set_active(true, cx);
|
||||
}
|
||||
})
|
||||
.ok();
|
||||
})
|
||||
.detach();
|
||||
|
||||
@@ -923,11 +922,10 @@ impl TabPanel {
|
||||
cx.spawn({
|
||||
let is_zoomed = self.is_zoomed;
|
||||
async move |view, cx| {
|
||||
_ = cx.update(|cx| {
|
||||
_ = view.update(cx, |view, cx| {
|
||||
view.set_zoomed(is_zoomed, cx);
|
||||
});
|
||||
});
|
||||
view.update(cx, |view, cx| {
|
||||
view.set_zoomed(is_zoomed, cx);
|
||||
})
|
||||
.ok();
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
|
||||
@@ -56,7 +56,7 @@ impl BlinkCursor {
|
||||
cx.spawn(async move |this, cx| {
|
||||
Timer::after(INTERVAL).await;
|
||||
if let Some(this) = this.upgrade() {
|
||||
this.update(cx, |this, cx| this.blink(epoch, cx)).ok();
|
||||
this.update(cx, |this, cx| this.blink(epoch, cx));
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
@@ -82,8 +82,7 @@ impl BlinkCursor {
|
||||
this.update(cx, |this, cx| {
|
||||
this.paused = false;
|
||||
this.blink(epoch, cx);
|
||||
})
|
||||
.ok();
|
||||
});
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
|
||||
Reference in New Issue
Block a user