Clear message from chat box immediately on pressing enter

This commit is contained in:
James Allen 2014-07-31 12:46:44 +01:00
parent e1c14b0cf8
commit e6c04bbeeb

View file

@ -21,10 +21,10 @@ define [
ide.$scope.$broadcast "chat:resetUnreadMessages" ide.$scope.$broadcast "chat:resetUnreadMessages"
$scope.sendMessage = -> $scope.sendMessage = ->
message = $scope.newMessageContent
$scope.newMessageContent = ""
chatMessages chatMessages
.sendMessage $scope.newMessageContent .sendMessage message
.then () ->
$scope.newMessageContent = ""
$scope.loadMoreMessages = -> $scope.loadMoreMessages = ->
chatMessages.loadMoreMessages() chatMessages.loadMoreMessages()