mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 21:02:28 +00:00
Fix annoying DM relay warning and clarify settings UI
- Throttle the "Privacy warning: direct messages are using your default relays..." message so it only appears once per session/identity change. - Rename "DM Relay Hints" to "NIP-17 Relay List" in the DM Settings modal to match the warning message and reduce user confusion. - Add regression test for the warning throttling logic. Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
45d4de73b6
commit
d45b115f07
3 files changed
+35
-5
No files matched your search
@@ -1042,6 +1042,7 @@ export class ProfileModalController {
|
||||
this.adminSuperNpub = resolvedAdminSuperNpub;
|
||||
this.adminDmImageUrl = resolvedAdminDmImageUrl;
|
||||
this.bitvidWebsiteUrl = resolvedbitvidWebsiteUrl;
|
||||
this.hasShownRelayWarning = false;
|
||||
|
||||
this.internalState = {
|
||||
savedProfiles: [],
|
||||
@@ -2795,6 +2796,7 @@ export class ProfileModalController {
|
||||
? this.normalizeHexPubkey(actorPubkey)
|
||||
: this.resolveActiveDmActor();
|
||||
|
||||
this.hasShownRelayWarning = false;
|
||||
this.setDirectMessageRecipient(null, { reason: "clear" });
|
||||
this.resetAttachmentQueue({ clearInput: true });
|
||||
this.dmReadReceiptCache.clear();
|
||||
@@ -5374,6 +5376,11 @@ export class ProfileModalController {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.hasShownRelayWarning) {
|
||||
return;
|
||||
}
|
||||
this.hasShownRelayWarning = true;
|
||||
|
||||
this.showStatus(
|
||||
"Privacy warning: direct messages are using your default relays because no NIP-17 relay list is available.",
|
||||
{ autoHideMs: 5000 },
|
||||
|
||||
Reference in new issue
Block a user