Merge pull request #1421 from PR0M3TH3AN/dm-ui-refactor-privacy-zaps-2998709173100552567

Refactor DM UI: Move privacy settings, unify Zaps interface, and adjust layout
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2026-01-19 21:05:49 -05:00
commit a126bc2d0e
6 files changed
+266 -212

No files matched your search

+13 -17
View File
@@ -4425,6 +4425,8 @@ export class ProfileModalController {
container.innerHTML = "";
try {
const dmPrivacySettings = this.getDmPrivacySettingsSnapshot();
this.dmAppShell = new AppShell({
document,
conversations,
@@ -4433,8 +4435,12 @@ export class ProfileModalController {
messages: timeline,
threadState,
privacyMode,
dmPrivacySettings,
composerState: this.dmComposerState || "idle",
notifications: [],
zapConfig: {
signer: this.services.nostrClient,
},
onSelectConversation: (conversation) => {
void this.handleDmConversationSelect(conversation);
},
@@ -4447,6 +4453,12 @@ export class ProfileModalController {
onMarkAllRead: () => {
void this.handleDmMarkAllConversationsRead();
},
onToggleReadReceipts: (enabled) => {
this.handleReadReceiptsToggle(enabled);
},
onToggleTypingIndicators: (enabled) => {
this.handleTypingIndicatorsToggle(enabled);
},
});
} catch (error) {
this.dmAppShell = null;
@@ -5164,23 +5176,7 @@ export class ProfileModalController {
});
}
if (this.profileMessagesReadReceiptsToggle instanceof HTMLElement) {
this.profileMessagesReadReceiptsToggle.addEventListener("change", (event) => {
const toggle = event.currentTarget;
if (toggle instanceof HTMLInputElement) {
this.handleReadReceiptsToggle(toggle.checked);
}
});
}
if (this.profileMessagesTypingToggle instanceof HTMLElement) {
this.profileMessagesTypingToggle.addEventListener("change", (event) => {
const toggle = event.currentTarget;
if (toggle instanceof HTMLInputElement) {
this.handleTypingIndicatorsToggle(toggle.checked);
}
});
}
// Legacy toggles removed - handled by DMPrivacySettings in AppShell
if (this.profileLinkPreviewAutoToggle instanceof HTMLElement) {
this.profileLinkPreviewAutoToggle.addEventListener("change", (event) => {