Hide empty tabs in shared media

Fix sending, deleting comments
Fix multiline checkbox
Fix "null comments"
Fix wrong input privacy key for photo
Fix opening member from shared media on handhelds
This commit is contained in:
morethanwords 2021-04-14 12:30:14 +04:00
parent d8caab36e7
commit 6c7f2c5cb0
84 changed files with 339 additions and 109 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(this.webpackJsonp=this.webpackJsonp||[]).push([[14,16,18],{10:function(t,e,s){"use strict";s.d(e,"a",(function(){return r}));const n=s(49).a.debug,i="undefined"!=typeof window?window:self,r=n?i:{};e.b=n,n||(i.sandpitTurtle=()=>{for(let t in r)i[t]=r[t]})},17:function(t,e,s){"use strict";s.r(e),s.d(e,"ripple",(function(){return c}));var n=s(1),i=s(18),r=s(9);let o=0;function c(t,e=(()=>Promise.resolve()),s=null,c=!1){if(t.querySelector(".c-ripple"))return;t.classList.add("rp");let a=document.createElement("div");a.classList.add("c-ripple");let l;t.classList.contains("rp-square")&&a.classList.add("is-square"),t[c?"prepend":"append"](a);const u=(t,n)=>{const r=Date.now(),c=document.createElement("div"),u=o++,h=1e3*+window.getComputedStyle(a).getPropertyValue("--ripple-duration").replace("s","");l=()=>{let t=Date.now()-r;if(t<h){let e=Math.max(h-t,h/2);setTimeout(()=>c.classList.add("hiding"),Math.max(e-h/2,0)),setTimeout(()=>{c.remove(),s&&s(u)},e)}else c.classList.add("hiding"),setTimeout(()=>{c.remove(),s&&s(u)},h/2);i.isTouchSupported||window.removeEventListener("contextmenu",l),l=null,d=!1},e&&e(u),window.requestAnimationFrame(()=>{const e=a.getBoundingClientRect();c.classList.add("c-ripple__circle");const s=t-e.left,i=n-e.top,r=Math.sqrt(Math.pow(Math.abs(i-e.height/2)+e.height/2,2)+Math.pow(Math.abs(s-e.width/2)+e.width/2,2)),o=s-r/2,l=i-r/2;c.style.width=c.style.height=r+"px",c.style.left=o+"px",c.style.top=l+"px",a.append(c)})};let d=!1;if(i.isTouchSupported){let e=()=>{l&&l()};t.addEventListener("touchstart",s=>{if(!r.default.settings.animationsEnabled)return;if(s.touches.length>1||d||["BUTTON","A"].includes(s.target.tagName)&&s.target!==t||Object(n.a)(s.target,"c-ripple")!==a)return;d=!0;let{clientX:i,clientY:o}=s.touches[0];u(i,o),t.addEventListener("touchend",e,{once:!0}),window.addEventListener("touchmove",s=>{s.cancelBubble=!0,s.stopPropagation(),e(),t.removeEventListener("touchend",e)},{once:!0})},{passive:!0})}else t.addEventListener("mousedown",e=>{if(![0,2].includes(e.button))return;if(!r.default.settings.animationsEnabled)return;if("0"===t.dataset.ripple||Object(n.a)(e.target,"c-ripple")!==a||"A"===e.target.tagName)return!1;if(d)return d=!1,!1;let{clientX:s,clientY:i}=e;u(s,i),window.addEventListener("mouseup",l,{once:!0}),window.addEventListener("contextmenu",l,{once:!0})})}},18:function(t,e,s){"use strict";s.r(e),s.d(e,"isTouchSupported",(function(){return n}));const n="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch},43:function(t,e,s){"use strict";s.d(e,"a",(function(){return n}));class n{constructor(t){this._constructor(t)}_constructor(t=!1){this.reuseResults=t,this.listeners={},this.listenerResults={}}addEventListener(t,e,s){var n;this.listenerResults.hasOwnProperty(t)&&(e(...this.listenerResults[t]),s)||(null!==(n=this.listeners[t])&&void 0!==n?n:this.listeners[t]=[]).push({callback:e,once:s})}removeEventListener(t,e){this.listeners[t]&&this.listeners[t].findAndSplice(t=>t.callback===e)}dispatchEvent(t,...e){this.reuseResults&&(this.listenerResults[t]=e);const s=[],n=this.listeners[t];if(n){n.slice().forEach(i=>{-1!==n.findIndex(t=>t.callback===i.callback)&&(s.push(i.callback(...e)),i.once&&this.removeEventListener(t,i.callback))})}return s}cleanup(){this.listeners={},this.listenerResults={}}}},49:function(t,e,s){"use strict";const n={test:location.search.indexOf("test=1")>0,debug:location.search.indexOf("debug=1")>0,http:!1,ssl:!0,multipleConnections:!0,asServiceWorker:!1};e.a=n},9:function(t,e,s){"use strict";s.r(e);var n=s(43),i=s(10);class r extends n.a{constructor(){super(),this._overlayIsActive=!1,this.myId=0,this.idle={isIDLE:!0},this.connectionStatus={},this.broadcast=(t,e)=>{this.dispatchEvent(t,e)},this.on=(t,e,s)=>{super.addEventListener(t,e,s)},this.addEventListener=this.on,this.off=(t,e)=>{super.removeEventListener(t,e)},this.removeEventListener=this.off,this.on("user_auth",t=>{this.myId=t}),this.on("connection_status_change",t=>{const e=t;this.connectionStatus[t.name]=e})}get overlayIsActive(){return this._overlayIsActive}set overlayIsActive(t){this._overlayIsActive=t,this.broadcast("overlay_toggle",t)}}const o=new r;i.a.rootScope=o,e.default=o}}]);
(this.webpackJsonp=this.webpackJsonp||[]).push([[13,14,16],{10:function(t,e,s){"use strict";s.d(e,"a",(function(){return r}));const n=s(52).a.debug,i="undefined"!=typeof window?window:self,r=n?i:{};e.b=n,n||(i.sandpitTurtle=()=>{for(let t in r)i[t]=r[t]})},18:function(t,e,s){"use strict";s.r(e),s.d(e,"ripple",(function(){return c}));var n=s(0),i=s(21),r=s(9);let o=0;function c(t,e=(()=>Promise.resolve()),s=null,c=!1){if(t.querySelector(".c-ripple"))return;t.classList.add("rp");let a=document.createElement("div");a.classList.add("c-ripple");let l;t.classList.contains("rp-square")&&a.classList.add("is-square"),t[c?"prepend":"append"](a);const u=(t,n)=>{const r=Date.now(),c=document.createElement("div"),u=o++,h=1e3*+window.getComputedStyle(a).getPropertyValue("--ripple-duration").replace("s","");l=()=>{let t=Date.now()-r;if(t<h){let e=Math.max(h-t,h/2);setTimeout(()=>c.classList.add("hiding"),Math.max(e-h/2,0)),setTimeout(()=>{c.remove(),s&&s(u)},e)}else c.classList.add("hiding"),setTimeout(()=>{c.remove(),s&&s(u)},h/2);i.isTouchSupported||window.removeEventListener("contextmenu",l),l=null,d=!1},e&&e(u),window.requestAnimationFrame(()=>{const e=a.getBoundingClientRect();c.classList.add("c-ripple__circle");const s=t-e.left,i=n-e.top,r=Math.sqrt(Math.pow(Math.abs(i-e.height/2)+e.height/2,2)+Math.pow(Math.abs(s-e.width/2)+e.width/2,2)),o=s-r/2,l=i-r/2;c.style.width=c.style.height=r+"px",c.style.left=o+"px",c.style.top=l+"px",a.append(c)})};let d=!1;if(i.isTouchSupported){let e=()=>{l&&l()};t.addEventListener("touchstart",s=>{if(!r.default.settings.animationsEnabled)return;if(s.touches.length>1||d||["BUTTON","A"].includes(s.target.tagName)&&s.target!==t||Object(n.a)(s.target,"c-ripple")!==a)return;d=!0;let{clientX:i,clientY:o}=s.touches[0];u(i,o),t.addEventListener("touchend",e,{once:!0}),window.addEventListener("touchmove",s=>{s.cancelBubble=!0,s.stopPropagation(),e(),t.removeEventListener("touchend",e)},{once:!0})},{passive:!0})}else t.addEventListener("mousedown",e=>{if(![0,2].includes(e.button))return;if(!r.default.settings.animationsEnabled)return;if("0"===t.dataset.ripple||Object(n.a)(e.target,"c-ripple")!==a||"A"===e.target.tagName)return!1;if(d)return d=!1,!1;let{clientX:s,clientY:i}=e;u(s,i),window.addEventListener("mouseup",l,{once:!0}),window.addEventListener("contextmenu",l,{once:!0})})}},21:function(t,e,s){"use strict";s.r(e),s.d(e,"isTouchSupported",(function(){return n}));const n="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch},42:function(t,e,s){"use strict";s.d(e,"a",(function(){return n}));class n{constructor(t){this._constructor(t)}_constructor(t=!1){this.reuseResults=t,this.listeners={},this.listenerResults={}}addEventListener(t,e,s){var n;this.listenerResults.hasOwnProperty(t)&&(e(...this.listenerResults[t]),s)||(null!==(n=this.listeners[t])&&void 0!==n?n:this.listeners[t]=[]).push({callback:e,once:s})}removeEventListener(t,e){this.listeners[t]&&this.listeners[t].findAndSplice(t=>t.callback===e)}dispatchEvent(t,...e){this.reuseResults&&(this.listenerResults[t]=e);const s=[],n=this.listeners[t];if(n){n.slice().forEach(i=>{-1!==n.findIndex(t=>t.callback===i.callback)&&(s.push(i.callback(...e)),i.once&&this.removeEventListener(t,i.callback))})}return s}cleanup(){this.listeners={},this.listenerResults={}}}},52:function(t,e,s){"use strict";const n={test:location.search.indexOf("test=1")>0,debug:location.search.indexOf("debug=1")>0,http:!1,ssl:!0,multipleConnections:!0,asServiceWorker:!1};e.a=n},9:function(t,e,s){"use strict";s.r(e),s.d(e,"RootScope",(function(){return r}));var n=s(42),i=s(10);class r extends n.a{constructor(){super(),this._overlayIsActive=!1,this.myId=0,this.idle={isIDLE:!0},this.connectionStatus={},this.broadcast=(t,e)=>{this.dispatchEvent(t,e)},this.on=(t,e,s)=>{super.addEventListener(t,e,s)},this.addEventListener=this.on,this.off=(t,e)=>{super.removeEventListener(t,e)},this.removeEventListener=this.off,this.on("user_auth",t=>{this.myId=t}),this.on("connection_status_change",t=>{const e=t;this.connectionStatus[t.name]=e})}get overlayIsActive(){return this._overlayIsActive}set overlayIsActive(t){this._overlayIsActive=t,this.broadcast("overlay_toggle",t)}}const o=new r;i.a.rootScope=o,e.default=o,o.addEventListener("album_edit",t=>{}),o.addEventListener("album_edit",t=>{})}}]);

View File

@ -0,0 +1 @@
(this.webpackJsonp=this.webpackJsonp||[]).push([[14],{10:function(t,e,s){"use strict";s.d(e,"a",(function(){return r}));const i=s(52).a.debug,n="undefined"!=typeof window?window:self,r=i?n:{};e.b=i,i||(n.sandpitTurtle=()=>{for(let t in r)n[t]=r[t]})},42:function(t,e,s){"use strict";s.d(e,"a",(function(){return i}));class i{constructor(t){this._constructor(t)}_constructor(t=!1){this.reuseResults=t,this.listeners={},this.listenerResults={}}addEventListener(t,e,s){var i;this.listenerResults.hasOwnProperty(t)&&(e(...this.listenerResults[t]),s)||(null!==(i=this.listeners[t])&&void 0!==i?i:this.listeners[t]=[]).push({callback:e,once:s})}removeEventListener(t,e){this.listeners[t]&&this.listeners[t].findAndSplice(t=>t.callback===e)}dispatchEvent(t,...e){this.reuseResults&&(this.listenerResults[t]=e);const s=[],i=this.listeners[t];if(i){i.slice().forEach(n=>{-1!==i.findIndex(t=>t.callback===n.callback)&&(s.push(n.callback(...e)),n.once&&this.removeEventListener(t,n.callback))})}return s}cleanup(){this.listeners={},this.listenerResults={}}}},52:function(t,e,s){"use strict";const i={test:location.search.indexOf("test=1")>0,debug:location.search.indexOf("debug=1")>0,http:!1,ssl:!0,multipleConnections:!0,asServiceWorker:!1};e.a=i},9:function(t,e,s){"use strict";s.r(e),s.d(e,"RootScope",(function(){return r}));var i=s(42),n=s(10);class r extends i.a{constructor(){super(),this._overlayIsActive=!1,this.myId=0,this.idle={isIDLE:!0},this.connectionStatus={},this.broadcast=(t,e)=>{this.dispatchEvent(t,e)},this.on=(t,e,s)=>{super.addEventListener(t,e,s)},this.addEventListener=this.on,this.off=(t,e)=>{super.removeEventListener(t,e)},this.removeEventListener=this.off,this.on("user_auth",t=>{this.myId=t}),this.on("connection_status_change",t=>{const e=t;this.connectionStatus[t.name]=e})}get overlayIsActive(){return this._overlayIsActive}set overlayIsActive(t){this._overlayIsActive=t,this.broadcast("overlay_toggle",t)}}const c=new r;n.a.rootScope=c,e.default=c,c.addEventListener("album_edit",t=>{}),c.addEventListener("album_edit",t=>{})}}]);

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
(this.webpackJsonp=this.webpackJsonp||[]).push([[17],{103:function(t,n,r){"use strict";r.r(n);var e=r(57),o=r(55);Object.defineProperty(Uint8Array.prototype,"hex",{get:function(){return Object(e.e)([...this])},set:function(t){this.set(Object(e.c)(t))},enumerable:!0,configurable:!0}),Uint8Array.prototype.randomize=function(){for(let t=0;t<this.length;++t)this[t]=Object(o.a)(255);return this},Uint8Array.prototype.concat=function(...t){return Object(e.a)(this,...t)},Uint8Array.prototype.toJSON=function(){return[...this]},Array.prototype.findAndSplice=function(t){let n=this.findIndex(t);return-1!==n?this.splice(n,1)[0]:void 0},String.prototype.toHHMMSS=function(t=!1){const n=parseInt(this+"",10),r=Math.floor(n/3600);let e=Math.floor((n-3600*r)/60),o=n-3600*r-60*e;return r&&(t=!0),e<10&&(e=t?"0"+e:e),o<10&&(o="0"+o),(r?r+":":"")+e+":"+o},Promise.prototype.finally=Promise.prototype.finally||function(t){const n=n=>Promise.resolve(t()).then(n);return this.then(t=>n(()=>t),t=>n(()=>Promise.reject(t)))}},55:function(t,n,r){"use strict";function e(t){return Math.floor(Math.random()*t)}function o(){return""+e(4294967295)+e(16777215)}r.d(n,"a",(function(){return e})),r.d(n,"b",(function(){return o}))},57:function(t,n,r){"use strict";function e(t){t=t||[];let n=[];for(let r=0;r<t.length;++r)n.push((t[r]<16?"0":"")+(t[r]||0).toString(16));return n.join("")}function o(t){const n=t.length;let r=0,e=[];n%2&&(e.push(parseInt(t.charAt(0),16)),++r);for(let o=r;o<n;o+=2)e.push(parseInt(t.substr(o,2),16));return e}function i(t){let n,r="";for(let e=t.length,o=0,i=0;i<e;++i)n=i%3,o|=t[i]<<(16>>>n&24),2!==n&&e-i!=1||(r+=String.fromCharCode(u(o>>>18&63),u(o>>>12&63),u(o>>>6&63),u(63&o)),o=0);return r.replace(/A(?=A$|$)/g,"=")}function u(t){return t<26?t+65:t<52?t+71:t<62?t-4:62===t?43:63===t?47:65}function f(t,n){const r=t.length;if(r!==n.length)return!1;for(let e=0;e<r;++e)if(t[e]!==n[e])return!1;return!0}function c(t){return t instanceof ArrayBuffer?t:void 0!==t.buffer&&t.buffer.byteLength===t.length*t.BYTES_PER_ELEMENT?t.buffer:new Uint8Array(t).buffer}function s(...t){let n=0;t.forEach(t=>n+=t.byteLength||t.length);const r=new Uint8Array(n);let e=0;return t.forEach(t=>{r.set(t instanceof ArrayBuffer?new Uint8Array(t):t,e),e+=t.byteLength||t.length}),r}r.d(n,"e",(function(){return e})),r.d(n,"c",(function(){return o})),r.d(n,"d",(function(){return i})),r.d(n,"b",(function(){return f})),r.d(n,"f",(function(){return c})),r.d(n,"a",(function(){return s}))}}]);
(this.webpackJsonp=this.webpackJsonp||[]).push([[15],{103:function(t,n,r){"use strict";r.r(n);var e=r(56),o=r(53);Object.defineProperty(Uint8Array.prototype,"hex",{get:function(){return Object(e.e)([...this])},set:function(t){this.set(Object(e.c)(t))},enumerable:!0,configurable:!0}),Uint8Array.prototype.randomize=function(){for(let t=0;t<this.length;++t)this[t]=Object(o.a)(255);return this},Uint8Array.prototype.concat=function(...t){return Object(e.a)(this,...t)},Uint8Array.prototype.toJSON=function(){return[...this]},Array.prototype.findAndSplice=function(t){let n=this.findIndex(t);return-1!==n?this.splice(n,1)[0]:void 0},String.prototype.toHHMMSS=function(t=!1){const n=parseInt(this+"",10),r=Math.floor(n/3600);let e=Math.floor((n-3600*r)/60),o=n-3600*r-60*e;return r&&(t=!0),e<10&&(e=t?"0"+e:e),o<10&&(o="0"+o),(r?r+":":"")+e+":"+o},Promise.prototype.finally=Promise.prototype.finally||function(t){const n=n=>Promise.resolve(t()).then(n);return this.then(t=>n(()=>t),t=>n(()=>Promise.reject(t)))}},53:function(t,n,r){"use strict";function e(t){return Math.floor(Math.random()*t)}function o(){return""+e(4294967295)+e(16777215)}r.d(n,"a",(function(){return e})),r.d(n,"b",(function(){return o}))},56:function(t,n,r){"use strict";function e(t){t=t||[];let n=[];for(let r=0;r<t.length;++r)n.push((t[r]<16?"0":"")+(t[r]||0).toString(16));return n.join("")}function o(t){const n=t.length;let r=0,e=[];n%2&&(e.push(parseInt(t.charAt(0),16)),++r);for(let o=r;o<n;o+=2)e.push(parseInt(t.substr(o,2),16));return e}function i(t){let n,r="";for(let e=t.length,o=0,i=0;i<e;++i)n=i%3,o|=t[i]<<(16>>>n&24),2!==n&&e-i!=1||(r+=String.fromCharCode(u(o>>>18&63),u(o>>>12&63),u(o>>>6&63),u(63&o)),o=0);return r.replace(/A(?=A$|$)/g,"=")}function u(t){return t<26?t+65:t<52?t+71:t<62?t-4:62===t?43:63===t?47:65}function f(t,n){const r=t.length;if(r!==n.length)return!1;for(let e=0;e<r;++e)if(t[e]!==n[e])return!1;return!0}function c(t){return t instanceof ArrayBuffer?t:void 0!==t.buffer&&t.buffer.byteLength===t.length*t.BYTES_PER_ELEMENT?t.buffer:new Uint8Array(t).buffer}function s(...t){let n=0;t.forEach(t=>n+=t.byteLength||t.length);const r=new Uint8Array(n);let e=0;return t.forEach(t=>{r.set(t instanceof ArrayBuffer?new Uint8Array(t):t,e),e+=t.byteLength||t.length}),r}r.d(n,"e",(function(){return e})),r.d(n,"c",(function(){return o})),r.d(n,"d",(function(){return i})),r.d(n,"b",(function(){return f})),r.d(n,"f",(function(){return c})),r.d(n,"a",(function(){return s}))}}]);

View File

@ -1 +1 @@
(this.webpackJsonp=this.webpackJsonp||[]).push([[18],{18:function(n,o,t){"use strict";t.r(o),t.d(o,"isTouchSupported",(function(){return c}));const c="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch}}]);
(this.webpackJsonp=this.webpackJsonp||[]).push([[16],{21:function(n,o,t){"use strict";t.r(o),t.d(o,"isTouchSupported",(function(){return c}));const c="ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch}}]);

View File

@ -1 +0,0 @@
(this.webpackJsonp=this.webpackJsonp||[]).push([[16],{10:function(t,s,e){"use strict";e.d(s,"a",(function(){return r}));const i=e(49).a.debug,n="undefined"!=typeof window?window:self,r=i?n:{};s.b=i,i||(n.sandpitTurtle=()=>{for(let t in r)n[t]=r[t]})},43:function(t,s,e){"use strict";e.d(s,"a",(function(){return i}));class i{constructor(t){this._constructor(t)}_constructor(t=!1){this.reuseResults=t,this.listeners={},this.listenerResults={}}addEventListener(t,s,e){var i;this.listenerResults.hasOwnProperty(t)&&(s(...this.listenerResults[t]),e)||(null!==(i=this.listeners[t])&&void 0!==i?i:this.listeners[t]=[]).push({callback:s,once:e})}removeEventListener(t,s){this.listeners[t]&&this.listeners[t].findAndSplice(t=>t.callback===s)}dispatchEvent(t,...s){this.reuseResults&&(this.listenerResults[t]=s);const e=[],i=this.listeners[t];if(i){i.slice().forEach(n=>{-1!==i.findIndex(t=>t.callback===n.callback)&&(e.push(n.callback(...s)),n.once&&this.removeEventListener(t,n.callback))})}return e}cleanup(){this.listeners={},this.listenerResults={}}}},49:function(t,s,e){"use strict";const i={test:location.search.indexOf("test=1")>0,debug:location.search.indexOf("debug=1")>0,http:!1,ssl:!0,multipleConnections:!0,asServiceWorker:!1};s.a=i},9:function(t,s,e){"use strict";e.r(s);var i=e(43),n=e(10);class r extends i.a{constructor(){super(),this._overlayIsActive=!1,this.myId=0,this.idle={isIDLE:!0},this.connectionStatus={},this.broadcast=(t,s)=>{this.dispatchEvent(t,s)},this.on=(t,s,e)=>{super.addEventListener(t,s,e)},this.addEventListener=this.on,this.off=(t,s)=>{super.removeEventListener(t,s)},this.removeEventListener=this.off,this.on("user_auth",t=>{this.myId=t}),this.on("connection_status_change",t=>{const s=t;this.connectionStatus[t.name]=s})}get overlayIsActive(){return this._overlayIsActive}set overlayIsActive(t){this._overlayIsActive=t,this.broadcast("overlay_toggle",t)}}const c=new r;n.a.rootScope=c,s.default=c}}]);

View File

@ -0,0 +1 @@
(this.webpackJsonp=this.webpackJsonp||[]).push([[17],{99:function(e,a,s){"use strict";s.r(a);function c(e,a){switch(e){case 27764:if(a%10==1&&(a%100<11||a%100>19))return"one";if(a%10>=2&&a%10<=9&&(a%100<11||a%100>19))return"few";break;case 27766:if(0==a)return"zero";if(a%10==1&&a%100!=11)return"one";break;case 25465:if(2==a)return"two";if(3==a)return"few";if(0==a)return"zero";if(1==a)return"one";if(6==a)return"many";break;case 25189:case 25203:case 26738:case 29301:case 29544:case 29554:case 30059:if(a%10==1&&a%100!=11)return"one";if(a%10>=2&&a%10<=4&&(a%100<12||a%100>14))return"few";if(a%10==0||a%10>=5&&a%10<=9||a%100>=11&&a%100<=14)return"many";break;case 7041896:if(0==a)return"zero";if(1==a)return"one";break;case 7563369:if(a>=2&&a<=10)return"few";if(a>=0&&a<=1)return"one";break;case 26725:if(2==a)return"two";if(1==a)return"one";if(0!=a&&a%10==0)return"many";break;case 25459:case 29547:if(1==a)return"one";if(a>=2&&a<=4)return"few";break;case 25202:if(0!=a&&a%1e6==0)return"many";if(a%10==1&&a%100!=11&&a%100!=71&&a%100!=91)return"one";if(a%10==2&&a%100!=12&&a%100!=72&&a%100!=92)return"two";if((a%10>=3&&a%10<=4||a%10==9)&&(a%100<10||a%100>19)&&(a%100<70||a%100>79)&&(a%100<90||a%100>99))return"few";break;case 29548:if(a%100==2)return"two";if(a%100==1)return"one";if(a%100>=3&&a%100<=4)return"few";break;case 7102823:if(0==a)return"zero";if(a>=0&&a<=2&&0!=a&&2!=a)return"one";break;case 28780:if(1==a)return"one";if(a%10>=2&&a%10<=4&&(a%100<12||a%100>14))return"few";if(1!=a&&a%10>=0&&a%10<=1||a%10>=5&&a%10<=9||a%100>=12&&a%100<=14)return"many";break;case 26468:if(2==a||12==a)return"two";if(1==a||11==a)return"one";if(a>=3&&a<=10||a>=13&&a<=19)return"few";break;case 26486:if(a%10>=1&&a%10<=2||a%20==0)return"one";break;case 28011:if(a%10==1&&11!=a)return"one";break;case 28020:if(1==a)return"one";if(a%100>=11&&a%100<=19)return"many";if(0==a||a%100>=2&&a%100<=10)return"few";break;case 28015:case 29295:if(1==a)return"one";if(0==a||1!=a&&a%100>=1&&a%100<=19)return"few";break;case 26465:if(2==a)return"two";if(1==a)return"one";if(a>=3&&a<=6)return"few";if(a>=7&&a<=10)return"many";break;case 26214:case 26226:case 7037282:if(a>=0&&a<=2&&2!=a)return"one";break;case 26997:case 27511:case 29541:case 7233905:case 7564641:case 7564649:case 7564650:case 7564654:case 7564659:if(2==a)return"two";if(1==a)return"one";break;case 24939:case 24941:case 25192:case 26729:case 27758:case 28007:case 29801:case 29804:case 30561:case 6711660:case 6780279:case 7238511:if(a>=0&&a<=1)return"one";break;case 7633517:if(a>=0&&a<=1||a>=11&&a<=99)return"one";break;case 24934:case 25191:case 25198:case 25441:case 25697:case 25701:case 25718:case 25957:case 25964:case 25966:case 25967:case 25971:case 25972:case 25973:case 26217:case 26223:case 26233:case 26476:case 26485:case 26721:case 26995:case 26996:case 27499:case 27500:case 27507:case 27509:case 27513:case 27746:case 27751:case 28012:case 28014:case 28018:case 28258:case 28260:case 28261:case 28268:case 28270:case 28271:case 28274:case 28281:case 28525:case 28530:case 28531:case 28769:case 28787:case 28788:case 29293:case 29550:case 29551:case 29553:case 29555:case 29556:case 29558:case 29559:case 29793:case 29797:case 29803:case 29806:case 29811:case 30066:case 30309:case 30319:case 30824:case 31349:case 6386529:case 6386548:case 6448493:case 6448506:case 6451832:case 6514535:case 6514802:case 6515554:case 6714738:case 6779767:case 6840695:case 6973295:case 6974819:case 7037290:case 7037799:case 7039850:case 7041890:case 7168371:case 7169903:case 7233896:case 7237224:case 7240046:case 7364976:case 7499622:case 7501675:case 7561585:case 7562600:case 7566201:case 7567730:case 7628143:case 7629159:case 7763310:case 7823717:case 7892839:if(1==a)return"one";break;case 24946:if(2==a)return"two";if(1==a)return"one";if(0==a)return"zero";if(a%100>=3&&a%100<=10)return"few";if(a%100>=11&&a%100<=99)return"many"}return"other"}const r={PluralRules:class{constructor(e){this.select=c.bind(null,function(e){let a=0;for(let s=0;s<e.length;++s)a=(a<<8)+e.charCodeAt(s);return a}(e))}}};a.default=r}}]);

View File

@ -0,0 +1 @@
(this.webpackJsonp=this.webpackJsonp||[]).push([[18],{45:function(e,t,n){"use strict";n.r(t);var a=n(7),o=n(16),u=n(8),c=n(38),i=function(e,t,n,a){return new(n||(n=Promise))((function(o,u){function c(e){try{l(a.next(e))}catch(e){u(e)}}function i(e){try{l(a.throw(e))}catch(e){u(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(c,i)}l((a=a.apply(e,t||[])).next())}))};const l=new c.a("page-chats",!1,()=>(o.default.pushToState("authState",{_:"authStateSignedIn"}),Promise.resolve().then(n.bind(null,9)).then(e=>{e.default.broadcast("im_mount")}),u.default.requestedServerLanguage||u.default.getCacheLangPack().then(e=>{e.local&&u.default.getLangPack(e.lang_code)}),Object(a.c)(),new Promise(e=>{window.requestAnimationFrame(()=>{n.e(9).then(n.bind(null,66)).finally(()=>i(void 0,void 0,void 0,(function*(){e()})))})})));t.default=l}}]);

View File

@ -1 +0,0 @@
(this.webpackJsonp=this.webpackJsonp||[]).push([[19],{100:function(e,a,s){"use strict";s.r(a);function c(e,a){switch(e){case 27764:if(a%10==1&&(a%100<11||a%100>19))return"one";if(a%10>=2&&a%10<=9&&(a%100<11||a%100>19))return"few";break;case 27766:if(0==a)return"zero";if(a%10==1&&a%100!=11)return"one";break;case 25465:if(2==a)return"two";if(3==a)return"few";if(0==a)return"zero";if(1==a)return"one";if(6==a)return"many";break;case 25189:case 25203:case 26738:case 29301:case 29544:case 29554:case 30059:if(a%10==1&&a%100!=11)return"one";if(a%10>=2&&a%10<=4&&(a%100<12||a%100>14))return"few";if(a%10==0||a%10>=5&&a%10<=9||a%100>=11&&a%100<=14)return"many";break;case 7041896:if(0==a)return"zero";if(1==a)return"one";break;case 7563369:if(a>=2&&a<=10)return"few";if(a>=0&&a<=1)return"one";break;case 26725:if(2==a)return"two";if(1==a)return"one";if(0!=a&&a%10==0)return"many";break;case 25459:case 29547:if(1==a)return"one";if(a>=2&&a<=4)return"few";break;case 25202:if(0!=a&&a%1e6==0)return"many";if(a%10==1&&a%100!=11&&a%100!=71&&a%100!=91)return"one";if(a%10==2&&a%100!=12&&a%100!=72&&a%100!=92)return"two";if((a%10>=3&&a%10<=4||a%10==9)&&(a%100<10||a%100>19)&&(a%100<70||a%100>79)&&(a%100<90||a%100>99))return"few";break;case 29548:if(a%100==2)return"two";if(a%100==1)return"one";if(a%100>=3&&a%100<=4)return"few";break;case 7102823:if(0==a)return"zero";if(a>=0&&a<=2&&0!=a&&2!=a)return"one";break;case 28780:if(1==a)return"one";if(a%10>=2&&a%10<=4&&(a%100<12||a%100>14))return"few";if(1!=a&&a%10>=0&&a%10<=1||a%10>=5&&a%10<=9||a%100>=12&&a%100<=14)return"many";break;case 26468:if(2==a||12==a)return"two";if(1==a||11==a)return"one";if(a>=3&&a<=10||a>=13&&a<=19)return"few";break;case 26486:if(a%10>=1&&a%10<=2||a%20==0)return"one";break;case 28011:if(a%10==1&&11!=a)return"one";break;case 28020:if(1==a)return"one";if(a%100>=11&&a%100<=19)return"many";if(0==a||a%100>=2&&a%100<=10)return"few";break;case 28015:case 29295:if(1==a)return"one";if(0==a||1!=a&&a%100>=1&&a%100<=19)return"few";break;case 26465:if(2==a)return"two";if(1==a)return"one";if(a>=3&&a<=6)return"few";if(a>=7&&a<=10)return"many";break;case 26214:case 26226:case 7037282:if(a>=0&&a<=2&&2!=a)return"one";break;case 26997:case 27511:case 29541:case 7233905:case 7564641:case 7564649:case 7564650:case 7564654:case 7564659:if(2==a)return"two";if(1==a)return"one";break;case 24939:case 24941:case 25192:case 26729:case 27758:case 28007:case 29801:case 29804:case 30561:case 6711660:case 6780279:case 7238511:if(a>=0&&a<=1)return"one";break;case 7633517:if(a>=0&&a<=1||a>=11&&a<=99)return"one";break;case 24934:case 25191:case 25198:case 25441:case 25697:case 25701:case 25718:case 25957:case 25964:case 25966:case 25967:case 25971:case 25972:case 25973:case 26217:case 26223:case 26233:case 26476:case 26485:case 26721:case 26995:case 26996:case 27499:case 27500:case 27507:case 27509:case 27513:case 27746:case 27751:case 28012:case 28014:case 28018:case 28258:case 28260:case 28261:case 28268:case 28270:case 28271:case 28274:case 28281:case 28525:case 28530:case 28531:case 28769:case 28787:case 28788:case 29293:case 29550:case 29551:case 29553:case 29555:case 29556:case 29558:case 29559:case 29793:case 29797:case 29803:case 29806:case 29811:case 30066:case 30309:case 30319:case 30824:case 31349:case 6386529:case 6386548:case 6448493:case 6448506:case 6451832:case 6514535:case 6514802:case 6515554:case 6714738:case 6779767:case 6840695:case 6973295:case 6974819:case 7037290:case 7037799:case 7039850:case 7041890:case 7168371:case 7169903:case 7233896:case 7237224:case 7240046:case 7364976:case 7499622:case 7501675:case 7561585:case 7562600:case 7566201:case 7567730:case 7628143:case 7629159:case 7763310:case 7823717:case 7892839:if(1==a)return"one";break;case 24946:if(2==a)return"two";if(1==a)return"one";if(0==a)return"zero";if(a%100>=3&&a%100<=10)return"few";if(a%100>=11&&a%100<=99)return"many"}return"other"}const r={PluralRules:class{constructor(e){this.select=c.bind(null,function(e){let a=0;for(let s=0;s<e.length;++s)a=(a<<8)+e.charCodeAt(s);return a}(e))}}};a.default=r}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1 +0,0 @@
(this.webpackJsonp=this.webpackJsonp||[]).push([[20],{34:function(e,t,n){"use strict";n.r(t);var a=n(7),o=n(14),u=n(8),i=n(29),c=function(e,t,n,a){return new(n||(n=Promise))((function(o,u){function i(e){try{l(a.next(e))}catch(e){u(e)}}function c(e){try{l(a.throw(e))}catch(e){u(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}l((a=a.apply(e,t||[])).next())}))};const l=new i.a("page-chats",!1,()=>(o.default.pushToState("authState",{_:"authStateSignedIn"}),Promise.resolve().then(n.bind(null,9)).then(e=>{e.default.broadcast("im_mount")}),u.default.requestedServerLanguage||u.default.getCacheLangPack().then(e=>{e.local&&u.default.getLangPack(e.lang_code)}),Object(a.c)(),new Promise(e=>{window.requestAnimationFrame(()=>{Promise.all([n.e(3),n.e(10)]).then(n.bind(null,65)).finally(()=>c(void 0,void 0,void 0,(function*(){e()})))})})));t.default=l}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1 +1 @@
(this.webpackJsonp=this.webpackJsonp||[]).push([[5],{94:function(e,n,o){"use strict";o.r(n);n.default={"Login.Title":"Sign in to Telegram","Login.CountrySelectorLabel":"Country","Login.PhoneLabel":"Phone Number","Login.PhoneLabelInvalid":"Phone Number Invalid","Login.KeepSigned":"Keep me signed in","Login.StartText":"Please confirm your country and\nenter your phone number.","Login.Code.SentSms":"We have sent you an SMS\nwith the code.","Login.Code.SentInApp":"We have sent you a message in Telegram\nwith the code.","Login.Code.SentCall":"We will call you and voice\nthe code.","Login.Code.SentUnknown":"Please check everything\nfor a code (type: %s)","Login.Password.Title":"Enter Your Password","Login.Password.Subtitle":"Your account is protected with\nan additional password","Login.Register.Subtitle":"Enter your name and add\na profile picture",PleaseWait:"Please wait...",Code:"Code",LoginPassword:"Password",YourName:"Your Name",FirstName:"First name (required)",LastName:"Last name (optional)",StartMessaging:"Start Messaging","Login.Next":"Next","Login.ContinueOnLanguage":"Continue in English","Login.QR.Title":"Log in to Telegram by QR Code","Login.QR.Help1":"Open Telegram on your phone","Login.QR.Help2":"Go to **Settings** > **Devices** > **Scan QR**","Login.QR.Help3":"Point your phone at this screen to confirm login","Login.QR.Cancel":"Log in by phone Number","Login.QR.Login":"Log in by QR Code",PHONE_CODE_INVALID:"Invalid code",PHONE_CODE_EXPIRED:"Code expired",PASSWORD_HASH_INVALID:"Incorrect password"}}}]);
(this.webpackJsonp=this.webpackJsonp||[]).push([[6],{93:function(e,n,o){"use strict";o.r(n);n.default={"Login.Title":"Sign in to Telegram","Login.CountrySelectorLabel":"Country","Login.PhoneLabel":"Phone Number","Login.PhoneLabelInvalid":"Phone Number Invalid","Login.KeepSigned":"Keep me signed in","Login.StartText":"Please confirm your country and\nenter your phone number.","Login.Code.SentSms":"We have sent you an SMS\nwith the code.","Login.Code.SentInApp":"We have sent you a message in Telegram\nwith the code.","Login.Code.SentCall":"We will call you and voice\nthe code.","Login.Code.SentUnknown":"Please check everything\nfor a code (type: %s)","Login.Password.Title":"Enter Your Password","Login.Password.Subtitle":"Your account is protected with\nan additional password","Login.Register.Subtitle":"Enter your name and add\na profile picture",PleaseWait:"Please wait...",Code:"Code",LoginPassword:"Password",YourName:"Your Name",FirstName:"First name (required)",LastName:"Last name (optional)",StartMessaging:"Start Messaging","Login.Next":"Next","Login.ContinueOnLanguage":"Continue in English","Login.QR.Title":"Log in to Telegram by QR Code","Login.QR.Help1":"Open Telegram on your phone","Login.QR.Help2":"Go to **Settings** > **Devices** > **Scan QR**","Login.QR.Help3":"Point your phone at this screen to confirm login","Login.QR.Cancel":"Log in by phone Number","Login.QR.Login":"Log in by QR Code",PHONE_CODE_INVALID:"Invalid code",PHONE_CODE_EXPIRED:"Code expired",PASSWORD_HASH_INVALID:"Incorrect password"}}}]);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -35,6 +35,10 @@ import { getMiddleware } from "../helpers/middleware";
import appProfileManager from "../lib/appManagers/appProfileManager";
import { ChannelParticipant, ChatFull, ChatParticipant, ChatParticipants } from "../layer";
import SortedUserList from "./sortedUserList";
import findUpTag from "../helpers/dom/findUpTag";
import appSidebarRight from "./sidebarRight";
import mediaSizes from "../helpers/mediaSizes";
import appImManager from "../lib/appManagers/appImManager";
//const testScroll = false;
@ -88,6 +92,7 @@ export default class AppSearchSuper {
private loadPromises: Partial<{[type in SearchSuperType]: Promise<void>}> = {};
private loaded: Partial<{[type in SearchSuperType]: boolean}> = {};
private loadedChats = false;
private firstLoad = true;
private log = logger('SEARCH-SUPER');
public selectTab: ReturnType<typeof horizontalMenu>;
@ -855,6 +860,22 @@ export default class AppSearchSuper {
if(!this.membersList) {
this.membersList = new SortedUserList();
this.membersList.list.addEventListener('click', (e) => {
const li = findUpTag(e.target, 'LI');
if(!li) {
return;
}
const peerId = +li.dataset.peerId;
let promise: Promise<any> = Promise.resolve();
if(mediaSizes.isMobile) {
promise = appSidebarRight.toggleSidebar(false);
}
promise.then(() => {
appImManager.setInnerPeer(peerId);
});
});
mediaTab.contentTab.append(this.membersList.list);
this.afterPerforming(1, mediaTab.contentTab);
}
@ -1039,7 +1060,7 @@ export default class AppSearchSuper {
});
}
public load(single = false, justLoad = false) {
public async load(single = false, justLoad = false) {
// if(testScroll/* || 1 === 1 */) {
// return;
// }
@ -1048,6 +1069,57 @@ export default class AppSearchSuper {
const peerId = this.searchContext.peerId;
this.log('load', single, peerId, this.loadPromises);
const middleware = this.middleware.get();
if(this.firstLoad) {
if(this.hideEmptyTabs) {
const mediaTabs = this.mediaTabs.filter(mediaTab => mediaTab.inputFilter !== 'inputMessagesFilterEmpty')
const filters = mediaTabs.map(mediaTab => ({_: mediaTab.inputFilter}));
const counters = await appMessagesManager.getSearchCounters(peerId, filters);
if(!middleware()) {
return;
}
if(this.loadMutex) {
await this.loadMutex;
if(!middleware()) {
return;
}
}
let firstMediaTab: SearchSuperMediaTab;
mediaTabs.forEach(mediaTab => {
const counter = counters.find(c => c.filter._ === mediaTab.inputFilter);
mediaTab.menuTab.classList.toggle('hide', !counter.count);
mediaTab.menuTab.classList.remove('active');
//mediaTab.contentTab.classList.toggle('hide', !counter.count);
if(counter.count && firstMediaTab === undefined) {
firstMediaTab = mediaTab;
}
});
const membersTab = this.mediaTabsMap.get('members');
const canViewMembers = this.canViewMembers();
membersTab.menuTab.classList.toggle('hide', !canViewMembers);
if(canViewMembers) {
firstMediaTab = membersTab;
}
this.container.classList.toggle('hide', !firstMediaTab);
this.container.parentElement.classList.toggle('search-empty', !firstMediaTab);
this.selectTab(this.mediaTabs.indexOf(firstMediaTab), false);
if(firstMediaTab) {
firstMediaTab.menuTab.classList.add('active');
}
}
this.firstLoad = false;
}
let toLoad = single ? [this.mediaTab] : this.mediaTabs.filter(t => t !== this.mediaTab);
toLoad = toLoad.filter(mediaTab => {
@ -1060,12 +1132,11 @@ export default class AppSearchSuper {
}
const loadCount = justLoad ? 50 : Math.round((appPhotosManager.windowH / 130 | 0) * 3 * 1.25); // that's good for all types
const middleware = this.middleware.get();
const promises: Promise<any>[] = toLoad.map(mediaTab => {
return this.loadType(mediaTab, justLoad, loadCount, middleware)
});
return Promise.all(promises).catch(err => {
this.log.error('Load error all promises:', err);
});
@ -1118,6 +1189,7 @@ export default class AppSearchSuper {
this.loaded = {};
this.loadedChats = false;
this.nextRates = {};
this.firstLoad = true;
this.lazyLoadQueue.clear();
@ -1126,11 +1198,11 @@ export default class AppSearchSuper {
});
// * must go to first tab (это костыль)
const membersTab = this.mediaTabsMap.get('members');
/* const membersTab = this.mediaTabsMap.get('members');
if(membersTab) {
const tab = this.canViewMembers() ? membersTab : this.mediaTabs[this.mediaTabs.indexOf(membersTab) + 1];
this.mediaTab = tab;
}
} */
this.middleware.clean();
this.cleanScrollPositions();
@ -1154,9 +1226,11 @@ export default class AppSearchSuper {
this.mediaTabs.forEach((tab) => {
tab.contentTab.innerHTML = '';
/* if(this.hideEmptyTabs) {
tab.menuTab.classList.add('hide');
} */
if(this.hideEmptyTabs) {
//tab.menuTab.classList.add('hide');
this.container.classList.add('hide');
this.container.parentElement.classList.add('search-empty');
}
if(tab.type === 'chats') {
return;
@ -1177,7 +1251,7 @@ export default class AppSearchSuper {
}
});
if(goFirst) {
/* if(goFirst) {
const membersTab = this.mediaTabsMap.get('members');
if(membersTab) {
let idx = this.canViewMembers() ? 0 : 1;
@ -1187,7 +1261,7 @@ export default class AppSearchSuper {
} else {
this.selectTab(0, false);
}
}
} */
this.monthContainers = {};
this.searchGroupMedia.clear();

View File

@ -181,6 +181,8 @@ export default class ChatBubbles {
}
});
//this.listenerSetter.add(rootScope, '')
this.listenerSetter.add(rootScope, 'dialog_flush', (e) => {
let peerId: number = e.peerId;
if(this.peerId === peerId) {
@ -434,7 +436,7 @@ export default class ChatBubbles {
const msgIdsByPeer = e;
if(!(this.peerId in msgIdsByPeer)) return;
const msgIds = (msgIdsByPeer[this.peerId] as number[]).slice().sort((a, b) => b - a);
const msgIds = Array.from(msgIdsByPeer[this.peerId] as number[]).slice().sort((a, b) => b - a);
this.renderNewMessagesByIds(msgIds);
});

View File

@ -451,7 +451,7 @@ export default class ChatTopbar {
else titleEl = i18n('PinnedMessagesCount', [count]);
if(count === undefined) {
this.appMessagesManager.getSearchCounters(this.peerId, [{_: 'inputMessagesFilterPinned'}]).then(result => {
this.appMessagesManager.getSearchCounters(this.peerId, [{_: 'inputMessagesFilterPinned'}], false).then(result => {
const count = result[0].count;
this.setTitle(count);
@ -490,7 +490,14 @@ export default class ChatTopbar {
this.appMessagesManager.getHistory(this.peerId, 0, 1, 0, this.chat.threadId),
Promise.resolve()
]).then(() => {
this.setTitle(this.appMessagesManager.getHistoryStorage(this.peerId, this.chat.threadId).count);
const count = this.appMessagesManager.getHistoryStorage(this.peerId, this.chat.threadId).count;
if(count === null) {
setTimeout(() => {
this.setTitle();
}, 30);
} else {
this.setTitle(count);
}
});
}
} else if(this.chat.type === 'chat') {

View File

@ -32,8 +32,8 @@ export default class AppBackgroundTab extends SliderSuperTab {
{
const container = generateSection(this.scrollable);
const uploadButton = Button('btn-primary btn-transparent', {icon: 'cameraadd', text: 'ChatBackground.UploadWallpaper', disabled: true});
const colorButton = Button('btn-primary btn-transparent', {icon: 'colorize', text: 'ChatBackground.SetColor', disabled: true});
//const uploadButton = Button('btn-primary btn-transparent', {icon: 'cameraadd', text: 'ChatBackground.UploadWallpaper', disabled: true});
//const colorButton = Button('btn-primary btn-transparent', {icon: 'colorize', text: 'ChatBackground.SetColor', disabled: true});
const blurCheckboxField = new CheckboxField({
text: 'ChatBackground.Blur',
@ -51,7 +51,7 @@ export default class AppBackgroundTab extends SliderSuperTab {
}, 100);
});
container.append(uploadButton, colorButton, blurCheckboxField.label);
container.append(/* uploadButton, colorButton, */blurCheckboxField.label);
}
const grid = document.createElement('div');

View File

@ -18,7 +18,7 @@ export default class AppPrivacyProfilePhotoTab extends SliderSuperTabEventable {
new PrivacySection({
tab: this,
title: 'PrivacyProfilePhotoTitle',
inputKey: 'inputPrivacyKeyChatInvite',
inputKey: 'inputPrivacyKeyProfilePhoto',
captions: [caption, caption, caption],
exceptionTexts: ['PrivacySettingsController.NeverShare', 'PrivacySettingsController.AlwaysShare'],
appendTo: this.scrollable,

View File

@ -95,7 +95,7 @@ export default class AppEditChannelTab extends SliderSuperTab {
}, {listenerSetter: this.listenerSetter});
}
if(appChatsManager.hasRights(-this.peerId, 'change_type')) {
/* if(appChatsManager.hasRights(-this.peerId, 'change_type')) {
const channelTypeRow = new Row({
titleLangKey: 'ChannelType',
subtitleLangKey: 'TypePrivate',
@ -133,12 +133,12 @@ export default class AppEditChannelTab extends SliderSuperTab {
});
section.content.append(signMessagesCheckboxField.label);
}
} */
this.scrollable.append(section.container);
}
{
/* {
const section = new SettingSection({
});
@ -154,7 +154,7 @@ export default class AppEditChannelTab extends SliderSuperTab {
section.content.append(subscribersRow.container);
this.scrollable.append(section.container);
}
} */
if(appChatsManager.hasRights(-this.peerId, 'delete_chat')) {
const section = new SettingSection({

View File

@ -132,14 +132,14 @@ export default class AppEditGroupTab extends SliderSuperTab {
});
}
const administratorsRow = new Row({
/* const administratorsRow = new Row({
titleLangKey: 'PeerInfo.Administrators',
subtitle: '' + ((chatFull as ChatFull.channelFull).admins_count || 1),
icon: 'admin',
clickable: true
});
section.content.append(administratorsRow.container);
section.content.append(administratorsRow.container); */
this.scrollable.append(section.container);

View File

@ -185,14 +185,16 @@ export default class AppGroupPermissionsTab extends SliderSuperTabEventable {
tab.open();
};
const removedUsersRow = new Row({
section.content.append(addExceptionRow.container);
/* const removedUsersRow = new Row({
titleLangKey: 'ChannelBlockedUsers',
subtitleLangKey: 'NoBlockedUsers',
icon: 'deleteuser',
clickable: true
});
section.content.append(addExceptionRow.container, removedUsersRow.container);
section.content.append(removedUsersRow.container); */
const c = section.generateContentElement();
c.classList.add('chatlist-container');

View File

@ -23,7 +23,6 @@ export default class SortedUserList {
constructor() {
this.list = appDialogsManager.createChatList();
appDialogsManager.setListClickListener(this.list, undefined, undefined, true, true);
this.users = new Map();
this.sorted = [];

View File

@ -4,32 +4,56 @@
* https://github.com/morethanwords/tweb/blob/master/LICENSE
*/
export type Listener = {element: ListenerElement, event: ListenerEvent, callback: ListenerCallback, options?: ListenerOptions};
export type ListenerElement = any;
export type ListenerEvent = string;
export type ListenerOptions = any;
export type ListenerCallback = (...args: any[]) => any;
export default class ListenerSetter {
private listeners: Set<Listener> = new Set();
import type { RootScope } from "../lib/rootScope";
import { ArgumentTypes } from "../types";
public add(element: ListenerElement, event: ListenerEvent, callback: ListenerCallback, options?: ListenerOptions) {
const listener = {element, event, callback, options};
/* export type Listener<T extends ListenerElement> = {
element: ListenerElement,
event: ListenerEvent<T>,
callback: ListenerCallback<T>,
options?: ListenerOptions
};
export type ListenerElement = HTMLElement | RootScope;
export type ListenerEvent<T extends ListenerElement> = ArgumentTypes<T['addEventListener']>[0];
export type ListenerCallback<T extends ListenerElement> = ArgumentTypes<T['addEventListener']>[1];
export type ListenerOptions = any; */
export type Listener<T extends ListenerElement> = {
element: ListenerElement,
event: ListenerEvent<T>,
callback: ListenerCallback,
options?: ListenerOptions
};
export type ListenerElement = Window | Document | HTMLElement | Element | RootScope | any;
//export type ListenerEvent<T extends ListenerElement> = ArgumentTypes<T['addEventListener']>[0];
export type ListenerEvent<T extends ListenerElement> = string;
export type ListenerCallback = (...args: any[]) => any;
export type ListenerOptions = any;
export default class ListenerSetter {
private listeners: Set<Listener<any>> = new Set();
public add<T extends ListenerElement>(element: T, event: ListenerEvent<T>, callback: ListenerCallback, options?: ListenerOptions) {
const listener: Listener<T> = {element, event, callback, options};
this.addManual(listener);
return listener;
}
public addManual(listener: Listener) {
public addManual<T extends ListenerElement>(listener: Listener<T>) {
// @ts-ignore
listener.element.addEventListener(listener.event, listener.callback, listener.options);
this.listeners.add(listener);
}
public remove(listener: Listener) {
public remove<T extends ListenerElement>(listener: Listener<T>) {
// @ts-ignore
listener.element.removeEventListener(listener.event, listener.callback, listener.options);
this.listeners.delete(listener);
}
public removeManual(element: ListenerElement, event: ListenerEvent, callback: ListenerCallback, options?: ListenerOptions) {
let listener: Listener;
public removeManual<T extends ListenerElement>(element: T, event: ListenerEvent<T>, callback: ListenerCallback, options?: ListenerOptions) {
let listener: Listener<T>;
for(const _listener of this.listeners) {
if(_listener.element === element && _listener.event === event && _listener.callback === callback && _listener.options === options) {
listener = _listener;

15
src/layer.d.ts vendored
View File

@ -1882,7 +1882,7 @@ export namespace MessagesFilter {
/**
* @link https://core.telegram.org/type/Update
*/
export type Update = Update.updateNewMessage | Update.updateMessageID | Update.updateDeleteMessages | Update.updateUserTyping | Update.updateChatUserTyping | Update.updateChatParticipants | Update.updateUserStatus | Update.updateUserName | Update.updateUserPhoto | Update.updateNewEncryptedMessage | Update.updateEncryptedChatTyping | Update.updateEncryption | Update.updateEncryptedMessagesRead | Update.updateChatParticipantAdd | Update.updateChatParticipantDelete | Update.updateDcOptions | Update.updateNotifySettings | Update.updateServiceNotification | Update.updatePrivacy | Update.updateUserPhone | Update.updateReadHistoryInbox | Update.updateReadHistoryOutbox | Update.updateWebPage | Update.updateReadMessagesContents | Update.updateChannelTooLong | Update.updateChannel | Update.updateNewChannelMessage | Update.updateReadChannelInbox | Update.updateDeleteChannelMessages | Update.updateChannelMessageViews | Update.updateChatParticipantAdmin | Update.updateNewStickerSet | Update.updateStickerSetsOrder | Update.updateStickerSets | Update.updateSavedGifs | Update.updateBotInlineQuery | Update.updateBotInlineSend | Update.updateEditChannelMessage | Update.updateBotCallbackQuery | Update.updateEditMessage | Update.updateInlineBotCallbackQuery | Update.updateReadChannelOutbox | Update.updateDraftMessage | Update.updateReadFeaturedStickers | Update.updateRecentStickers | Update.updateConfig | Update.updatePtsChanged | Update.updateChannelWebPage | Update.updateDialogPinned | Update.updatePinnedDialogs | Update.updateBotWebhookJSON | Update.updateBotWebhookJSONQuery | Update.updateBotShippingQuery | Update.updateBotPrecheckoutQuery | Update.updatePhoneCall | Update.updateLangPackTooLong | Update.updateLangPack | Update.updateFavedStickers | Update.updateChannelReadMessagesContents | Update.updateContactsReset | Update.updateChannelAvailableMessages | Update.updateDialogUnreadMark | Update.updateMessagePoll | Update.updateChatDefaultBannedRights | Update.updateFolderPeers | Update.updatePeerSettings | Update.updatePeerLocated | Update.updateNewScheduledMessage | Update.updateDeleteScheduledMessages | Update.updateTheme | Update.updateGeoLiveViewed | Update.updateLoginToken | Update.updateMessagePollVote | Update.updateDialogFilter | Update.updateDialogFilterOrder | Update.updateDialogFilters | Update.updatePhoneCallSignalingData | Update.updateChannelMessageForwards | Update.updateReadChannelDiscussionInbox | Update.updateReadChannelDiscussionOutbox | Update.updatePeerBlocked | Update.updateChannelUserTyping | Update.updatePinnedMessages | Update.updatePinnedChannelMessages | Update.updateChat | Update.updateGroupCallParticipants | Update.updateGroupCall | Update.updatePeerHistoryTTL | Update.updateChatParticipant | Update.updateChannelParticipant | Update.updateBotStopped;
export type Update = Update.updateNewMessage | Update.updateMessageID | Update.updateDeleteMessages | Update.updateUserTyping | Update.updateChatUserTyping | Update.updateChatParticipants | Update.updateUserStatus | Update.updateUserName | Update.updateUserPhoto | Update.updateNewEncryptedMessage | Update.updateEncryptedChatTyping | Update.updateEncryption | Update.updateEncryptedMessagesRead | Update.updateChatParticipantAdd | Update.updateChatParticipantDelete | Update.updateDcOptions | Update.updateNotifySettings | Update.updateServiceNotification | Update.updatePrivacy | Update.updateUserPhone | Update.updateReadHistoryInbox | Update.updateReadHistoryOutbox | Update.updateWebPage | Update.updateReadMessagesContents | Update.updateChannelTooLong | Update.updateChannel | Update.updateNewChannelMessage | Update.updateReadChannelInbox | Update.updateDeleteChannelMessages | Update.updateChannelMessageViews | Update.updateChatParticipantAdmin | Update.updateNewStickerSet | Update.updateStickerSetsOrder | Update.updateStickerSets | Update.updateSavedGifs | Update.updateBotInlineQuery | Update.updateBotInlineSend | Update.updateEditChannelMessage | Update.updateBotCallbackQuery | Update.updateEditMessage | Update.updateInlineBotCallbackQuery | Update.updateReadChannelOutbox | Update.updateDraftMessage | Update.updateReadFeaturedStickers | Update.updateRecentStickers | Update.updateConfig | Update.updatePtsChanged | Update.updateChannelWebPage | Update.updateDialogPinned | Update.updatePinnedDialogs | Update.updateBotWebhookJSON | Update.updateBotWebhookJSONQuery | Update.updateBotShippingQuery | Update.updateBotPrecheckoutQuery | Update.updatePhoneCall | Update.updateLangPackTooLong | Update.updateLangPack | Update.updateFavedStickers | Update.updateChannelReadMessagesContents | Update.updateContactsReset | Update.updateChannelAvailableMessages | Update.updateDialogUnreadMark | Update.updateMessagePoll | Update.updateChatDefaultBannedRights | Update.updateFolderPeers | Update.updatePeerSettings | Update.updatePeerLocated | Update.updateNewScheduledMessage | Update.updateDeleteScheduledMessages | Update.updateTheme | Update.updateGeoLiveViewed | Update.updateLoginToken | Update.updateMessagePollVote | Update.updateDialogFilter | Update.updateDialogFilterOrder | Update.updateDialogFilters | Update.updatePhoneCallSignalingData | Update.updateChannelMessageForwards | Update.updateReadChannelDiscussionInbox | Update.updateReadChannelDiscussionOutbox | Update.updatePeerBlocked | Update.updateChannelUserTyping | Update.updatePinnedMessages | Update.updatePinnedChannelMessages | Update.updateChat | Update.updateGroupCallParticipants | Update.updateGroupCall | Update.updatePeerHistoryTTL | Update.updateChatParticipant | Update.updateChannelParticipant | Update.updateBotStopped | Update.updateNewDiscussionMessage | Update.updateDeleteDiscussionMessages;
export namespace Update {
export type updateNewMessage = {
@ -2524,6 +2524,17 @@ export namespace Update {
stopped: boolean,
qts: number
};
export type updateNewDiscussionMessage = {
_: 'updateNewDiscussionMessage',
message?: Message
};
export type updateDeleteDiscussionMessages = {
_: 'updateDeleteDiscussionMessages',
messages?: number[],
channel_id?: number
};
}
/**
@ -9619,6 +9630,8 @@ export interface ConstructorDeclMap {
'messageActionChatReturn': MessageAction.messageActionChatReturn,
'messageActionChatJoinedYou': MessageAction.messageActionChatJoinedYou,
'messageActionChatReturnYou': MessageAction.messageActionChatReturnYou,
'updateNewDiscussionMessage': Update.updateNewDiscussionMessage,
'updateDeleteDiscussionMessages': Update.updateDeleteDiscussionMessages,
}
export type InvokeAfterMsg = {

View File

@ -408,7 +408,7 @@ export class AppImManager {
const msgIdsByPeer = e;
for(const peerId in msgIdsByPeer) {
appSidebarRight.sharedMediaTab.renderNewMessages(+peerId, msgIdsByPeer[peerId]);
appSidebarRight.sharedMediaTab.renderNewMessages(+peerId, Array.from(msgIdsByPeer[peerId]));
}
});

View File

@ -141,6 +141,7 @@ export class AppMessagesManager {
[randomId: string]: {
peerId: number,
tempId: number,
threadId: number,
storage: MessagesStorage
}
} = {};
@ -169,7 +170,7 @@ export class AppMessagesManager {
public migratedToFrom: {[peerId: number]: number} = {};
public newMessagesHandlePromise = 0;
public newMessagesToHandle: {[peerId: string]: number[]} = {};
public newMessagesToHandle: {[peerId: string]: Set<number>} = {};
public newDialogsHandlePromise = 0;
public newDialogsToHandle: {[peerId: string]: {reload: true} | Dialog} = {};
public newUpdatesAfterReloadToHandle: {[peerId: string]: Set<any>} = {};
@ -1095,8 +1096,10 @@ export class AppMessagesManager {
return this.sendFile(peerId, file, o).message;
});
if(options.clearDraft) {
if(options.threadId) {
appDraftsManager.syncDraft(peerId, options.threadId);
} else {
appDraftsManager.saveDraft(peerId, options.threadId, null, {notify: true});
}
// * test pending
@ -1382,16 +1385,16 @@ export class AppMessagesManager {
rootScope.broadcast('scheduled_new', {peerId, mid: messageId});
}, 0);
} else {
if(options.threadId && this.threadsStorage[peerId]) {
/* if(options.threadId && this.threadsStorage[peerId]) {
delete this.threadsStorage[peerId][options.threadId];
}
//if(options.threadId) {
const historyStorage = this.getHistoryStorage(peerId/* , options.threadId */);
} */
if(options.threadId) {
const historyStorage = this.getHistoryStorage(peerId, options.threadId);
historyStorage.history.unshift(messageId);
//}
}
/* const historyStorage = this.getHistoryStorage(peerId);
historyStorage.history.unshift(messageId); */
const historyStorage = this.getHistoryStorage(peerId);
historyStorage.history.unshift(messageId);
//if(!options.isGroupedItem) {
this.saveMessages([message], {storage, isOutgoing: true});
@ -1401,11 +1404,20 @@ export class AppMessagesManager {
}, 0);
}
if(!options.isGroupedItem && options.clearDraft && !options.threadId) {
appDraftsManager.syncDraft(peerId, options.threadId);
if(!options.isGroupedItem && options.clearDraft) {
if(options.threadId) {
appDraftsManager.syncDraft(peerId, options.threadId);
} else {
appDraftsManager.saveDraft(peerId, options.threadId, null, {notify: true});
}
}
this.pendingByRandomId[message.random_id] = {peerId, tempId: messageId, storage};
this.pendingByRandomId[message.random_id] = {
peerId,
tempId: messageId,
threadId: options.threadId,
storage
};
if(!options.isGroupedItem && message.send) {
setTimeout(message.send, 0);
@ -3259,8 +3271,9 @@ export class AppMessagesManager {
return this.searchesStorage[peerId][inputFilter];
}
public getSearchCounters(peerId: number, filters: MessagesFilter[]) {
return apiManager.invokeApi('messages.getSearchCounters', {
public getSearchCounters(peerId: number, filters: MessagesFilter[], canCache = true) {
const func = (canCache ? apiManager.invokeApiCacheable : apiManager.invokeApi).bind(apiManager);
return func('messages.getSearchCounters', {
peer: appPeersManager.getInputPeerById(peerId),
filters
});
@ -3907,13 +3920,16 @@ export class AppMessagesManager {
const pendingData = this.pendingByRandomId[randomId];
//this.log('AMM updateMessageID:', update, pendingData);
if(pendingData) {
const {peerId, tempId, storage} = pendingData;
const {peerId, tempId, threadId, storage} = pendingData;
//const mid = update.id;
const mid = this.generateMessageId(update.id);
const message = this.getMessageFromStorage(storage, mid);
if(!message.deleted) {
const historyStorage = this.getHistoryStorage(peerId);
historyStorage.history.delete(tempId);
[this.getHistoryStorage(peerId), threadId ? this.getHistoryStorage(peerId, threadId) : undefined]
.filter(Boolean)
.forEach(storage => {
storage.history.delete(tempId);
});
this.finalizePendingMessageCallbacks(storage, tempId, mid);
} else {
@ -3924,6 +3940,7 @@ export class AppMessagesManager {
break;
}
case 'updateNewDiscussionMessage':
case 'updateNewMessage':
case 'updateNewChannelMessage': {
const message = update.message as MyMessage;
@ -3931,7 +3948,24 @@ export class AppMessagesManager {
const storage = this.getMessagesStorage(peerId);
const foundDialog = this.getDialogByPeerId(peerId);
if(!foundDialog.length) {
// * local update
const isLocalThreadUpdate = update._ === 'updateNewDiscussionMessage';
// * temporary save the message for info (peerId, reply mids...)
this.saveMessages([message], {storage: {}});
const threadKey = this.getThreadKey(message);
const threadId = threadKey ? +threadKey.split('_')[1] : undefined;
if(threadId && !isLocalThreadUpdate && this.threadsStorage[peerId] && this.threadsStorage[peerId][threadId]) {
const update = {
_: 'updateNewDiscussionMessage',
message
} as Update.updateNewDiscussionMessage;
this.handleUpdate(update);
}
if(!foundDialog.length && !isLocalThreadUpdate) {
let good = true;
if(peerId < 0) {
const chat = appChatsManager.getChat(-peerId);
@ -3974,8 +4008,11 @@ export class AppMessagesManager {
} */
const pendingMessage = this.checkPendingMessage(message);
const historyStorage = this.getHistoryStorage(peerId);
this.updateMessageRepliesIfNeeded(message);
const historyStorage = this.getHistoryStorage(peerId, isLocalThreadUpdate ? threadId : undefined);
if(!isLocalThreadUpdate) {
this.updateMessageRepliesIfNeeded(message);
}
if(historyStorage.history.findSlice(message.mid)) {
return false;
@ -3994,7 +4031,7 @@ export class AppMessagesManager {
if(historyStorage.count !== null) {
historyStorage.count++;
}
if(this.mergeReplyKeyboard(historyStorage, message)) {
rootScope.broadcast('history_reply_markup', {peerId});
}
@ -4005,14 +4042,18 @@ export class AppMessagesManager {
if(!pendingMessage) {
if(this.newMessagesToHandle[peerId] === undefined) {
this.newMessagesToHandle[peerId] = [];
this.newMessagesToHandle[peerId] = new Set();
}
this.newMessagesToHandle[peerId].push(message.mid);
this.newMessagesToHandle[peerId].add(message.mid);
if(!this.newMessagesHandlePromise) {
this.newMessagesHandlePromise = window.setTimeout(this.handleNewMessages, 0);
}
}
if(isLocalThreadUpdate) {
break;
}
const dialog = foundDialog[0];
const inboxUnread = !message.pFlags.out && message.pFlags.unread;
@ -4402,16 +4443,33 @@ export class AppMessagesManager {
const channelId: number = (update as Update.updateDeleteChannelMessages).channel_id;
//const messages = (update as any as Update.updateDeleteChannelMessages).messages;
const messages = (update as any as Update.updateDeleteChannelMessages).messages.map(id => this.generateMessageId(id));
const peerId = channelId ? -channelId : this.getMessageById(messages[0]).peerId;
const peerId: number = channelId ? -channelId : this.getMessageById(messages[0]).peerId;
if(!peerId) {
break;
}
apiManager.clearCache('messages.getSearchCounters', (params) => {
return appPeersManager.getPeerId(params.peer) === peerId;
});
const threadKeys: Set<string> = new Set();
for(const mid of messages) {
const message = this.getMessageByPeer(peerId, mid);
const threadKey = this.getThreadKey(message);
if(threadKey && this.threadsStorage[peerId] && this.threadsStorage[peerId][+threadKey.split('_')[1]]) {
threadKeys.add(threadKey);
}
}
const historyUpdated = this.handleDeletedMessages(peerId, this.getMessagesStorage(peerId), messages);
const historyStorage = this.getHistoryStorage(peerId);
//if(historyStorage !== undefined) {
const threadsStorages = Array.from(threadKeys).map(threadKey => {
const splitted = threadKey.split('_');
return this.getHistoryStorage(+splitted[0], +splitted[1]);
});
[this.getHistoryStorage(peerId)].concat(threadsStorages).forEach(historyStorage => {
for(const mid in historyUpdated.msgs) {
historyStorage.history.delete(+mid);
}
@ -4423,9 +4481,9 @@ export class AppMessagesManager {
historyStorage.count = 0;
}
}
});
rootScope.broadcast('history_delete', {peerId, msgs: historyUpdated.msgs});
//}
rootScope.broadcast('history_delete', {peerId, msgs: historyUpdated.msgs});
const foundDialog = this.getDialogByPeerId(peerId)[0];
if(foundDialog) {
@ -4658,9 +4716,8 @@ export class AppMessagesManager {
private updateMessageRepliesIfNeeded(threadMessage: MyMessage) {
try { // * на всякий случай, скорее всего это не понадобится
if(threadMessage.peerId < 0 && threadMessage.reply_to) {
const threadId = threadMessage.reply_to.reply_to_top_id || threadMessage.reply_to.reply_to_msg_id;
const threadKey = threadMessage.peerId + '_' + threadId;
const threadKey = this.getThreadKey(threadMessage);
if(threadKey) {
const repliesKey = this.threadsToReplies[threadKey];
if(repliesKey) {
const [peerId, mid] = repliesKey.split('_').map(n => +n);
@ -4673,6 +4730,16 @@ export class AppMessagesManager {
}
}
private getThreadKey(threadMessage: MyMessage) {
let threadKey = '';
if(threadMessage.peerId < 0 && threadMessage.reply_to) {
const threadId = threadMessage.reply_to.reply_to_top_id || threadMessage.reply_to.reply_to_msg_id;
threadKey = threadMessage.peerId + '_' + threadId;
}
return threadKey;
}
public updateMessage(peerId: number, mid: number, broadcastEventName?: 'replies_updated'): Promise<Message.message> {
const promise: Promise<Message.message> = this.wrapSingleMessage(peerId, mid, true).then(() => {
const message = this.getMessageByPeer(peerId, mid);
@ -4738,11 +4805,15 @@ export class AppMessagesManager {
// this.log('pdata', randomID, pendingData)
if(pendingData) {
const {peerId, tempId, storage} = pendingData;
const historyStorage = this.getHistoryStorage(peerId);
const {peerId, tempId, threadId, storage} = pendingData;
[this.getHistoryStorage(peerId), threadId ? this.getHistoryStorage(peerId, threadId) : undefined]
.filter(Boolean)
.forEach(storage => {
storage.history.delete(tempId);
});
// this.log('pending', randomID, historyStorage.pending)
historyStorage.history.delete(tempId);
const message = this.getMessageFromStorage(storage, tempId);
if(!message.deleted) {
@ -5322,11 +5393,8 @@ export class AppMessagesManager {
delete storage[mid];
const peerMessagesToHandle = this.newMessagesToHandle[peerId];
if(peerMessagesToHandle && peerMessagesToHandle.length) {
const peerMessagesHandlePos = peerMessagesToHandle.indexOf(mid);
if(peerMessagesHandlePos !== -1) {
peerMessagesToHandle.splice(peerMessagesHandlePos);
}
if(peerMessagesToHandle && peerMessagesToHandle.has(mid)) {
peerMessagesToHandle.delete(mid);
}
}

View File

@ -112,7 +112,7 @@ export type BroadcastEvents = {
'language_change': void,
};
class RootScope extends EventListenerBase<any> {
export class RootScope extends EventListenerBase<any> {
private _overlayIsActive: boolean = false;
public myId = 0;
public idle = {
@ -169,3 +169,11 @@ class RootScope extends EventListenerBase<any> {
const rootScope = new RootScope();
MOUNT_CLASS_TO.rootScope = rootScope;
export default rootScope;
rootScope.addEventListener('album_edit', (e) => {
});
rootScope.addEventListener<'album_edit'>('album_edit', (e) => {
});

View File

@ -214,4 +214,17 @@
{"name": "local", "type": "boolean"},
{"name": "appVersion", "type": "string"}
]
}, {
"predicate": "updateNewDiscussionMessage",
"params": [
{"name": "message", "type": "Message"}
],
"type": "Update"
}, {
"predicate": "updateDeleteDiscussionMessages",
"params": [
{"name": "messages", "type": "number[]"},
{"name": "channel_id", "type": "number"}
],
"type": "Update"
}]

View File

@ -98,7 +98,8 @@
padding-left: 3.3125rem;
cursor: pointer;
display: inline-block;
height: 24px;
min-height: 24px;
margin-top: 1px;
line-height: 26px;
user-select: none;
transition: .2s opacity;

View File

@ -893,6 +893,14 @@
.general-settings-container {
user-select: none;
.sidebar-left-section {
padding-bottom: 0;
}
.sidebar-left-section:last-child {
padding-bottom: .5rem;
}
}
.two-step-verification {

View File

@ -174,6 +174,12 @@
top: -12px;
}
} */
&.search-empty {
.gradient-delimiter {
display: none;
}
}
}
&-container {

View File

@ -301,7 +301,8 @@
.preloader {
padding: 0;
position: absolute !important;
height: 100%;
top: 100px;
transform: translate(-50%);
> svg {
height: 50px;