Browse Source

Fixed send message bug

master
Igor Zhukov 9 years ago
parent
commit
2bc6df6937
  1. 3
      app/js/directives.js
  2. 8
      app/js/messages_manager.js

3
app/js/directives.js

@ -1645,13 +1645,10 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -1645,13 +1645,10 @@ angular.module('myApp.directives', ['myApp.filters'])
composer.onMentionsUpdated();
});
var sendAwaiting = false;
$scope.$on('ui_message_before_send', function () {
sendAwaiting = true;
updateValue();
});
$scope.$on('ui_message_send', function () {
sendAwaiting = false;
if (!Config.Navigator.touch) {
focusField();
}

8
app/js/messages_manager.js

@ -1359,8 +1359,9 @@ angular.module('myApp.services') @@ -1359,8 +1359,9 @@ angular.module('myApp.services')
historyStorage.pending.unshift(messageID);
$rootScope.$broadcast('history_append', {peerID: peerID, messageID: messageID, my: true});
setZeroTimeout(message.send);
// setTimeout(function () {
message.send();
// message.send();
// }, 5000);
pendingByRandomID[randomIDS] = [peerID, messageID];
@ -1548,7 +1549,7 @@ angular.module('myApp.services') @@ -1548,7 +1549,7 @@ angular.module('myApp.services')
historyStorage.pending.unshift(messageID);
$rootScope.$broadcast('history_append', {peerID: peerID, messageID: messageID, my: true});
message.send();
setZeroTimeout(message.send);
pendingByRandomID[randomIDS] = [peerID, messageID];
}
@ -1682,7 +1683,8 @@ angular.module('myApp.services') @@ -1682,7 +1683,8 @@ angular.module('myApp.services')
historyStorage.pending.unshift(messageID);
$rootScope.$broadcast('history_append', {peerID: peerID, messageID: messageID, my: true});
message.send();
setZeroTimeout(message.send);
pendingByRandomID[randomIDS] = [peerID, messageID];
}

Loading…
Cancel
Save