telegram-tt/dist/884.f3881da85250209e0957.js

2 lines
23 KiB
JavaScript
Raw Normal View History

2021-12-10 18:35:23 +01:00
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[884],{2275:(t,e,a)=>{a.d(e,{Z:()=>u});var s=a(4050),n=a(5116),o=a(782),i=a(1638),d=a(2858),r=a(2340),c=a(9107),l=a(3103),h=a(231);const u=(0,s.X$)((0,n.c$)(((t,{userId:e})=>{const a=(0,i.jr)(t),s=e&&(0,i.dy)(t,e);return{chat:a,contactName:s?(0,d.Vl)(s):void 0}}),((t,e)=>(0,o.ei)(e,["deleteChatMember"])))((({isOpen:t,chat:e,userId:a,contactName:n,onClose:o,deleteChatMember:i})=>{const d=(0,c.Z)(),u=(0,s.I4)((()=>{i({chatId:e.id,userId:a}),o()}),[e,i,o,a]);if(e&&a)return s.ZP.createElement(l.Z,{isOpen:t,onClose:o,onEnter:u,className:"delete",title:d("GroupRemoved.Remove")},s.ZP.createElement("p",null,(0,r.Z)(d("PeerInfo.Confirm.RemovePeer",n))),s.ZP.createElement(h.Z,{color:"danger",className:"confirm-dialog-button",isText:!0,onClick:u},d("lng_box_remove")),s.ZP.createElement(h.Z,{className:"confirm-dialog-button",isText:!0,onClick:o},d("Cancel")))})))},6071:(t,e,a)=>{a.d(e,{Z:()=>o});var s=a(4050),n=a(9118);const o=(t,e=!1)=>(0,s.Ye)((()=>(0,n.P2)((t=>t()),t,!e)),[t,e])},6204:(t,e,a)=>{a.d(e,{f:()=>y,C:()=>b});var s=a(5116),n=a(6137),o=a(1713),i=a(3716),d=a(1226),r=a(307),c=a(1638),l=a(782),h=a(9118),u=a(2858),p=a(3551),f=a(4446),C=a(2607);const I=(0,h.P2)((t=>t()),300,!0),m=(0,h.P2)((t=>t()),3e3,!0),v=(0,h.Ds)((t=>t()),500,!1,!0);async function g(t,e,a){var o;let h=(0,s.Rd)();const u=await(0,d.t9)("fetchChats",{limit:i.Ov,offsetDate:a,archived:"archived"===t,withPinned:void 0===h.chats.orderedPinnedIds[t],serverTimeOffset:h.serverTimeOffset,lastLocalServiceMessage:null===(o=(0,c.VF)(h))||void 0===o?void 0:o.message});if(!u)return;const{chatIds:p}=u;p.length>0&&p[0]===e&&p.shift(),h=(0,s.Rd)(),h=(0,r.Sh)(h,(0,l.ee)(u.users,"id")),h=(0,r.zn)(h,u.userStatusesById),h=(0,r.GL)(h,(0,l.ee)(u.chats,"id")),h=(0,r.B1)(h,t,p),h=(0,r.vv)(h,t,u),Object.keys(u.draftsById).forEach((t=>{h=(0,r.pf)(h,t,n._f,"draft",u.draftsById[t])})),Object.keys(u.replyingToById).forEach((t=>{h=(0,r.pf)(h,t,n._f,"replyingToId",u.replyingToById[t])})),0!==p.length||h.chats.isFullyLoaded[t]||(h={...h,chats:{...h.chats,isFullyLoaded:{...h.chats.isFullyLoaded,[t]:!0}}}),(0,s.R3)(h)}async function y(t){const e=await(0,d.t9)("fetchFullChat",t);if(!e)return;const{users:a,fullInfo:n,groupCall:o}=e;let i=(0,s.Rd)();if(a&&(i=(0,r.Sh)(i,(0,l.ee)(a,"id"))),o){const t=(0,C.$5)(i,o.id);i=(0,f.AH)(i,o.id,(0,l.CE)(o,["connectionState"]),void 0,t?void 0:o.participantsCount)}return i=(0,r.a4)(i,t.id,{fullInfo:n}),(0,s.R3)(i),e}async function b(t){const e=(0,s.Rd)(),a=(0,c.DI)(e,t);if(a&&!a.isMin)return a;const n=await(0,d.t9)("getChatByUsername",t);return n?((0,s.R3)((0,r.a4)((0,s.Rd)(),n.id,n)),n):void 0}(0,s.Q6)("preloadTopChatMessages",((t,e)=>{(async()=>{const a=[];for(let o=0;o<i.ul;o++){await(0,h.wO)(100);const{byId:o,listIds:{active:i},orderedPinnedIds:{active:d}}=(0,s.Rd)().chats;if(!i)return;const{chatId:r}=(0,c.Bt)(t)||{},{pinnedChats:l,otherChats:p}=(0,u.O)(o,i,d,"all",!0),f=[...l,...p].find((({id:t})=>t!==r&&!a.includes(t)));if(!f)return;a.push(f.id),e.loadViewportMessages({chatId:f.id,threadId:n._f})}})()})),(0,s.Q6)("openChat",((t,e,a)=>{const{id:s,threadId:o}=a,{currentUserId:i}=t,r=(0,c.Z1)(t,s);if(null!=r&&r.hasUnreadMark&&e.toggleChatUnread({id:s}),r&&r.lastMessage&&r.lastMessage.threadInfo&&e.requestThreadInfoUpdate({chatId:r.lastMessage.threadInfo.chatId,threadId:r.lastMessage.threadInfo.threadId}),r)(0,u.Hp)(r)&&!r.isMin&&e.requestChatUpdate({chatId:s});else if(s===i)(0,d.t9)("fetchChat",{type:"self"});else{const e=(0,c.dy)(t,s);e&&(0,d.t9)("fetchChat",{type:"user",user:e})}o!==n._f&&((0,c.qS)(t,s,o)||e.requestThreadInfoUpdate({chatId:s,threadId:o}))})),(0,s.Q6)("openLinkedChat",((t,e,a)=>{const{id:s}=a,n=(0,c.Z1)(t,s);n&&(async()=>{var t;const a=await(0,d.t9)("fetchFullChat",n);null!=a&&null!==(t=a.fullInfo)&&void 0!==t&&t.linkedChatId&&e.openChat({id:a.fullInfo.linkedChatId})})()})),(0,s.Q6)("focusMessageInComments",((t,e,a)=>{const{chatId:s,threadId:n,messageId:o}=a,i=(0,c.Z1)(t,s);i&&(async()=>{await(0,d.t9)("requestThreadInfoUpdate",{chat:i,threadId:n})&&e.focusMe
//# sourceMappingURL=884.f3881da85250209e0957.js.map