From a208dca35008d155ae23539ea0a086374433c3ac Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Tue, 13 Oct 2015 17:33:17 +0200 Subject: [PATCH] Fixed share --- app/js/controllers.js | 3 +-- app/js/services.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/js/controllers.js b/app/js/controllers.js index 2bdd9460..a05e89e5 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -2186,7 +2186,6 @@ angular.module('myApp.controllers', ['myApp.i18n']) } function applyShare (e, shareData) { - console.log('apply share', shareData); var url = shareData.url; var text = shareData.text || ''; @@ -2199,7 +2198,7 @@ angular.module('myApp.controllers', ['myApp.i18n']) '' ] }); - }, 100); + }, 1000); } function replySelect(messageID) { diff --git a/app/js/services.js b/app/js/services.js index 1920fc34..7afdd746 100755 --- a/app/js/services.js +++ b/app/js/services.js @@ -3739,12 +3739,12 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) return true; } - if (matches = url.match(/^msg_url\?url=(.+)(?:&text=(.*))?$/)) { + if (matches = url.match(/^msg_url\?url=([^&]+)(?:&text=(.*))?$/)) { PeersSelectService.selectPeer({ confirm_type: 'SHARE_URL' }).then(function (toPeerString) { var url = decodeURIComponent(matches[1]); - var text = matches[3] ? decodeURIComponent(matches[3]) : ''; + var text = matches[2] ? decodeURIComponent(matches[2]) : ''; $rootScope.$broadcast('history_focus', {peerString: toPeerString, shareUrl: url, shareText: text}); }); return true;