mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Defer NIP-07 permission prompts
This commit is contained in:
1 parent
a5c7d3d496
commit
e77f5f3636
2 files changed
+161
-12
No files matched your search
@@ -717,6 +717,29 @@ export default class ApplicationBootstrap {
|
||||
app.lastExperimentalWarningKey = null;
|
||||
app.lastExperimentalWarningAt = 0;
|
||||
|
||||
if (
|
||||
nostrClient &&
|
||||
typeof nostrClient.setExtensionPermissionStatusHandler === "function"
|
||||
) {
|
||||
nostrClient.setExtensionPermissionStatusHandler((status) => {
|
||||
if (!status || typeof status !== "object") {
|
||||
return;
|
||||
}
|
||||
const message =
|
||||
typeof status.message === "string" ? status.message.trim() : "";
|
||||
if (!message) {
|
||||
return;
|
||||
}
|
||||
const autoHideMs = Number.isFinite(status.autoHideMs)
|
||||
? status.autoHideMs
|
||||
: 12000;
|
||||
const showSpinner = status.showSpinner !== false;
|
||||
if (typeof app.showStatus === "function") {
|
||||
app.showStatus(message, { autoHideMs, showSpinner });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
app.pubkey = null;
|
||||
app.currentMagnetUri = null;
|
||||
app.currentVideo = null;
|
||||
|
||||
Reference in new issue
Block a user