Fix save messages in search

This commit is contained in:
Igor Zhukov 2018-12-01 00:08:01 +04:00
parent 488e86cc48
commit e6650c5f2e

View File

@ -1100,6 +1100,15 @@ angular.module('myApp.controllers', ['myApp.i18n'])
var wrapDialog = searchMessages ? undefined : dialog
var wrappedDialog = AppMessagesManager.wrapForDialog(dialog.top_message, wrapDialog)
if (searchMessages &&
$scope.searchPeer) {
var message = AppMessagesManager.getMessage(dialog.top_message)
if (message.fromID > 0) {
wrappedDialog.peerID = message.fromID
wrappedDialog.foundInHistory = true
}
}
if (searchMessages) {
wrappedDialog.unreadCount = -1
} else {