[ui] Fix DM tab blank shell and harden profile modal tests

This commit is contained in:
thePR0M3TH3AN committed 2026-02-22 20:14:32 -05:00
1 parent ee8569a99b
commit 0af7de6c07
11 files changed
+356 -48

No files matched your search

@@ -10,6 +10,34 @@ export class ProfileDirectMessageHelper {
this.controller = controller;
}
updateDmPrivacyToggleForRecipient(...args) {
if (typeof this.mainController.updateDmPrivacyToggleForRecipient === "function") {
return this.mainController.updateDmPrivacyToggleForRecipient(...args);
}
return undefined;
}
resolveDirectMessageScheme(message) {
if (typeof this.mainController.resolveDirectMessageScheme === "function") {
return this.mainController.resolveDirectMessageScheme(message);
}
if (!message || typeof message !== "object") {
return "";
}
const scheme =
typeof message.scheme === "string"
? message.scheme
: typeof message.encryption_scheme === "string"
? message.encryption_scheme
: typeof message?.decryptor?.scheme === "string"
? message.decryptor.scheme
: "";
return typeof scheme === "string" ? scheme.trim().toLowerCase() : "";
}
resolveActiveDmActor() {
const active = this.mainController.normalizeHexPubkey(this.mainController.getActivePubkey());
if (active) {