Fix returning from inner chats
Hidden user toast Fix sending stickers from helper
This commit is contained in:
parent
6dda2a1d62
commit
22b3858864
@ -51,6 +51,7 @@ import PeerTitle from "../peerTitle";
|
||||
import { forEachReverse } from "../../helpers/array";
|
||||
import findUpClassName from "../../helpers/dom/findUpClassName";
|
||||
import findUpTag from "../../helpers/dom/findUpTag";
|
||||
import { toast } from "../toast";
|
||||
|
||||
const USE_MEDIA_TAILS = false;
|
||||
const IGNORE_ACTIONS: Message.messageService['action']['_'][] = [/* 'messageActionHistoryClear' */];
|
||||
@ -828,8 +829,8 @@ export default class ChatBubbles {
|
||||
//appSidebarRight.forwardTab.open([mid]);
|
||||
return;
|
||||
} else if(target.classList.contains('peer-title') || target.classList.contains('name')) {
|
||||
target = findUpClassName(target, 'name');
|
||||
const peerId = +target.dataset.peerId;
|
||||
|
||||
const savedFrom = target.dataset.savedFrom;
|
||||
if(savedFrom) {
|
||||
const splitted = savedFrom.split('_');
|
||||
@ -840,6 +841,8 @@ export default class ChatBubbles {
|
||||
} else {
|
||||
if(peerId) {
|
||||
this.chat.appImManager.setInnerPeer(peerId);
|
||||
} else {
|
||||
toast(I18n.format('HidAccount', true));
|
||||
}
|
||||
}
|
||||
|
||||
@ -849,6 +852,8 @@ export default class ChatBubbles {
|
||||
|
||||
if(peerId) {
|
||||
this.chat.appImManager.setInnerPeer(peerId);
|
||||
} else {
|
||||
toast(I18n.format('HidAccount', true));
|
||||
}
|
||||
|
||||
return;
|
||||
@ -883,6 +888,8 @@ export default class ChatBubbles {
|
||||
|
||||
if(peerId) {
|
||||
this.chat.appImManager.setInnerPeer(peerId);
|
||||
} else {
|
||||
toast(I18n.format('HidAccount', true));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2394,6 +2401,7 @@ export default class ChatBubbles {
|
||||
///////this.log('message to render hidden', message);
|
||||
title = document.createElement('span');
|
||||
title.innerHTML = RichTextProcessor.wrapEmojiText(message.fwd_from.from_name);
|
||||
title.classList.add('peer-title');
|
||||
//title = message.fwd_from.from_name;
|
||||
bubble.classList.add('hidden-profile');
|
||||
} else {
|
||||
|
@ -82,10 +82,7 @@ export default class StickersHelper {
|
||||
private init() {
|
||||
this.container = document.createElement('div');
|
||||
this.container.classList.add('stickers-helper', 'z-depth-1');
|
||||
|
||||
this.stickersContainer = document.createElement('div');
|
||||
this.stickersContainer.classList.add('stickers-helper-stickers', 'super-stickers');
|
||||
this.stickersContainer.addEventListener('click', (e) => {
|
||||
this.container.addEventListener('click', (e) => {
|
||||
if(!findUpClassName(e.target, 'super-sticker')) {
|
||||
return;
|
||||
}
|
||||
@ -93,6 +90,9 @@ export default class StickersHelper {
|
||||
EmoticonsDropdown.onMediaClick(e, true);
|
||||
});
|
||||
|
||||
this.stickersContainer = document.createElement('div');
|
||||
this.stickersContainer.classList.add('stickers-helper-stickers', 'super-stickers');
|
||||
|
||||
this.container.append(this.stickersContainer);
|
||||
|
||||
this.scrollable = new Scrollable(this.container);
|
||||
|
@ -379,6 +379,7 @@ const lang = {
|
||||
"one_value": "%1$d sticker",
|
||||
"other_value": "%1$d stickers"
|
||||
},
|
||||
"HidAccount": "The account was hidden by the user",
|
||||
|
||||
// * macos
|
||||
"AccountSettings.Filters": "Chat Folders",
|
||||
|
@ -622,7 +622,8 @@ export class AppImManager {
|
||||
spliced = this.chats.splice(fromIndex, this.chats.length - fromIndex);
|
||||
}
|
||||
|
||||
for(let i = 0; i < spliced.length; ++i) {
|
||||
// * -1 because one item is being sliced when closing the chat by calling .removeByType
|
||||
for(let i = 0; i < spliced.length - 1; ++i) {
|
||||
appNavigationController.removeByType('chat', true);
|
||||
}
|
||||
|
||||
|
@ -481,10 +481,6 @@ $chat-helper-size: 39px;
|
||||
}
|
||||
}
|
||||
|
||||
/* @include respond-to(not-handhelds) {
|
||||
border-left: 1px solid var(--border-color);
|
||||
} */
|
||||
|
||||
@include respond-to(floating-left-sidebar) {
|
||||
position: fixed !important;
|
||||
left: 0;
|
||||
@ -492,7 +488,10 @@ $chat-helper-size: 39px;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
transform: translateZ(0);
|
||||
transition: transform var(--layer-transition) !important;
|
||||
|
||||
@include animation-level(2) {
|
||||
transition: transform var(--layer-transition);
|
||||
}
|
||||
|
||||
body.is-left-column-shown & {
|
||||
transform: translate3d(26.5rem, 0, 0);
|
||||
|
@ -144,6 +144,10 @@ $bubble-margin: .25rem;
|
||||
&:before, &:after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
|
||||
&.channel-post {
|
||||
|
Loading…
x
Reference in New Issue
Block a user