Fix Gashboard encrypted chat on HTTP and open the native signer on launch

This commit is contained in:
yaya
2026-10-06 07:58:36 +01:00
parent 6faebff8ba
commit 6650ae2ca2
8 changed files with 71 additions and 33 deletions
@@ -26,7 +26,7 @@ const mediaStickers = computed(() => CHAT_STICKERS.filter((sticker) => sticker.i
const textStickers = computed(() => CHAT_STICKERS.filter((sticker) => !sticker.image));
onMounted(() => {
if (auth.isLoggedIn) void start();
if (props.open && auth.isLoggedIn) void start();
});
onUnmounted(() => {
@@ -36,10 +36,12 @@ onUnmounted(() => {
watch(
() => auth.isLoggedIn,
(loggedIn) => {
if (loggedIn) void start();
else {
if (loggedIn) {
if (props.open) void start();
} else {
sub?.close();
sub = null;
chat.clearChatSession();
messages.value = [];
profiles.value = {};
reactions.value = {};
@@ -50,16 +52,17 @@ watch(
watch(
() => props.open,
(open) => {
async (open) => {
if (open) {
if (!canSend.value) void auth.restoreSavedSigner();
if (!canSend.value) await auth.restoreSavedSigner();
if (auth.isLoggedIn) await start();
void scrollBottom();
}
},
);
async function start(): Promise<void> {
if (sub) return;
if (sub || loading.value) return;
loading.value = true;
error.value = "";
try {