From e52acda3342aea7c126cd2c91c51f03371d29a2b Mon Sep 17 00:00:00 2001 From: ClemDee Date: Wed, 5 Jun 2019 15:12:42 +0200 Subject: [PATCH 1/2] Set cursor to pointer on help-close element in pads --- customize.dist/src/less2/include/help.less | 1 + 1 file changed, 1 insertion(+) diff --git a/customize.dist/src/less2/include/help.less b/customize.dist/src/less2/include/help.less index a094f28ac..2859b42fa 100644 --- a/customize.dist/src/less2/include/help.less +++ b/customize.dist/src/less2/include/help.less @@ -33,6 +33,7 @@ position: absolute; top: 5px; right: 5px; + cursor: pointer; } .cp-help-text { color: @help-text-color; From f6cc3aa8c3ae2fb1184bd7e99f166ce98d4d089f Mon Sep 17 00:00:00 2001 From: ClemDee Date: Fri, 7 Jun 2019 15:43:24 +0200 Subject: [PATCH 2/2] Fix bug chat history not deleted --- www/common/common-messenger.js | 13 +++++++++++++ www/common/messenger-ui.js | 3 +-- www/common/pinpad.js | 8 ++------ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/www/common/common-messenger.js b/www/common/common-messenger.js index 05ebfea54..ce48c7a65 100644 --- a/www/common/common-messenger.js +++ b/www/common/common-messenger.js @@ -943,6 +943,16 @@ define([ cb(); }; + var clearOwnedChannel = function (id, cb) { + var channel = getChannel(id); + if (!channel) { return void cb({error: 'NO_CHANNEL'}); } + if (!store.rpc) { return void cb({error: 'RPC_NOT_READY'}); } + store.rpc.clearOwnedChannel(id, function (err) { + cb({error:err}); + }); + channel.messages = []; + } + network.on('disconnect', function () { emit('DISCONNECT'); }); @@ -1000,6 +1010,9 @@ define([ if (cmd === 'SET_CHANNEL_HEAD') { return void setChannelHead(data.id, data.sig, cb); } + if (cmd === 'CLEAR_OWNED_CHANNEL') { + return void clearOwnedChannel(data, cb); + } }; Object.freeze(messenger); diff --git a/www/common/messenger-ui.js b/www/common/messenger-ui.js index bd77d80ff..9c325d7b8 100644 --- a/www/common/messenger-ui.js +++ b/www/common/messenger-ui.js @@ -291,13 +291,12 @@ define([ UI.confirm(Messages.contacts_confirmRemoveHistory, function (yes) { if (!yes) { return; } - sframeChan.query('Q_CLEAR_OWNED_CHANNEL', id, function (e) { + execCommand('CLEAR_OWNED_CHANNEL', id, function (e) { if (e) { console.error(e); UI.alert(Messages.contacts_removeHistoryServerError); return; } - clearChannel(id); }); }); }); diff --git a/www/common/pinpad.js b/www/common/pinpad.js index c31062718..353b2c4fb 100644 --- a/www/common/pinpad.js +++ b/www/common/pinpad.js @@ -152,13 +152,9 @@ define([ if (typeof(channel) !== 'string' || channel.length !== 32) { return void cb('INVALID_ARGUMENTS'); } - rpc.send('CLEAR_OWNED_CHANNEL', channel, function (e, response) { + rpc.send('CLEAR_OWNED_CHANNEL', channel, function (e) { if (e) { return cb(e); } - if (response && response.length) { - cb(void 0, response[0]); - } else { - cb('INVALID_RESPONSE'); - } + cb(); }); };