diff --git a/app/js/controllers.js b/app/js/controllers.js index 5901d994..77b042a5 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -1659,7 +1659,9 @@ angular.module('myApp.controllers', ['myApp.i18n']) } function selectInlineBot (botID, $event) { - $scope.$broadcast('inline_bot_select', botID); + if ($scope.historyState.canReply) { + $scope.$broadcast('inline_bot_select', botID); + } return cancelEvent($event); } diff --git a/app/js/directives.js b/app/js/directives.js index ca5c6fe9..41c6752b 100755 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -2650,16 +2650,22 @@ angular.module('myApp.directives', ['myApp.filters']) function link($scope, element, attrs) { var chatID; var curInd = ind++; + var jump = 0; var participantsCount = 0; var participants = {}; var updateParticipants = function () { + var curJump = ++jump; participantsCount = 0; participants = {}; if (!chatID) { + update(); return; } AppProfileManager.getChatFull(chatID).then(function (chatFull) { + if (curJump != jump) { + return; + } var participantsVector = (chatFull.participants || {}).participants || []; participantsCount = participantsVector.length; angular.forEach(participantsVector, function (participant) { diff --git a/app/js/lib/utils.js b/app/js/lib/utils.js index 9cc565ce..c7430c6a 100644 --- a/app/js/lib/utils.js +++ b/app/js/lib/utils.js @@ -381,7 +381,9 @@ function templateUrl (tplName) { reply_markup: 'desktop', dialog_service: 'desktop', channel_edit_modal: 'desktop', - megagroup_edit_modal: 'desktop' + megagroup_edit_modal: 'desktop', + inline_results: 'desktop', + composer_dropdown: 'desktop' }; var layout = forceLayout[tplName] || (Config.Mobile ? 'mobile' : 'desktop'); return 'partials/' + layout + '/' + tplName + '.html'; diff --git a/app/js/message_composer.js b/app/js/message_composer.js index 76b78388..723df16a 100644 --- a/app/js/message_composer.js +++ b/app/js/message_composer.js @@ -795,7 +795,7 @@ MessageComposer.prototype.setUpPlaintext = function () { MessageComposer.prototype.onKeyEvent = function (e) { var self = this; if (e.type == 'keyup') { - console.log(dT(), 'keyup', e.keyCode); + // console.log(dT(), 'keyup', e.keyCode); this.checkAutocomplete(); var length = false; @@ -853,7 +853,7 @@ MessageComposer.prototype.onKeyEvent = function (e) { if (nextSel) { $(nextSel).addClass('composer_autocomplete_option_active'); this.scroller.scrollToNode(nextSel); - console.log(dT(), 'keydown cancel', e.keyCode); + // console.log(dT(), 'keydown cancel', e.keyCode); return cancelEvent(e); } } @@ -862,7 +862,7 @@ MessageComposer.prototype.onKeyEvent = function (e) { this.scroller.scrollToNode(nextSel); $(nextSel).addClass('composer_autocomplete_option_active'); - console.log(dT(), 'keydown cancel', e.keyCode); + // console.log(dT(), 'keydown cancel', e.keyCode); return cancelEvent(e); } @@ -893,7 +893,7 @@ MessageComposer.prototype.onKeyEvent = function (e) { self.onInlineResultSend(inlineID); } self.hideSuggestions(); - console.log(dT(), 'keydown cancel', e.keyCode); + // console.log(dT(), 'keydown cancel', e.keyCode); return cancelEvent(e); } checkSubmit = true; diff --git a/app/js/messages_manager.js b/app/js/messages_manager.js index 547bedcd..dc9e86aa 100644 --- a/app/js/messages_manager.js +++ b/app/js/messages_manager.js @@ -2844,6 +2844,9 @@ angular.module('myApp.services') foundDialog[0].top_message <= maxID) { newUnreadCount = foundDialog[0].unread_count = 0; } + if (!foundDialog[0]) { + console.error('empty found dialog', foundDialog, update); + } foundDialog[0].read_inbox_max_id = maxID; } diff --git a/app/less/app.less b/app/less/app.less index 30c8e91c..09834ebd 100644 --- a/app/less/app.less +++ b/app/less/app.less @@ -2049,6 +2049,9 @@ img.im_message_document_thumb { .im_message_date { cursor: pointer; + &:hover { + text-decoration: underline; + } } div.im_message_author,