Browse Source

Fix save messages in search

master
Igor Zhukov 6 years ago
parent
commit
e6650c5f2e
  1. 9
      app/js/controllers.js

9
app/js/controllers.js

@ -1100,6 +1100,15 @@ angular.module('myApp.controllers', ['myApp.i18n'])
var wrapDialog = searchMessages ? undefined : dialog var wrapDialog = searchMessages ? undefined : dialog
var wrappedDialog = AppMessagesManager.wrapForDialog(dialog.top_message, wrapDialog) 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) { if (searchMessages) {
wrappedDialog.unreadCount = -1 wrappedDialog.unreadCount = -1
} else { } else {

Loading…
Cancel
Save