From d4b9b65724469304ffe8f207f4e84ddef17d1904 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 3 Mar 2020 16:07:22 +0400 Subject: [PATCH] First version of the filters side bar. --- Telegram/CMakeLists.txt | 2 + Telegram/Resources/icons/filters_all.png | Bin 0 -> 1160 bytes Telegram/Resources/icons/filters_all@2x.png | Bin 0 -> 2398 bytes Telegram/Resources/icons/filters_all@3x.png | Bin 0 -> 3522 bytes .../Resources/icons/filters_all_active.png | Bin 0 -> 877 bytes .../Resources/icons/filters_all_active@2x.png | Bin 0 -> 1767 bytes .../Resources/icons/filters_all_active@3x.png | Bin 0 -> 2592 bytes Telegram/Resources/icons/filters_custom.png | Bin 0 -> 492 bytes .../Resources/icons/filters_custom@2x.png | Bin 0 -> 938 bytes .../Resources/icons/filters_custom@3x.png | Bin 0 -> 1463 bytes .../Resources/icons/filters_custom_active.png | Bin 0 -> 382 bytes .../icons/filters_custom_active@2x.png | Bin 0 -> 750 bytes .../icons/filters_custom_active@3x.png | Bin 0 -> 1219 bytes Telegram/Resources/icons/filters_setup.png | Bin 0 -> 232 bytes Telegram/Resources/icons/filters_setup@2x.png | Bin 0 -> 493 bytes Telegram/Resources/icons/filters_setup@3x.png | Bin 0 -> 916 bytes Telegram/Resources/icons/filters_unmuted.png | Bin 0 -> 683 bytes .../Resources/icons/filters_unmuted@2x.png | Bin 0 -> 1393 bytes .../Resources/icons/filters_unmuted@3x.png | Bin 0 -> 2128 bytes .../icons/filters_unmuted_active.png | Bin 0 -> 470 bytes .../icons/filters_unmuted_active@2x.png | Bin 0 -> 936 bytes .../icons/filters_unmuted_active@3x.png | Bin 0 -> 1482 bytes Telegram/Resources/icons/filters_unread.png | Bin 0 -> 864 bytes .../Resources/icons/filters_unread@2x.png | Bin 0 -> 1836 bytes .../Resources/icons/filters_unread@3x.png | Bin 0 -> 2735 bytes .../Resources/icons/filters_unread_active.png | Bin 0 -> 677 bytes .../icons/filters_unread_active@2x.png | Bin 0 -> 1402 bytes .../icons/filters_unread_active@3x.png | Bin 0 -> 2108 bytes .../dialogs/dialogs_inner_widget.cpp | 67 +++---------- .../dialogs/dialogs_inner_widget.h | 1 - .../SourceFiles/dialogs/dialogs_widget.cpp | 2 +- Telegram/SourceFiles/mainwindow.h | 4 +- Telegram/SourceFiles/window/main_window.cpp | 26 ++++- Telegram/SourceFiles/window/main_window.h | 13 +-- Telegram/SourceFiles/window/window.style | 12 +++ .../SourceFiles/window/window_controller.cpp | 10 ++ .../SourceFiles/window/window_controller.h | 1 + .../window/window_filters_menu.cpp | 92 ++++++++++++++++++ .../SourceFiles/window/window_filters_menu.h | 29 ++++++ .../window/window_session_controller.cpp | 28 ++++++ .../window/window_session_controller.h | 11 +++ Telegram/lib_ui | 2 +- 42 files changed, 235 insertions(+), 65 deletions(-) create mode 100644 Telegram/Resources/icons/filters_all.png create mode 100644 Telegram/Resources/icons/filters_all@2x.png create mode 100644 Telegram/Resources/icons/filters_all@3x.png create mode 100644 Telegram/Resources/icons/filters_all_active.png create mode 100644 Telegram/Resources/icons/filters_all_active@2x.png create mode 100644 Telegram/Resources/icons/filters_all_active@3x.png create mode 100644 Telegram/Resources/icons/filters_custom.png create mode 100644 Telegram/Resources/icons/filters_custom@2x.png create mode 100644 Telegram/Resources/icons/filters_custom@3x.png create mode 100644 Telegram/Resources/icons/filters_custom_active.png create mode 100644 Telegram/Resources/icons/filters_custom_active@2x.png create mode 100644 Telegram/Resources/icons/filters_custom_active@3x.png create mode 100644 Telegram/Resources/icons/filters_setup.png create mode 100644 Telegram/Resources/icons/filters_setup@2x.png create mode 100644 Telegram/Resources/icons/filters_setup@3x.png create mode 100644 Telegram/Resources/icons/filters_unmuted.png create mode 100644 Telegram/Resources/icons/filters_unmuted@2x.png create mode 100644 Telegram/Resources/icons/filters_unmuted@3x.png create mode 100644 Telegram/Resources/icons/filters_unmuted_active.png create mode 100644 Telegram/Resources/icons/filters_unmuted_active@2x.png create mode 100644 Telegram/Resources/icons/filters_unmuted_active@3x.png create mode 100644 Telegram/Resources/icons/filters_unread.png create mode 100644 Telegram/Resources/icons/filters_unread@2x.png create mode 100644 Telegram/Resources/icons/filters_unread@3x.png create mode 100644 Telegram/Resources/icons/filters_unread_active.png create mode 100644 Telegram/Resources/icons/filters_unread_active@2x.png create mode 100644 Telegram/Resources/icons/filters_unread_active@3x.png create mode 100644 Telegram/SourceFiles/window/window_filters_menu.cpp create mode 100644 Telegram/SourceFiles/window/window_filters_menu.h diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index cb7a45ef93..e0acb5c18c 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -937,6 +937,8 @@ PRIVATE window/window_connecting_widget.h window/window_controller.cpp window/window_controller.h + window/window_filters_menu.cpp + window/window_filters_menu.h window/window_history_hider.cpp window/window_history_hider.h window/window_lock_widgets.cpp diff --git a/Telegram/Resources/icons/filters_all.png b/Telegram/Resources/icons/filters_all.png new file mode 100644 index 0000000000000000000000000000000000000000..9cf16f5e0f7bd3b78e891ab9f39af44512f778c9 GIT binary patch literal 1160 zcmV;31b6$1P)!eiS8-h!D!Fgb67F<&kHh6h*?sM3l#f7#bKV zkBBfKnHVUM0RwqQ$~#J4A&|32sZ_uT*7d+QFII{WOk_gdfj_S$FfwM>jL z;O~F){P=H}d=mL4q_-pA5z>p0t)7B39}p10a&vQ8dU`qw3kzdDK0eH3GO@F>Gq$_C z%ciEL*u=yH^(7mlUp)2}Urq#idwb#a^%eA<_xE=g9v+6!&`^tbzw-4tXPHb+P7YjO zUlR``G%_**#l^)C5)uNguCCzh>t#2@bvUVy7%|@P*PH2l$181va&Mx z`1l|Pe^^TOid^yB}Lw%`ucjSK`SdOX)(B<{QP`t z?L|Tk4i2!lw@0gNYiqL>OxCZdsUZyh(}SCvn>?-&5#^jnNCH}2T?HE(8>O;U^6c!a zk%ftb78e%@Brh+|D(6}&PfAK6to{9cYp}iud3$>k!0qiV;MQq5v1W|lQ*eBIOqdZ7 z5rkJ)R|g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_tKzw>8j$9HOR4*P;b$o9lj*}Db9G1d*19o&-uh4cMGHW7?ASq(TRZ&L_wV1g$AOQ-8wRmC zaFr)lxK1w)jfgpO=7__G4@d1@%A92aMwh>g7&dH}$e%yID^C_2Qyqh%i}a)slHRy+ zqZm4Ls6aTHQ;3!J3l=Q!rHAJXl2ODn51bI0MC=J6A$S<^6%pM;K6K=Z>HXqCvt1%A zp?DSE0IZzsD_5=fo6~q>I64{apxp*;?uS@ zgRyzQp2099`yO@%aW1~15dI6mPg%HdVN@tc?)O&#BrERqjOAaqZe8N6SgKK@234$B z(K6r#3l_Ax0Z_im5NE5<$&)9E{YloY>csP(1juQic*loE+itqG(ck~C0MZBVhc-qv z{4n{K+k^lazHSIm2#^5*Lv=WVLVyei7^=e=6ar*Gz)&5|pb#Jf0*31U09PW>_~^?k QtN;K207*qoM6N<$f}RbF6#xJL literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters_all@3x.png b/Telegram/Resources/icons/filters_all@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..e1cc8aa779bb5dfc876d9cc3c5ace258b5208442 GIT binary patch literal 3522 zcmV;z4L$OSP)ljAFou;bG1>XT_XzJn#DI8~%O&yxs2E>6zKkk0}^-wx>f?ebc$BCk11S)8&&U z8c3-LpFW%a(|`|{X0L(|m=Bm{8qkbgzlQmMX{G_q*!63e513{e(2QNbhWUVLrUA{^ z^=p_9m}VN#j9tHm`G9Gr0nOO;YnTt1W*X3pUB8BD23YEN<2Pl>l&oyovaDLQYOHwi z;;dM)VysA!A}m|BZ0zTse>SdEsZz0zA3qw``}gnJy?giAty{N@>+IRH?BvOl?Ay0* z@g|xl{G^~(;Sr*RHwB zFWwRZu&7@@{qz&>)~y@gw{IW+=bwLgB+&KRD z@#9EhB+Q$dQ9ghEd`?ZQ&cHaf98yeVaXa z@E~zyNPS-7h!F!8j3jYYtywB*d0({@>ixMILu zMrgL)bVPdi@FAZ&cP{_^_uo01Pf~{Ct4x_P{Et8W;1@4m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#I6i}4O4oz z<&iOugRe5&hjBny$&w`*IY2UekPbB#gaH^%$iV;%{?12_9%ZxuE_6YXmE;2^(~L*q z7%8K91!!2A!Nl1O`GC36UJTMIdtkhg%;o9Z)jy=mTa_h7PwrU^<{=;?W1pqzoNyeZX`;$;6`%m`NEr-1>m& wfRc$vA25?Lbhz~a(*Y$Dk3L`~W$1AGAKP)TptB>kr2qf`07*qoM6N<$f(=r#IRF3v literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters_all_active.png b/Telegram/Resources/icons/filters_all_active.png new file mode 100644 index 0000000000000000000000000000000000000000..133c37a7aea95402a6c3c72c329a2dfc6cabd07a GIT binary patch literal 877 zcmV-z1CsoSP)Fk1rA(h&g*x6_uQE?*FXpX z`uv(<{54FfL|TOOzDTP=f38AiJ;t)#Znu-g#YHkVH%De>X2`(605KYk0o}T28rf2L!nvca|fwi?YD3{BiH(p;~VRLg6IyyQu@#^KO+O)|G4-Z2s zmD1zE+0W0h5P0%|)?D3M5fHm|1t+1Z(t(Cv0ZAP@kX&88-xmTL+1^z=Zb zQqfG%jKSe>NJ+1*t^hau$jFGA1e3X|g9c0eg>J@g8&0QF!a6xQA=A^-Bp#0wS}7qu zN2tHQU+DN1WnW*P6n=MiC(UDHV`OVHU8O+ks5*ZpAVzRv8 z2+{9MK0ZEV`?t)+Vo}18D}{pDY$o(HbNCz~tWYwUnAjlIV`F23 zo#ue*Dc;`RAQ%inS67!rhMpt{hr?V5-UME+S5zI;i3!m@ z!2!|J0{i>>kk9Ag<>dw5-{0Z>{vM*yDER$;7#tjAN!r`n;o#ta!$5`4=VN|?{5+xE z-CcH{(VhgjIoH?M0h1^J@N+0-T;m_+%E}5{UtbH!pmKhGo{Ll9@PyFV+1UxS#RFcp z3g^1((a}-JWHKBPe4)d`L#EGWvw)vd16NE)!&wWYMvte8HbI!2oP_S~Zf09uT?N`G z0e?wmXJ?sSnafZW==3{=uv7mewH6`0>bENN=PL9M@l7*&OcRJ*00000NkvXXu0mjf DXF`_8 literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters_all_active@2x.png b/Telegram/Resources/icons/filters_all_active@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..762dc383de750e2e314bcc134d4519894eff7fe9 GIT binary patch literal 1767 zcmVKE9AQIFF(uJBI>Bdc= zCJ~hj69QMc5nGffkj8wENDO5BwrHz`}r%mTvdhh@4*PFTT`!6$ad2h}+ zGjrzWnfvCRxq1;oC|siG5b)NK3-Lb!0uUn<1Rw#3L4cta5hMUH2r$$lf&?H20ft&c zkO0IWz)*__5`Y*47-|tg3_!jNyocFheNO2++5n#)kVL2`9h7BuV25?$B!S= z!oou8<>lp2zigbRz11>Hu(*67QI~x)|Ap8~av~ug#EzbZH5D-9DR#rTXkF?z5;^JhG;1Neww{Zt8 z^}+qHiqBKAv9XSR%(1&a_`{Ln;$m4p4Gj&XqN0M}^PVFL7ww*&9*>J2lS8=E1`y^e zEiFw_y?y(Z9zTBEEVr~V@cqAz^%~)g5O=bkTn-;TECYeiuzdgiokE1kbb9mDl5;Jw z?CflE;J^WB@44mV$&)hYo;-OX)%We&M;<(QKyKc=Ngz8Qv*D?50fL(#PhW1eQTjMM zJS_9)+O=y0HkUFPPlXH6p+kpw`f{s{(#O}YU#t9qEdhahl1gq(ux9~bwi1$Wvbp>E z`jYPMZW0z2CX-vMZ~?;9sizk$AJ^B{Rc^<}$CIX}CY4-Iz%}zvpFZie_Za!dj~`XO zY;SL?WGE;rDPd=D`fuQIh?fua0na(STm7yT!7HBudk2UnY#=gK76Pe z`qZgYDw$Fc85yY*Y1Wxx2CXPAGfzx+z$q+EOiWbG;nk~GR+ktm&zw1|R2wx&KTKKTJ*B5G=CiZ!mw^cc~>!NICY z;;9Eufp-N|Z7sl=1J1UAy^LuR=FfkS<)f z;Ox0G`-k*}8H(j!y``mv*%l2RJ$j_s-m5(HxbSHJ^&K>R{@SP*A z2-E;$8qYRBFJHdocFI=6xw$!7US3Wi(PeU0^?CjJb?)x*$Q*x#t-#RI83&Y?m&fgt zQA2!)eD>@aEiEmz3I^{v_wL=}?*8}h-?pCR8v_I<9CUMYlj#_~H-yK+_$CPc^ge(7 zoGvUZ(2b1^X_t#TU3`ZTa>sOVaFE`;dsmu3P*9N8Ur{DYNJyaLPgPnVCuN-@mVEjt{qxr#9rbp$O6=>})ya zm*MPPy6{XZBqW5u&0cy#|MTb11YV?)>Lx$%h`G7BnOwbk)g&^1!iJJS+QwXGefeJi zVogF%kFV^&uNT2nSGY$KJidZ-4S|g%_rE*rX+V15jL5lj(ndPnOSS?Kp%xJ&05J$K)FOfeAO-=3T11cl#2~;>iwI%>`U_U&p-@w@gKPi*002ov JPDHLkV1k+8T~h!6 literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters_all_active@3x.png b/Telegram/Resources/icons/filters_all_active@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..8a610c42fdacf909f46d6a212b39e589827c3f7b GIT binary patch literal 2592 zcmb7G_d6SG7fx)kXN?*~YqnzZB5E~7?OjDwjnv*%UP6snwTU(oN~AR+Myonvw)Sq& z+Ej^AYPD8<`Tm6Whx43Y&ULPHp8LM;`=nV}K-oY-AOHZsW^&uehMN8VA509?H{08B zh??kp^v(4FfQD?AGY@(IfO*QqNZ;-eaN8A%B-TJSxts%Zf|D~0adoFi3sO*)(M2i);BJ1pvoQElm)k#s&%6m( z=}P5T!vBx%ik|Rf|+{d4@grlFU2jtP*`vLSDEdwrm zh*r7ywUUZ|Q6Z!G_&{c7tRj`t?!`_7@yYGt%!>DR7TTZ*&~-@E&ioK%&Q~tD1Xyc} zw>YCr;L8hzB0h~^_4buKKckrL9w3I$S}H3O?oRDfwa#5;1u`Do!DB!NQfxHIZ;C*C zH*oi3jbr`Ztt_Dun!Bn9a{xO_2KqVmCa>_rHjIS1_g>z?h(7aT1Fz!LvjAaF5;m%A;b`)jY_--oQ zTPqhFm%9Hn*x{88&R^$&AYKbTUKy*}w>;8&_Spgp8CpNhSA&mBxtGc)Cv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)yBjS~>B1=Hw@T5<|0*&Q3jrX)94A_Ja ztO9mTzm^=N@kTMQdQLqBv!FbLz?rVvoeHoNcsn?9o9Vw4opZb+Dy<)}G-^^$K7fg_ Kg%QC3miRw^1^E8} literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters_custom.png b/Telegram/Resources/icons/filters_custom.png new file mode 100644 index 0000000000000000000000000000000000000000..499de7caa17cd02f276af422908fb777cf257f41 GIT binary patch literal 492 zcmV2BI>WO&Ep>)nX^~ zJWthit*WY0o6UyJ=}F=_)@ldf=eIo`51?gRE|)-k$+9eiD2m{Izr*czlhUAR8aSO! zkmorRMIq)<;K}Z_k0i80k~&?k>$>WCz4lw%Hp};Yc22?+6{3nP%hD<#4(7_XTCD(y z$q5)CwYS?X?Du;(9*?kIui5-j2(ieFbFo+e?m7L(5<$**FPAxjuiJ~Hyk!4MNFwp- zpAMl;R?~)lt!|9|bQBt++P`4T3Yk=!jzZ`2Sr-!ofj;(4m6_snG7}bAhb@g^FS^}s zH|W9~l1$i0MrwS3Zh3q$>UR-dv_s}&a|wgqScFN~5+U(&mE`=ie>$7`(@IGAvqF+G ioqtxSQ$qTFokBn9UF;~z9-r#~0000!lvNA9*CwjU# zhEy=Vo#mTf=qPghc=I)9mN^OGRj!WqS9- zGijUm%M0kVpZ)UXi^}4QE4JKz+osO$w{z#tiT(Zkvtv)5Oi|h!xBg+BkB;;y2^03O zziV@Y9u~|nnh|#W{rA%^OICdiUmLd7>OM>2`x)E#8DE`^m~}So(94o_+VS!6+#1#< zPm3%ko`1ge+1jwzf7h)L6*4;gG>E6&`QpnGm!(011;~9n{U6(s*Rc%81MMx?%lbPy}Jdz`Ldl_%f?dM=A^iC-L9!IWxtFHnSWF| zFsuyGdh2uQRMYkA;gTFIC;XJ&J9Zy+T9LZ&*%$qls%i;mXZz-Dk7j9h+cJ|s+ zQy=~N7gu33uXO&?qR14ZnWgt$unUExlI*T1EbpP#?=k7nw&t-WrGo1aYl_cGr^>el3@ zxb^DF6FFXfXbSR_nj9rRZ%c#Pg>5q(theebcx6rTQ8PdOCv?7}b?Lqo2ZI9}=QqhU zTV>cW@NHRW$?@v2;GXvO_QkSGHVFyH2(zqR@N>dWIhGg23o2~%t}6O*s%!Ms{%Bz0 z1)0evW&c&~lV9B?E*E{xiTR(Wv#>uq)i6Q(T!Vyw69ebwW+Es7hkC}D-)BzcJa9J# QnE4nyUHx3vIVCg!0KLwelmGw# literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters_custom@3x.png b/Telegram/Resources/icons/filters_custom@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..4e0b2a126e56f8391968b21831dbc9764467f920 GIT binary patch literal 1463 zcmcgsX;6|00L24E)I=jhlX7!}S}#0CO*19YB2?5&Wpj7(pghpBlx-nNODhj_RYLOf z$hLLLE#+uUyzpSxi@Y_3tY%$EEw4&Tg<5xJXZGj*+aK?}nfK%Udhg{12OTwpnnOV# zkRjn1K6G2De*>bk%|&M-o^FfwSzI6v1mYLztD?am5IBW^$Aw+eSga5cZHe$30~t7M zDh`g*GSwalz`D2?`{Go(((&L&LaBxs6mjnDs`eJo;wQ_S)_I7EhJU3TwOeU){5M2>{ zn4wR4VK6;~EY|dm8@jJCo5@V(i}3Jp!Fm>;7klVCvbD7}EhEE=PINT0x3{M<7z~eN zvpYFuWoO-7U1Ng#XIe!fK7~SgV9z3P89~Luoh1o08ltQHg8ETioq$9leTAd|o*o{d zWb+}&ZgX?!uL6M}MlO?4nap;#Ua2%dJ~b7O!C)49dXAnR?C$m@mc4GMh=(qBTTzpf z?O-oPM?>RY)z;Q(UJRX`n~RV8q15*F(W$;Zg5@D|a!5Mw{{7ynswy3229w#iwzgKR zD6AuW+2uC-4E21kcyV=g1P+Hwz^TD3h8N=5;KcC61Opq|^u+?@&k>F%rCMHlE)Xs@3Wc!k9xr(8JEo&fv^G53G}uNzUVO z7^ku_`Q!R}i307?z$jF3IObjP?2&@;HefH*!Av)PUAj^JV>0K{=4RsamJfyUY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b=ex$9PP4sQ+cC=?dq#_Q91{rx+A;4&PmWT zT^iwkf`uhM+5zmT1^XFNblH}+ZIxiyB-Xs=jc1=mY4rrUj m*-~YurhILrARs!#_A^Faom^(BSF;Ehe+-_kelF{r5}E+qm$>Hu literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters_setup@3x.png b/Telegram/Resources/icons/filters_setup@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..87ab4420c260ce6fd62e4b22cea2dc05fbd79df6 GIT binary patch literal 916 zcmeAS@N?(olHy`uVBq!ia0vp^IUvlz1|<8_!p{OJmUKs7M+SzC{oH>NSs56Zy**tV zLn;{G&UW;B>>%LEE0sEPamw7wPi!pRryNe1>-VYuKabVA?f#UAyaZ7${3uAd#FQ}x`! zdTW2l!#T%i`yMt~8G3&+CeRYh(s0?IA+he* pB_58+kG`-w6L1j^y_J4oDwTPWk@3Da37E|oJYD@<);T3K0RU<+sVD#d literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters_unmuted.png b/Telegram/Resources/icons/filters_unmuted.png new file mode 100644 index 0000000000000000000000000000000000000000..819d3f7ec696109a8e88808071f98ebf24e7b6c0 GIT binary patch literal 683 zcmV;c0#yBpP)fEV9w!inC9a=m^XvPnM{VfEEWq0hr={* zj*-n~KWE70azU+DgX{H5;)Oy%6~{RSu2rj5a5|mp8rK0)PQF8azaM6^8HwI*H|X_x z5Rb=I0i0tF*D$8jDPWBWGl-QpG#ZUaXt`WMBocWl6pcn+|`f@QfW0i-EOxEi-I)5IY$M<0XL2h9&Z0wodw%$y<02 zX&DmrPpU(~U{J&(TsOmE`1Iq4bFw03lM-{=j zUSMsxTvl;<8eC3nhy$yn?RJ~AJDm=o5ggramvXIEOU3Ec3UaR*3WY*&KA#^Nf;n6h zh#IZGW(WmQ7(2Dw?Py?U-ZTT!UwdZYBO%=OA92BnScbS}=uWK;>9&PSegh;tk>Y^I Rm;L|%002ovPDHLkV1n73IDh~E literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters_unmuted@2x.png b/Telegram/Resources/icons/filters_unmuted@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..3244112e856ddb7c79d72dbfb976dbd96e573102 GIT binary patch literal 1393 zcmV-%1&;cOP)(zKmy{Vf&?T1aR_j_Wd=z=90HtfnL!c|hXAKrW{?ELA;9UD8T8!& z#l^+B1_uXSJ3BkB`}=#>!^4BSjBVKW9Rz=@I&#(5*8>3pMuL3}4GoU?Mlo>)PGe)E z5f@E+Q&W?Zkn9JPn3xDJFE1JpMh!SNDJjV*NcIDoo}Ok{JU>4}cXv0$$H%*`uC6Y? zHdIFoVOa~Pudfe2KR=lO>B{Qrs$rljD=YL+ri?m!dwUJ%3WQ`Gpw7-tCMczH zdV1(A*`{Dil zo#BL;R9sx_vpyf7i3b!C5&}m@M@%5Nz~<-Yn+~L)pg^O`1>H+X;sJGZbTDu} zK0ctNq{K8FC7`mhGC-ZQw6(Pf)34b1`V+9>To12?|4T4JKY21anX;Isz z`}{2n2b7bO!}zkfxyjT;R@A!Hwnf+y4k$G>mGNtPdz-0?tf+OTrKO2f@75(85cxsL zIC*@0%+y6z)VkHSMc5J!C^9mV@e8+6t&+RDJ4UtIHq+^6C4kJsm0y^Uy9%Q#AOKBR zCsx}NoG*4iDojjF=$^HC(&M4ed;lXOBb0l8iny6RFfd>#91IFK z^7W3DMn^|Q*)|6VH__D&K0ZD|O-+p`2f2ExtE)8|`RG$&VIg;}hs;stngcXDJIiFx z$;k<%r>85*ZTlp9K|r=Y7+>b*=0w;x2S|OOS5;Ld!YRLWR903pfY3KDGK4qA93ZkM z!#L&88yM~&@udb@Zf|dS!E^gf-{#euRv8%?MQE9ypBLeWaq!+aj3=hwRmd@r^MDZI^78VxW3;%q zC;|@ZFqc6%KQuHHHa0f=f<)ehHVg#&{E@Y_HNY1rM8qZpkm5*PT^(#~ZNd5Zxz};w zty!6`{=`QHZ{_Ul49Gzu)YjG->Qn3YvTiC`&@281kM6%{JPX+@00000NkvXXu0mjfynKF7 literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters_unmuted@3x.png b/Telegram/Resources/icons/filters_unmuted@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..113455c3e6d1a424a5ce705b6382ec73aedcf3db GIT binary patch literal 2128 zcma);c{~%28^>4X$kAnKzD2po)HJ#8=BU`nHTq&BqdAKlbFAM=$iBv;_|ZZtw-x0+ z=3345b<9y%Qo}|vQRe8o-~YeY>-YQPd7i(Y=l%M8K2Mqx!cIo=4@m$3AaltcepNU_ z{!(8|#Y0C+`~+QEnd021Pt;8w1&`&PUe=^!Mi+B*_~-mj|!KB5wP z*v1u_UM)`F6_K0iNuMhbul?L}PuwikK*SH;S{jcs%N5Zif;%K^T}c}iH8;Cw$|hQ2 zqi(El!YUmKW3k-W+im!n3oN$_0hhHxef%82nt?UKz1!*eBiN&B!7YMpQ>RvLO&`-nPmE3oil z%0b+FiW>J_mI`-ocbhxUAah4wBDwUt;?7_K;sXk~}83`y+FpRik8vg71 zT--v#52fVSad1@MBb^PZS$t);MI0ZV&-PSZTSS{C?M&j>~ENhnFfyAyVT_w}V?l zrq1s!PryJBW|<;l7ajHtBLk744R5os#$M6wdj!slNAWj;=B&9w|)?8-d6Q3n=jj4ck?x2z|FELm&m z$JY3?;#|pNx||5&TpPO9w>@cTZJuFrOg&@lfUNo=yPfc{@CGTj`w4FjWk@fj7Uem} z{u`9IJgHlO4je2v@Rtq=4G!AfT*=RQI8_^%qOSIbOWnUjI33TnF~BahA#4NkItD9i zYwOdV6neLmk)d#+(n>Vn-Z*U9FtTyT0469*+S|z^bVM@Arz}9UNm6H6Uw*U~2MBBJ zs!N14nZjUw`07Su)M%orm~18C_n!N2O-f~+g2vUqQaZnZ5v~bPdcQ;p%K}CTb3Bw4 z^gI>ZZ43|Rdz0m1y#_uOK*uM>ZiFp-0-wiwBW~*A>qPi#;wM^im_7Bw?d=o5q!ESS$~Zl z!7i4TI!N2=Go^2^jD_Y1o~ZP^c$RX9OvM75k4fiKCzp8>HTb#CWE)u&ZVVJ}?p_0E z9?%b)UhFzmPjt?YtMYooOo>ErQLp@x9czNTJzvQb-C3WOv<)@7r!XN2$SZ4U#c#Zp z6!Z1o{<4!&JLTN_D>HnR-9Ci8PO%>FC`oV})mb3sv9;V=RO~Y9UPRiTynuUnjI%KG zv});wy7BR4{?|VD7LFp;aUrt-zk$>4Z)!3Q#(zjd)HF|yXT09s{>e+)6&O{qGjqJQ zM8u?1XCSrZIs#OyMgk|>{Tjb8u}*ROmQ>WVd9 zb?u39R&wWnqT*l=b8E?zq+1uc!FA&@-=|-1BCk_9ucWM;u zNIjCR&it99?cw#l*H%NwZoueboBvQePUSdBMvkZ!;iE{Dkw4#k27GjwI}g8$O2sn8 z4k<#2jX}v8h=M{xa~h?Nu@jzFgKQuRpIQBd$~?JaAY)j>O+%&WnHs6N(oV`Pr}dnZnfhRS=Ol`UDFG29wGBlV8Ts>Ifh?RaVjeJWko>E&{vRaJeG(>}o$ zMG=Jp+@pvo?aS64%$zA|hL%!%KCSlQb$^mQ3}0S8oNp|T;=+yDRo M07*qoM6N<$f_FmFNB{r; literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters_unmuted_active@2x.png b/Telegram/Resources/icons/filters_unmuted_active@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..a1ed122a89c9179de210815d6046e8677dba79fb GIT binary patch literal 936 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY1|&n@ZgvM!Ea{HEjtmSN`?>!lvNA9*$9uXs zhEy=Vops);%2DL_aeLOZFm7?7mYd8|61J>NKe6=EqNV-;PTDUO*Mz_1=g=)loxP|` zaLGlj30|zs=kxtS7F5{YyPtpV%z6uE^Sz(vp0oTsv-teg*DOEl)`b@$r!>+alQ)pMB-{d#=$ zSZ3V+F`to$?wr$&No^RQ?^QR%(@m)D#>pwqznrdNX)l|0oZ*2Ao^Zfk$ z0KMsoGkv0ZL-o0SZ4O@Iyih z9q|i;RvtKWrbpLfkEDsME${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y6fXi8T$0mCs?O*=Du_*um literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters_unread.png b/Telegram/Resources/icons/filters_unread.png new file mode 100644 index 0000000000000000000000000000000000000000..1ed90a352775862c096f8b02d8a30aaf6c07cb87 GIT binary patch literal 864 zcmV-m1E2hfP)Ef^WX8wGA(2Ql zfXn4FY;JBsAP|7b$w?R(7y!Lq4=$IB`ZO91O~$=JHb+NCL;y)(8wGVgA~ZEM1s4|= z1afc#8`wrcUE734M@OMlDiHwRFJLejL?E*L9VfKEzfWY& z&dy+Pa8Pzq!76ENM?+?}+ldT6K`=8j(>56-is9+lrrzG(CPKTryFVf$c@9aTr!ah2 zu-&|;q;XBP{3%PP(?rPWbp8>criog`ktZa%dTea0RiKWH6DHUG{(inV#;VmS)t&gv z&CRi!n;W*izAl6l65^L18BI@53ys@VEG#TAqtVFb=jVl{LPDujij0<*mxaddDjW_6 znG}mfMN`?>^VQI%#*;BLG$cEQqqf{XGBN^BPft*<*I{;cR>@8bdUA3?qz(=almJ@N z9UdMMRy-b88!skgv)O1>h_tn}r3NIc$3(lcvqNMaA0Gj8ql#z6gwW9E^TGT3JJf15 z(CKt)V4w6Biv^O&B$269DzLb?_(?Ayrc4NpFw3Ku&E^JRUtb^ahgjoZ0>^~R4+6wu zFOz1KiMGCRO?u6T)|oltTE^6joMN;Q07hnh)OI-WqMG@$&LQVG4ypU^1DMCKl<$ zgmC}J38s}`FbEhnyb`QdE8yz@L)z-&O~GSgLYT)gnGBsY3>hBTjg5_t+)E-tnhyo9 qx%@Gh&^i6s9c;xORDM?F>=B&qI!Z_Eww5d1W^fE<4~ovwQ}`Pgc>pK zL9C!PTPdwtr>#*dc5$4TLCjwFFE}6G_xJtxJn!>9wZmD73MmKy002>Itoh9|V*ei~ zB#&NvF7Gxfyo5tF(8%=l9rL-|B$Bqcw?qh0NGYCKai)71W=tn zLW-%wswCj2{{938gAo@hE-GqjVc*TNa6Vs$g?7v-r}>OF5>hu7am*fTO$nfM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V@XlT`btbO>#~(&z?2r6%x=Z^{p6(X{J|FtB%74S{(n67U&!tc ZxHvhM@{gX_eFlL7j1A268+5VJ{{j}X9lihn literal 0 HcmV?d00001 diff --git a/Telegram/Resources/icons/filters_unread_active.png b/Telegram/Resources/icons/filters_unread_active.png new file mode 100644 index 0000000000000000000000000000000000000000..556111486ae50afdc40a8331a7c32322264fa5d4 GIT binary patch literal 677 zcmV;W0$TlvP)1?YCWFrUxid_J>|W1P$9^I)^tSTdYWCp4Q)Sg+Tt;~3|7 z4eQXiy4&q0wOWl_uUEor)oPW+qrzmr-+yt%Ikf5Meh(&{PLspo@Flp`L@X9#Vl*3C zW;Tbm9|L8xS#rDGbc4Sd>~=d7qucaqQl8PK1th%okw^sU^*UHALRT99{l-;6h)Sgb zR;yJ?DHseg|KV_`yN+kmOdX9xQmK@ZVwu6O9qLA-A;Y2g-tTvkOeWcj;%&kMjAsTr zjyX3B*XZA}>2#`y$PQ5a3B}XUu;~NQf+x$N^2bc!_F);on}>Af%4R<8J}sZ4HG&PeIYI z7$^`3{1|95nGnCApT&gZkLN+6znU$PNI<940f)n( z*e{n0l*?tHMGm}PFZg^u_C>JU?O-;WL9f??(P#v;QY&j@2D;RlOooidW3pT>$?0?= z^pk;*FP)!` z5hMW=Dv|p|92FG>m6erHRaFJKxw(*H=l=daEH5v^>gp;y zK0cb-Q&dz0jg5^^Q&R&uIXPOtgM$NDTwH{KfdSau+%(md323{+??-HGtY~Rz5i2Vz z;^pN<*lnaUK0YqO!oqa6hKGlXzP>*3@$q3gB*~}`^=0_#UpVpc@uH)nLtI^5nL1!q zfDxi|kQ~P7vZ}82WkB)|prD{2(ca!JZf|cbJK(G1;o+eO2?@~wqNuRjNXKRrxeq8M zB}FVOEZDW(XMdw(xaRo0t;`0a+l_Q>KynvQMMZ@;Jv}wEkA1ziwpQmh4oUx&a4NTwE+}Zf<-U=0q4B9j$Zf{{Egl9O+sG za|KX;f4`RK`4de>Muu*9N&>mfj;>=s_4W0D3nwR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cu=v*qK@chn(1J&O z39F%N?(d42u0bQU9)cdr)bo@nF-}w0rv{(SDcD%Euf-hBw2!)V=zpj$r-rY}Da!l+d8F3T&tj5#?iafQ*UfptCKLao= z6Jyim_vbad-Rg^t!(*i#bGiS=3;DkztL8{$QwHm7iZaBJymtVEv2nJpw**N40RCC< AkN^Mx literal 0 HcmV?d00001 diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp index baae406e74..f5e592af4d 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.cpp @@ -82,12 +82,10 @@ int PinnedDialogsCount(not_null list) { } // namespace struct InnerWidget::CollapsedRow { - CollapsedRow(Data::Folder *folder, FilterId filterId) - : folder(folder), filterId(filterId) { + CollapsedRow(Data::Folder *folder) : folder(folder) { } Data::Folder *folder = nullptr; - FilterId filterId = 0; BasicRow row; }; @@ -121,10 +119,6 @@ InnerWidget::InnerWidget( setAttribute(Qt::WA_OpaquePaintEvent, true); #endif // OS_MAC_OLD - _filterId = Global::DialogsFiltersEnabled() - ? Global::DialogsFilterId() - : 0; - _addContactLnk->addClickHandler([] { App::wnd()->onShowAddContact(); }); _cancelSearchInChat->setClickedCallback([=] { cancelSearchInChat(); }); _cancelSearchInChat->hide(); @@ -262,6 +256,11 @@ InnerWidget::InnerWidget( updateDialogRow(next); }, lifetime()); + _controller->activeChatsFilter( + ) | rpl::start_with_next([=](FilterId filterId) { + switchToFilter(filterId); + }, lifetime()); + refreshWithCollapsedRows(true); setupShortcuts(); @@ -294,21 +293,6 @@ void InnerWidget::refreshWithCollapsedRows(bool toTop) { _collapsedSelected = -1; _collapsedRows.clear(); - if (!_openedFolder && Global::DialogsFiltersEnabled()) { - const auto &list = session().data().chatsFilters().list(); - if (_filterId - && ranges::find(list, _filterId, &Data::ChatFilter::id) == end(list)) { - switchToFilter(0); - } - if (_filterId) { - _collapsedRows.push_back(std::make_unique(nullptr, 0)); - } else { - for (const auto &filter : session().data().chatsFilters().list()) { - _collapsedRows.push_back( - std::make_unique(nullptr, filter.id())); - } - } - } const auto list = shownDialogs(); const auto archive = !list->empty() ? (*list->begin())->folder() @@ -323,7 +307,8 @@ void InnerWidget::refreshWithCollapsedRows(bool toTop) { } _skipTopDialogs = 1; if (!inMainMenu && !_filterId) { - _collapsedRows.push_back(std::make_unique(archive, 0)); + _collapsedRows.push_back( + std::make_unique(archive)); } } else { _skipTopDialogs = 0; @@ -394,7 +379,7 @@ void InnerWidget::changeOpenedFolder(Data::Folder *folder) { //const auto lastMousePosition = _lastMousePosition; clearSelection(); _openedFolder = folder; - _filterId = _openedFolder ? 0 : Global::DialogsFilterId(); + _filterId = _openedFolder ? 0 : _controller->activeChatsFilterCurrent(); refreshWithCollapsedRows(true); // This doesn't work, because we clear selection in leaveEvent on hide. //if (mouseSelection && lastMousePosition) { @@ -706,23 +691,14 @@ void InnerWidget::paintCollapsedRow( Painter &p, not_null row, bool selected) const { + Expects(row->folder != nullptr); + const auto smallWidth = st::dialogsPadding.x() + st::dialogsPhotoSize + st::dialogsPhotoPadding; const auto narrow = (width() <= smallWidth); - const auto text = row->folder - ? row->folder->chatListName() - : _filterId - ? (narrow ? "Show" : tr::lng_dialogs_show_all_chats(tr::now)) - : ranges::find( - session().data().chatsFilters().list(), - row->filterId, - &Data::ChatFilter::id)->title(); - const auto unread = row->folder - ? row->folder->chatListUnreadCount() - : _filterId - ? session().data().unreadOnlyMutedBadge() - : 0; + const auto text = row->folder->chatListName(); + const auto unread = row->folder->chatListUnreadCount(); Layout::PaintCollapsedRow( p, row->row, @@ -1721,12 +1697,6 @@ FilterId InnerWidget::filterId() const { return _filterId; } -void InnerWidget::closeFilter() { - if (_filterId) { - switchToFilter(0); - } -} - void InnerWidget::clearSelection() { _mouseSelection = false; _lastMousePosition = std::nullopt; @@ -2551,11 +2521,8 @@ bool InnerWidget::chooseCollapsedRow() { return false; } const auto &row = _collapsedRows[_collapsedSelected]; - if (row->folder) { - _controller->openFolder(row->folder); - } else { - switchToFilter(row->filterId); - } + Assert(row->folder != nullptr); + _controller->openFolder(row->folder); return true; } @@ -2568,9 +2535,7 @@ void InnerWidget::switchToFilter(FilterId filterId) { &Data::ChatFilter::id)) { filterId = 0; } - Global::SetDialogsFilterId(filterId); - _filterId = Global::DialogsFilterId(); - Local::writeUserSettings(); + _filterId = filterId; refreshWithCollapsedRows(true); _collapsedSelected = 0; } diff --git a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.h b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.h index b68598739f..a6427cf66f 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_inner_widget.h +++ b/Telegram/SourceFiles/dialogs/dialogs_inner_widget.h @@ -81,7 +81,6 @@ public: const QVector &result); [[nodiscard]] FilterId filterId() const; - void closeFilter(); void clearSelection(); diff --git a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp index 4faa07a126..d933692519 100644 --- a/Telegram/SourceFiles/dialogs/dialogs_widget.cpp +++ b/Telegram/SourceFiles/dialogs/dialogs_widget.cpp @@ -1575,7 +1575,7 @@ void Widget::keyPressEvent(QKeyEvent *e) { if (_openedFolder) { controller()->closeFolder(); } else if (_inner->filterId()) { - _inner->closeFilter(); + controller()->setActiveChatsFilter(0); } else { e->ignore(); } diff --git a/Telegram/SourceFiles/mainwindow.h b/Telegram/SourceFiles/mainwindow.h index d9b6fae0cc..75aef8ecae 100644 --- a/Telegram/SourceFiles/mainwindow.h +++ b/Telegram/SourceFiles/mainwindow.h @@ -118,6 +118,8 @@ public: not_null photo); void hideMediaPreview(); + void updateControlsGeometry() override; + protected: bool eventFilter(QObject *o, QEvent *e) override; void closeEvent(QCloseEvent *e) override; @@ -126,8 +128,6 @@ protected: void updateIsActiveHook() override; void clearWidgetsHook() override; - void updateControlsGeometry() override; - public slots: void showSettings(); void setInnerFocus(); diff --git a/Telegram/SourceFiles/window/main_window.cpp b/Telegram/SourceFiles/window/main_window.cpp index a220b03693..d78970a0ed 100644 --- a/Telegram/SourceFiles/window/main_window.cpp +++ b/Telegram/SourceFiles/window/main_window.cpp @@ -373,6 +373,19 @@ HitTestResult MainWindow::hitTest(const QPoint &p) const { return Window::HitTestResult::None; } +int MainWindow::computeMinWidth() const { + auto result = st::windowMinWidth; + if (const auto session = _controller->sessionController()) { + if (const auto add = session->filtersWidth()) { + result += add; + } + } + if (_rightColumn) { + result += _rightColumn->width(); + } + return result; +} + int MainWindow::computeMinHeight() const { const auto title = _title ? _title->height() : 0; const auto outdated = [&] { @@ -386,7 +399,7 @@ int MainWindow::computeMinHeight() const { } void MainWindow::initSize() { - setMinimumWidth(st::windowMinWidth); + setMinimumWidth(computeMinWidth()); setMinimumHeight(computeMinHeight()); auto position = cWindowPos(); @@ -492,6 +505,7 @@ void MainWindow::leaveEventHook(QEvent *e) { } void MainWindow::updateControlsGeometry() { + auto bodyLeft = 0; auto bodyTop = 0; auto bodyWidth = width(); if (_title && !_title->isHidden()) { @@ -508,7 +522,13 @@ void MainWindow::updateControlsGeometry() { bodyWidth -= _rightColumn->width(); _rightColumn->setGeometry(bodyWidth, bodyTop, width() - bodyWidth, height() - bodyTop); } - _body->setGeometry(0, bodyTop, bodyWidth, height() - bodyTop); + if (const auto session = _controller->sessionController()) { + if (const auto skip = session->filtersWidth()) { + bodyLeft += skip; + bodyWidth -= skip; + } + } + _body->setGeometry(bodyLeft, bodyTop, bodyWidth, height() - bodyTop); } void MainWindow::updateUnreadCounter() { @@ -621,7 +641,7 @@ void MainWindow::showRightColumn(object_ptr widget) { const auto nowRightWidth = _rightColumn ? _rightColumn->width() : 0; const auto wasMaximized = isMaximized(); const auto wasMinimumWidth = minimumWidth(); - const auto nowMinimumWidth = st::windowMinWidth + nowRightWidth; + const auto nowMinimumWidth = computeMinWidth(); const auto firstResize = (nowMinimumWidth < wasMinimumWidth); if (firstResize) { setMinimumWidth(nowMinimumWidth); diff --git a/Telegram/SourceFiles/window/main_window.h b/Telegram/SourceFiles/window/main_window.h index 3282483f06..1580dfbded 100644 --- a/Telegram/SourceFiles/window/main_window.h +++ b/Telegram/SourceFiles/window/main_window.h @@ -80,7 +80,7 @@ public: virtual ~MainWindow(); - TWidget *bodyWidget() { + Ui::RpWidget *bodyWidget() { return _body.data(); } @@ -95,6 +95,11 @@ public: void clearWidgets(); + int computeMinWidth() const; + int computeMinHeight() const; + + virtual void updateControlsGeometry(); + public slots: bool minimizeToTray(); void updateGlobalMenu() { @@ -148,8 +153,6 @@ protected: virtual void workmodeUpdated(DBIWorkMode mode) { } - virtual void updateControlsGeometry(); - virtual void createGlobalMenu() { } virtual void initShadows() { @@ -175,8 +178,6 @@ private: void showTermsDecline(); void showTermsDelete(); - int computeMinHeight() const; - not_null _controller; base::Timer _positionUpdatedTimer; @@ -184,7 +185,7 @@ private: object_ptr _title = { nullptr }; object_ptr _outdated; - object_ptr _body; + object_ptr _body; object_ptr _rightColumn = { nullptr }; QPointer _termsBox; diff --git a/Telegram/SourceFiles/window/window.style b/Telegram/SourceFiles/window/window.style index 140f0140a9..df4300a30b 100644 --- a/Telegram/SourceFiles/window/window.style +++ b/Telegram/SourceFiles/window/window.style @@ -245,6 +245,18 @@ createThemeLink: InputField(defaultInputField) { font: boxTextFont; } +windowFiltersWidth: 72px; +windowFiltersIconTop: 8px; +windowFiltersAll: icon {{ "filters_all", sideBarIconFg }}; +windowFiltersAllActive: icon {{ "filters_all_active", sideBarIconFgActive }}; +windowFiltersUnread: icon {{ "filters_unread", sideBarIconFg }}; +windowFiltersUnreadActive: icon {{ "filters_unread_active", sideBarIconFgActive }}; +windowFiltersUnmuted: icon {{ "filters_unmuted", sideBarIconFg }}; +windowFiltersUnmutedActive: icon {{ "filters_unmuted_active", sideBarIconFgActive }}; +windowFiltersCustom: icon {{ "filters_custom", sideBarIconFg }}; +windowFiltersCustomActive: icon {{ "filters_custom_active", sideBarIconFgActive }}; +windowFiltersSetup: icon {{ "filters_setup", sideBarIconFg }}; + // Mac specific macAccessoryWidth: 450.; diff --git a/Telegram/SourceFiles/window/window_controller.cpp b/Telegram/SourceFiles/window/window_controller.cpp index 69afd5e886..766d25a2f5 100644 --- a/Telegram/SourceFiles/window/window_controller.cpp +++ b/Telegram/SourceFiles/window/window_controller.cpp @@ -31,6 +31,11 @@ Controller::Controller(not_null account) _sessionController = session ? std::make_unique(session, this) : nullptr; + if (_sessionController && Global::DialogsFiltersEnabled()) { + _sessionController->toggleFiltersMenu(true); + } else { + sideBarChanged(); + } _widget.updateWindowIcon(); }, _lifetime); @@ -86,6 +91,11 @@ void Controller::showRightColumn(object_ptr widget) { _widget.showRightColumn(std::move(widget)); } +void Controller::sideBarChanged() { + _widget.setMinimumWidth(_widget.computeMinWidth()); + _widget.updateControlsGeometry(); +} + void Controller::activate() { _widget.activate(); } diff --git a/Telegram/SourceFiles/window/window_controller.h b/Telegram/SourceFiles/window/window_controller.h index 7ce23ca04e..289d6d3909 100644 --- a/Telegram/SourceFiles/window/window_controller.h +++ b/Telegram/SourceFiles/window/window_controller.h @@ -54,6 +54,7 @@ public: } void showRightColumn(object_ptr widget); + void sideBarChanged(); void activate(); void reActivate(); diff --git a/Telegram/SourceFiles/window/window_filters_menu.cpp b/Telegram/SourceFiles/window/window_filters_menu.cpp new file mode 100644 index 0000000000..8128cb31da --- /dev/null +++ b/Telegram/SourceFiles/window/window_filters_menu.cpp @@ -0,0 +1,92 @@ +/* +This file is part of Telegram Desktop, +the official desktop application for the Telegram messaging service. + +For license and copyright information please follow this link: +https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL +*/ +#include "window/window_filters_menu.h" + +#include "mainwindow.h" +#include "window/window_session_controller.h" +#include "main/main_session.h" +#include "data/data_session.h" +#include "data/data_chat_filters.h" +#include "styles/style_widgets.h" +#include "styles/style_window.h" + +namespace Window { + +FiltersMenu::FiltersMenu(not_null session) +: _session(session) +, _widget(session->widget(), st::defaultSideBarMenu) { + setup(); +} + +void FiltersMenu::setup() { + const auto body = _session->widget()->bodyWidget(); + rpl::combine( + body->topValue(), + body->heightValue() + ) | rpl::start_with_next([=](int top, int height) { + _widget.setGeometry({ 0, top, st::windowFiltersWidth, height }); + }, _widget.lifetime()); + + const auto filters = &_session->session().data().chatsFilters(); + rpl::single( + rpl::empty_value() + ) | rpl::then( + filters->changed() + ) | rpl::start_with_next([=] { + refresh(); + }, _widget.lifetime()); + + _session->activeChatsFilter( + ) | rpl::start_with_next([=](FilterId id) { + _widget.setActive(QString::number(id)); + }, _widget.lifetime()); + + _widget.activateRequests( + ) | rpl::start_with_next([=](const QString &id) { + if (id == "setup") { + } else if (const auto filterId = id.toInt()) { + _session->setActiveChatsFilter(filterId); + } else { + _session->setActiveChatsFilter(0); + } + }, _widget.lifetime()); +} + +void FiltersMenu::refresh() { + auto items = std::vector(); + items.push_back({ + QString::number(0), + "All Chats", + QString(), + &st::windowFiltersCustom, + &st::windowFiltersCustomActive, + st::windowFiltersIconTop + }); + const auto filters = &_session->session().data().chatsFilters(); + for (const auto &filter : filters->list()) { + items.push_back({ + QString::number(filter.id()), + filter.title(), + QString(), + &st::windowFiltersCustom, + &st::windowFiltersCustomActive, + st::windowFiltersIconTop + }); + } + items.push_back({ + "setup", + "Setup", + QString(), + &st::windowFiltersSetup, + &st::windowFiltersSetup, + st::windowFiltersIconTop + }); + _widget.setItems(items); +} + +} // namespace Window diff --git a/Telegram/SourceFiles/window/window_filters_menu.h b/Telegram/SourceFiles/window/window_filters_menu.h new file mode 100644 index 0000000000..b4c70ba528 --- /dev/null +++ b/Telegram/SourceFiles/window/window_filters_menu.h @@ -0,0 +1,29 @@ +/* +This file is part of Telegram Desktop, +the official desktop application for the Telegram messaging service. + +For license and copyright information please follow this link: +https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL +*/ +#pragma once + +#include "ui/widgets/side_bar_menu.h" + +namespace Window { + +class SessionController; + +class FiltersMenu final { +public: + explicit FiltersMenu(not_null session); + +private: + void setup(); + void refresh(); + + const not_null _session; + Ui::SideBarMenu _widget; + +}; + +} // namespace Window diff --git a/Telegram/SourceFiles/window/window_session_controller.cpp b/Telegram/SourceFiles/window/window_session_controller.cpp index fe82914c76..04dd321084 100644 --- a/Telegram/SourceFiles/window/window_session_controller.cpp +++ b/Telegram/SourceFiles/window/window_session_controller.cpp @@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "boxes/peers/edit_peer_info_box.h" #include "window/window_controller.h" #include "window/main_window.h" +#include "window/window_filters_menu.h" #include "info/info_memento.h" #include "info/info_controller.h" #include "history/history.h" @@ -189,6 +190,17 @@ void SessionController::initSupportMode() { }, lifetime()); } +void SessionController::toggleFiltersMenu(bool enabled) { + if (!enabled == !_filters) { + return; + } else if (enabled) { + _filters = std::make_unique(this); + } else { + _filters = nullptr; + } + _window->sideBarChanged(); +} + bool SessionController::uniqueChatsInSearchResults() const { return session().supportMode() && !session().settings().supportAllSearchResults() @@ -713,6 +725,22 @@ rpl::producer SessionController::floatPlayerClosed() const { return _floatPlayers->closeEvents(); } +int SessionController::filtersWidth() const { + return _filters ? st::windowFiltersWidth : 0; +} + +rpl::producer SessionController::activeChatsFilter() const { + return _activeChatsFilter.value(); +} + +FilterId SessionController::activeChatsFilterCurrent() const { + return _activeChatsFilter.current(); +} + +void SessionController::setActiveChatsFilter(FilterId id) { + _activeChatsFilter = id; +} + SessionController::~SessionController() = default; } // namespace Window diff --git a/Telegram/SourceFiles/window/window_session_controller.h b/Telegram/SourceFiles/window/window_session_controller.h index 245b5edde9..5daa506e04 100644 --- a/Telegram/SourceFiles/window/window_session_controller.h +++ b/Telegram/SourceFiles/window/window_session_controller.h @@ -56,6 +56,7 @@ namespace Window { class MainWindow; class SectionMemento; class Controller; +class FiltersMenu; enum class GifPauseReason { Any = 0, @@ -292,6 +293,13 @@ public: not_null replacement); rpl::producer floatPlayerClosed() const; + [[nodiscard]] int filtersWidth() const; + [[nodiscard]] rpl::producer activeChatsFilter() const; + [[nodiscard]] FilterId activeChatsFilterCurrent() const; + void setActiveChatsFilter(FilterId id); + + void toggleFiltersMenu(bool enabled); + rpl::lifetime &lifetime() { return _lifetime; } @@ -321,6 +329,7 @@ private: const not_null _window; std::unique_ptr _passportForm; + std::unique_ptr _filters; GifPauseReasons _gifPauseReasons = 0; base::Observable _gifPauseLevelChanged; @@ -335,6 +344,8 @@ private: std::deque _chatEntryHistory; int _chatEntryHistoryPosition = -1; + rpl::variable _activeChatsFilter; + std::unique_ptr _floatPlayers; Media::Player::FloatDelegate *_defaultFloatPlayerDelegate = nullptr; Media::Player::FloatDelegate *_replacementFloatPlayerDelegate = nullptr; diff --git a/Telegram/lib_ui b/Telegram/lib_ui index ccc12ce3da..81e9a80831 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit ccc12ce3da8f9ac30f30228c225585f732f74d5f +Subproject commit 81e9a80831555ae7908ee86fb15ea791fadd0891