Fixed send message bug

This commit is contained in:
Igor Zhukov 2015-11-21 19:38:32 +03:00
parent a9e95c38ab
commit 2bc6df6937
2 changed files with 5 additions and 6 deletions

View File

@ -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();
}

View File

@ -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')
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')
historyStorage.pending.unshift(messageID);
$rootScope.$broadcast('history_append', {peerID: peerID, messageID: messageID, my: true});
message.send();
setZeroTimeout(message.send);
pendingByRandomID[randomIDS] = [peerID, messageID];
}