Browse Source

Bugfixes

master
Igor Zhukov 8 years ago
parent
commit
dadfac38b0
  1. 4
      app/js/controllers.js
  2. 6
      app/js/directives.js
  3. 4
      app/js/lib/utils.js
  4. 8
      app/js/message_composer.js
  5. 3
      app/js/messages_manager.js
  6. 3
      app/less/app.less

4
app/js/controllers.js

@ -1659,7 +1659,9 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -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);
}

6
app/js/directives.js

@ -2650,16 +2650,22 @@ angular.module('myApp.directives', ['myApp.filters']) @@ -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) {

4
app/js/lib/utils.js

@ -381,7 +381,9 @@ function templateUrl (tplName) { @@ -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';

8
app/js/message_composer.js

@ -795,7 +795,7 @@ MessageComposer.prototype.setUpPlaintext = function () { @@ -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) { @@ -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) { @@ -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) { @@ -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;

3
app/js/messages_manager.js

@ -2844,6 +2844,9 @@ angular.module('myApp.services') @@ -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;
}

3
app/less/app.less

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

Loading…
Cancel
Save