Fix issues with multiplatform conversation displays
This commit is contained in:
@@ -12,6 +12,18 @@
|
||||
data-service="{{ option.service }}"
|
||||
data-identifier="{{ option.identifier }}"
|
||||
data-person="{{ option.person_id }}"
|
||||
data-signal-identifier="{{ option.signal_identifier|default:'' }}"
|
||||
data-whatsapp-identifier="{{ option.whatsapp_identifier|default:'' }}"
|
||||
data-instagram-identifier="{{ option.instagram_identifier|default:'' }}"
|
||||
data-xmpp-identifier="{{ option.xmpp_identifier|default:'' }}"
|
||||
data-signal-page-url="{{ option.signal_compose_url|default:'' }}"
|
||||
data-whatsapp-page-url="{{ option.whatsapp_compose_url|default:'' }}"
|
||||
data-instagram-page-url="{{ option.instagram_compose_url|default:'' }}"
|
||||
data-xmpp-page-url="{{ option.xmpp_compose_url|default:'' }}"
|
||||
data-signal-widget-url="{{ option.signal_compose_widget_url|default:'' }}"
|
||||
data-whatsapp-widget-url="{{ option.whatsapp_compose_widget_url|default:'' }}"
|
||||
data-instagram-widget-url="{{ option.instagram_compose_widget_url|default:'' }}"
|
||||
data-xmpp-widget-url="{{ option.xmpp_compose_widget_url|default:'' }}"
|
||||
data-page-url="{{ option.compose_url }}"
|
||||
data-widget-url="{{ option.compose_widget_url }}"
|
||||
{% if option.is_active %}selected{% endif %}>
|
||||
@@ -2024,6 +2036,10 @@
|
||||
if (!service || !identifier) {
|
||||
return;
|
||||
}
|
||||
if (renderMode === "page" && pageUrl) {
|
||||
window.location.assign(String(pageUrl));
|
||||
return;
|
||||
}
|
||||
if (
|
||||
String(thread.dataset.service || "").toLowerCase() === service
|
||||
&& String(thread.dataset.identifier || "") === identifier
|
||||
@@ -2065,13 +2081,6 @@
|
||||
thread.dataset.lastTs = "0";
|
||||
glanceState = { gap: null, metrics: [] };
|
||||
renderGlanceItems([]);
|
||||
if (renderMode === "page" && pageUrl) {
|
||||
try {
|
||||
window.history.replaceState({}, "", String(pageUrl));
|
||||
} catch (err) {
|
||||
// Ignore history API failures.
|
||||
}
|
||||
}
|
||||
poll(true);
|
||||
};
|
||||
|
||||
@@ -2685,14 +2694,33 @@
|
||||
if (!selected) {
|
||||
return;
|
||||
}
|
||||
const selectedService = selected.dataset.service || "";
|
||||
const selectedIdentifier = selected.dataset.identifier || "";
|
||||
const currentService = String(thread.dataset.service || "").toLowerCase();
|
||||
const serviceIdentifierKey = currentService + "Identifier";
|
||||
const servicePageUrlKey = currentService + "PageUrl";
|
||||
const serviceWidgetUrlKey = currentService + "WidgetUrl";
|
||||
let selectedService = currentService || (selected.dataset.service || "");
|
||||
let selectedIdentifier = String(
|
||||
selected.dataset[serviceIdentifierKey]
|
||||
|| selected.dataset.identifier
|
||||
|| ""
|
||||
).trim();
|
||||
const selectedPerson = selected.dataset.person || "";
|
||||
const selectedPageUrl = (
|
||||
let selectedPageUrl = (
|
||||
renderMode === "page"
|
||||
? selected.dataset.pageUrl
|
||||
: selected.dataset.widgetUrl
|
||||
? selected.dataset[servicePageUrlKey]
|
||||
: selected.dataset[serviceWidgetUrlKey]
|
||||
) || "";
|
||||
if (!selectedIdentifier) {
|
||||
selectedService = selected.dataset.service || selectedService;
|
||||
selectedIdentifier = selected.dataset.identifier || "";
|
||||
}
|
||||
if (!selectedPageUrl) {
|
||||
selectedPageUrl = (
|
||||
renderMode === "page"
|
||||
? selected.dataset.pageUrl
|
||||
: selected.dataset.widgetUrl
|
||||
) || "";
|
||||
}
|
||||
switchThreadContext(
|
||||
selectedService,
|
||||
selectedIdentifier,
|
||||
|
||||
Reference in New Issue
Block a user