This commit is contained in:
Igor Zhukov 2016-02-05 19:03:13 +00:00
parent 00f7229e3d
commit dadfac38b0
6 changed files with 22 additions and 6 deletions

View File

@ -1659,7 +1659,9 @@ angular.module('myApp.controllers', ['myApp.i18n'])
} }
function selectInlineBot (botID, $event) { function selectInlineBot (botID, $event) {
$scope.$broadcast('inline_bot_select', botID); if ($scope.historyState.canReply) {
$scope.$broadcast('inline_bot_select', botID);
}
return cancelEvent($event); return cancelEvent($event);
} }

View File

@ -2650,16 +2650,22 @@ angular.module('myApp.directives', ['myApp.filters'])
function link($scope, element, attrs) { function link($scope, element, attrs) {
var chatID; var chatID;
var curInd = ind++; var curInd = ind++;
var jump = 0;
var participantsCount = 0; var participantsCount = 0;
var participants = {}; var participants = {};
var updateParticipants = function () { var updateParticipants = function () {
var curJump = ++jump;
participantsCount = 0; participantsCount = 0;
participants = {}; participants = {};
if (!chatID) { if (!chatID) {
update();
return; return;
} }
AppProfileManager.getChatFull(chatID).then(function (chatFull) { AppProfileManager.getChatFull(chatID).then(function (chatFull) {
if (curJump != jump) {
return;
}
var participantsVector = (chatFull.participants || {}).participants || []; var participantsVector = (chatFull.participants || {}).participants || [];
participantsCount = participantsVector.length; participantsCount = participantsVector.length;
angular.forEach(participantsVector, function (participant) { angular.forEach(participantsVector, function (participant) {

View File

@ -381,7 +381,9 @@ function templateUrl (tplName) {
reply_markup: 'desktop', reply_markup: 'desktop',
dialog_service: 'desktop', dialog_service: 'desktop',
channel_edit_modal: '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'); var layout = forceLayout[tplName] || (Config.Mobile ? 'mobile' : 'desktop');
return 'partials/' + layout + '/' + tplName + '.html'; return 'partials/' + layout + '/' + tplName + '.html';

View File

@ -795,7 +795,7 @@ MessageComposer.prototype.setUpPlaintext = function () {
MessageComposer.prototype.onKeyEvent = function (e) { MessageComposer.prototype.onKeyEvent = function (e) {
var self = this; var self = this;
if (e.type == 'keyup') { if (e.type == 'keyup') {
console.log(dT(), 'keyup', e.keyCode); // console.log(dT(), 'keyup', e.keyCode);
this.checkAutocomplete(); this.checkAutocomplete();
var length = false; var length = false;
@ -853,7 +853,7 @@ MessageComposer.prototype.onKeyEvent = function (e) {
if (nextSel) { if (nextSel) {
$(nextSel).addClass('composer_autocomplete_option_active'); $(nextSel).addClass('composer_autocomplete_option_active');
this.scroller.scrollToNode(nextSel); this.scroller.scrollToNode(nextSel);
console.log(dT(), 'keydown cancel', e.keyCode); // console.log(dT(), 'keydown cancel', e.keyCode);
return cancelEvent(e); return cancelEvent(e);
} }
} }
@ -862,7 +862,7 @@ MessageComposer.prototype.onKeyEvent = function (e) {
this.scroller.scrollToNode(nextSel); this.scroller.scrollToNode(nextSel);
$(nextSel).addClass('composer_autocomplete_option_active'); $(nextSel).addClass('composer_autocomplete_option_active');
console.log(dT(), 'keydown cancel', e.keyCode); // console.log(dT(), 'keydown cancel', e.keyCode);
return cancelEvent(e); return cancelEvent(e);
} }
@ -893,7 +893,7 @@ MessageComposer.prototype.onKeyEvent = function (e) {
self.onInlineResultSend(inlineID); self.onInlineResultSend(inlineID);
} }
self.hideSuggestions(); self.hideSuggestions();
console.log(dT(), 'keydown cancel', e.keyCode); // console.log(dT(), 'keydown cancel', e.keyCode);
return cancelEvent(e); return cancelEvent(e);
} }
checkSubmit = true; checkSubmit = true;

View File

@ -2844,6 +2844,9 @@ angular.module('myApp.services')
foundDialog[0].top_message <= maxID) { foundDialog[0].top_message <= maxID) {
newUnreadCount = foundDialog[0].unread_count = 0; newUnreadCount = foundDialog[0].unread_count = 0;
} }
if (!foundDialog[0]) {
console.error('empty found dialog', foundDialog, update);
}
foundDialog[0].read_inbox_max_id = maxID; foundDialog[0].read_inbox_max_id = maxID;
} }

View File

@ -2049,6 +2049,9 @@ img.im_message_document_thumb {
.im_message_date { .im_message_date {
cursor: pointer; cursor: pointer;
&:hover {
text-decoration: underline;
}
} }
div.im_message_author, div.im_message_author,