Browse Source

Fixed share

master
Igor Zhukov 9 years ago
parent
commit
a208dca350
  1. 3
      app/js/controllers.js
  2. 4
      app/js/services.js

3
app/js/controllers.js

@ -2186,7 +2186,6 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -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']) @@ -2199,7 +2198,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
''
]
});
}, 100);
}, 1000);
}
function replySelect(messageID) {

4
app/js/services.js

@ -3739,12 +3739,12 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) @@ -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;

Loading…
Cancel
Save