Fixed send message bug
This commit is contained in:
parent
a9e95c38ab
commit
2bc6df6937
@ -1645,13 +1645,10 @@ angular.module('myApp.directives', ['myApp.filters'])
|
|||||||
composer.onMentionsUpdated();
|
composer.onMentionsUpdated();
|
||||||
});
|
});
|
||||||
|
|
||||||
var sendAwaiting = false;
|
|
||||||
$scope.$on('ui_message_before_send', function () {
|
$scope.$on('ui_message_before_send', function () {
|
||||||
sendAwaiting = true;
|
|
||||||
updateValue();
|
updateValue();
|
||||||
});
|
});
|
||||||
$scope.$on('ui_message_send', function () {
|
$scope.$on('ui_message_send', function () {
|
||||||
sendAwaiting = false;
|
|
||||||
if (!Config.Navigator.touch) {
|
if (!Config.Navigator.touch) {
|
||||||
focusField();
|
focusField();
|
||||||
}
|
}
|
||||||
|
@ -1359,8 +1359,9 @@ angular.module('myApp.services')
|
|||||||
historyStorage.pending.unshift(messageID);
|
historyStorage.pending.unshift(messageID);
|
||||||
$rootScope.$broadcast('history_append', {peerID: peerID, messageID: messageID, my: true});
|
$rootScope.$broadcast('history_append', {peerID: peerID, messageID: messageID, my: true});
|
||||||
|
|
||||||
|
setZeroTimeout(message.send);
|
||||||
// setTimeout(function () {
|
// setTimeout(function () {
|
||||||
message.send();
|
// message.send();
|
||||||
// }, 5000);
|
// }, 5000);
|
||||||
|
|
||||||
pendingByRandomID[randomIDS] = [peerID, messageID];
|
pendingByRandomID[randomIDS] = [peerID, messageID];
|
||||||
@ -1548,7 +1549,7 @@ angular.module('myApp.services')
|
|||||||
historyStorage.pending.unshift(messageID);
|
historyStorage.pending.unshift(messageID);
|
||||||
$rootScope.$broadcast('history_append', {peerID: peerID, messageID: messageID, my: true});
|
$rootScope.$broadcast('history_append', {peerID: peerID, messageID: messageID, my: true});
|
||||||
|
|
||||||
message.send();
|
setZeroTimeout(message.send);
|
||||||
|
|
||||||
pendingByRandomID[randomIDS] = [peerID, messageID];
|
pendingByRandomID[randomIDS] = [peerID, messageID];
|
||||||
}
|
}
|
||||||
@ -1682,7 +1683,8 @@ angular.module('myApp.services')
|
|||||||
historyStorage.pending.unshift(messageID);
|
historyStorage.pending.unshift(messageID);
|
||||||
$rootScope.$broadcast('history_append', {peerID: peerID, messageID: messageID, my: true});
|
$rootScope.$broadcast('history_append', {peerID: peerID, messageID: messageID, my: true});
|
||||||
|
|
||||||
message.send();
|
setZeroTimeout(message.send);
|
||||||
|
|
||||||
pendingByRandomID[randomIDS] = [peerID, messageID];
|
pendingByRandomID[randomIDS] = [peerID, messageID];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user