Fixed reply to message in message form
This commit is contained in:
parent
178ed26f7e
commit
471e3b3114
@ -2241,7 +2241,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
text = RichTextProcessor.parseEmojis(text)
|
||||
|
||||
var options = {
|
||||
replyToMsgID: $scope.draftMessage.replyToMessage && $scope.draftMessage.replyToMessage.mid,
|
||||
replyToMsgID: $scope.draftMessage.replyToMsgID,
|
||||
clearDraft: true
|
||||
}
|
||||
do {
|
||||
@ -2462,7 +2462,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
}
|
||||
|
||||
function replySelect (messageID, byUser) {
|
||||
$scope.draftMessage.replyToMessage = AppMessagesManager.wrapSingleMessage(messageID)
|
||||
$scope.draftMessage.replyToMsgID = messageID
|
||||
$scope.$broadcast('ui_peer_reply')
|
||||
replyToMarkup = false
|
||||
|
||||
@ -2475,15 +2475,15 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
}
|
||||
|
||||
function replyClear (byUser) {
|
||||
var message = $scope.draftMessage.replyToMessage
|
||||
if (message &&
|
||||
var mid = $scope.draftMessage.replyToMsgID
|
||||
if (mid &&
|
||||
$scope.historyState.replyKeyboard &&
|
||||
$scope.historyState.replyKeyboard.mid == message.mid &&
|
||||
$scope.historyState.replyKeyboard.mid == mid &&
|
||||
!$scope.historyState.replyKeyboard.pFlags.hidden) {
|
||||
$scope.historyState.replyKeyboard.pFlags.hidden = true
|
||||
$scope.$broadcast('ui_keyboard_update')
|
||||
}
|
||||
delete $scope.draftMessage.replyToMessage
|
||||
delete $scope.draftMessage.replyToMsgID
|
||||
$scope.$broadcast('ui_peer_reply')
|
||||
|
||||
if (byUser) {
|
||||
@ -2575,10 +2575,9 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
}
|
||||
}
|
||||
if ($scope.curDialog.peerID) {
|
||||
var replyToMessage = $scope.draftMessage.replyToMessage
|
||||
DraftsManager.changeDraft($scope.curDialog.peerID, {
|
||||
text: newVal,
|
||||
replyToMsgID: replyToMessage && replyToMessage.mid
|
||||
replyToMsgID: $scope.draftMessage.replyToMsgID
|
||||
})
|
||||
checkInlinePattern(newVal)
|
||||
}
|
||||
@ -2664,11 +2663,11 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
return
|
||||
}
|
||||
var options = {
|
||||
replyToMsgID: $scope.draftMessage.replyToMessage && $scope.draftMessage.replyToMessage.mid,
|
||||
replyToMsgID: $scope.draftMessage.replyToMsgID,
|
||||
isMedia: $scope.draftMessage.isMedia
|
||||
}
|
||||
|
||||
delete $scope.draftMessage.replyToMessage
|
||||
delete $scope.draftMessage.replyToMsgID
|
||||
|
||||
if (newVal[0].lastModified) {
|
||||
newVal.sort(function (file1, file2) {
|
||||
@ -2699,7 +2698,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
}
|
||||
}
|
||||
var options = {
|
||||
replyToMsgID: $scope.draftMessage.replyToMessage && $scope.draftMessage.replyToMessage.mid
|
||||
replyToMsgID: $scope.draftMessage.replyToMsgID
|
||||
}
|
||||
AppMessagesManager.sendOther($scope.curDialog.peerID, inputMedia, options)
|
||||
$scope.$broadcast('ui_message_send')
|
||||
@ -2736,7 +2735,7 @@ angular.module('myApp.controllers', ['myApp.i18n'])
|
||||
}
|
||||
|
||||
var options = {
|
||||
replyToMsgID: $scope.draftMessage.replyToMessage && $scope.draftMessage.replyToMessage.mid
|
||||
replyToMsgID: $scope.draftMessage.replyToMsgID
|
||||
}
|
||||
AppInlineBotsManager.sendInlineResult($scope.curDialog.peerID, qID, options)
|
||||
fwdsSend()
|
||||
|
@ -176,7 +176,7 @@
|
||||
|
||||
<div class="im_send_form_wrap1">
|
||||
|
||||
<div class="im_send_form_wrap clearfix" ng-controller="AppImSendController" ng-class="{im_send_reply_form_wrap: draftMessage.replyToMessage != null}">
|
||||
<div class="im_send_form_wrap clearfix" ng-controller="AppImSendController" ng-class="{im_send_reply_form_wrap: draftMessage.replyToMsgID > 0}">
|
||||
|
||||
<a class="pull-right im_panel_peer_photo" my-peer-photolink="historyPeer.id" img-class="im_panel_peer_photo" watch="true" ng-show="!draftMessage.isBroadcast">
|
||||
<i class="icon im_panel_peer_online" ng-show="historyPeer.id > 0 && historyPeer.data.status._ == 'userStatusOnline'"></i>
|
||||
@ -187,9 +187,9 @@
|
||||
|
||||
<div class="im_send_form_inline_results" my-inline-results="inlineResults"></div>
|
||||
|
||||
<div class="im_send_reply_wrap" ng-if="draftMessage.replyToMessage != null">
|
||||
<div class="im_send_reply_wrap" ng-if="draftMessage.replyToMsgID > 0">
|
||||
<a class="im_send_reply_cancel" ng-mousedown="draftMessage.replyClear(true)"><i class="icon icon-reply-bar"></i><i class="icon icon-reply-bar"></i></a>
|
||||
<a class="im_message_reply_wrap" my-reply-message="draftMessage.replyToMessage" watch="true"></a>
|
||||
<a class="im_message_reply_wrap" my-reply-message="draftMessage.replyToMsgID" watch="true"></a>
|
||||
</div>
|
||||
|
||||
<div class="im_send_reply_wrap im_send_fwds_wrap" ng-if="draftMessage.fwdMessages.length > 0">
|
||||
|
@ -138,9 +138,9 @@
|
||||
<div class="im_send_form_wrap clearfix" ng-controller="AppImSendController">
|
||||
<form my-send-form draft-message="draftMessage" mentions="mentions" commands="commands" class="im_send_form" ng-class="{im_send_form_empty: !draftMessage.text.length, composer_progress_enabled: draftMessage.inlineProgress}">
|
||||
|
||||
<div class="im_send_reply_wrap" ng-if="draftMessage.replyToMessage != null">
|
||||
<div class="im_send_reply_wrap" ng-if="draftMessage.replyToMsgID > 0">
|
||||
<a class="im_send_reply_cancel" ng-mousedown="draftMessage.replyClear()"><i class="icon icon-reply-bar"></i><i class="icon icon-reply-bar"></i></a>
|
||||
<a class="im_message_reply_wrap" my-reply-message="draftMessage.replyToMessage" watch="true"></a>
|
||||
<a class="im_message_reply_wrap" my-reply-message="draftMessage.replyToMsgID" watch="true"></a>
|
||||
</div>
|
||||
|
||||
<div class="im_send_reply_wrap im_send_fwds_wrap" ng-if="draftMessage.fwdMessages.length > 0">
|
||||
|
Loading…
Reference in New Issue
Block a user