From 2b0e0b1b3b70d5445b537cfcf185945ff781dde7 Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Sun, 18 Dec 2022 01:41:43 +0530 Subject: [PATCH] bug fixes --- index.html | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 705371d..5b44995 100644 --- a/index.html +++ b/index.html @@ -1187,12 +1187,12 @@ const domRefs = {} //Checks for internet connection status if (!navigator.onLine) - notify('There seems to be a problem connecting to the internet, Please check you internet connection.', 'error', '', true) + floGlobals.connectionErrorNotification = notify('There seems to be a problem connecting to the internet, Please check you internet connection.', 'error') window.addEventListener('offline', () => { - notify('There seems to be a problem connecting to the internet, Please check you internet connection.', 'error', true, true) + floGlobals.connectionErrorNotification = notify('There seems to be a problem connecting to the internet, Please check you internet connection.', 'error') }) window.addEventListener('online', () => { - getRef('notification_drawer').clearAll() + getRef('notification_drawer').remove(floGlobals.connectionErrorNotification) notify('We are back online.', 'success') }) @@ -1598,10 +1598,10 @@ options.pinned = true break; } - getRef("notification_drawer").push(message, { icon, ...options }); if (mode === 'error') { console.error(message) } + return getRef("notification_drawer").push(message, { icon, ...options }); } function getFormattedTime(timestamp, format) { @@ -3703,11 +3703,9 @@ for (const key in chat) { const { type, sender } = chat[key] if (type === 'TRANSACTION') { - if (floGlobals.pipeSigns[floID]) { - floGlobals.pipeSigns[floID].add(sender) - } else { + if (!floGlobals.pipeSigns[floID]) floGlobals.pipeSigns[floID] = new Set() - } + floGlobals.pipeSigns[floID].add(sender) } } } @@ -3767,7 +3765,7 @@ getRef('messages_container').prepend(html.node`Converstion is not encrypted until receiver replies`) } } else if (activeChat.type === 'pipeline') { - if (!messenger.pipeline[floID].disabled && !floGlobals.pipeSigns[floID].has(floDapps.user.id)) { + if (!messenger.pipeline[floID].disabled && floGlobals.pipeSigns[floID] && !floGlobals.pipeSigns[floID].has(floDapps.user.id)) { getRef('messages_container').append(html.node`
@@ -4435,6 +4433,7 @@ notify('Initiated transaction', 'success') closePopup(); getRef('send_tx').reset() + location.hash = `#/chat_page/messages?floId=${result}` }).catch(error => { notify(`Error intiating transaction \n ${error}`, 'error'); }).finally(_ => {