From 0f49d0d3916c3e2bd493210d3321e8297ce58e74 Mon Sep 17 00:00:00 2001 From: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com> Date: Wed, 20 Mar 2024 14:56:29 -0700 Subject: [PATCH] Upgrade electron to 29.1.5 and revert windows badge fix --- _locales/en/messages.json | 16 ++++++------ app/main.ts | 35 --------------------------- images/unread-icon/1.png | Bin 437 -> 0 bytes images/unread-icon/2.png | Bin 533 -> 0 bytes images/unread-icon/3.png | Bin 562 -> 0 bytes images/unread-icon/4.png | Bin 497 -> 0 bytes images/unread-icon/5.png | Bin 543 -> 0 bytes images/unread-icon/6.png | Bin 571 -> 0 bytes images/unread-icon/7.png | Bin 445 -> 0 bytes images/unread-icon/8.png | Bin 570 -> 0 bytes images/unread-icon/9-plus.png | Bin 604 -> 0 bytes images/unread-icon/9.png | Bin 575 -> 0 bytes images/unread-icon/marked-unread.png | Bin 325 -> 0 bytes package.json | 2 +- ts/util/unreadIcon.ts | 26 -------------------- yarn.lock | 8 +++--- 16 files changed, 13 insertions(+), 74 deletions(-) delete mode 100644 images/unread-icon/1.png delete mode 100644 images/unread-icon/2.png delete mode 100644 images/unread-icon/3.png delete mode 100644 images/unread-icon/4.png delete mode 100644 images/unread-icon/5.png delete mode 100644 images/unread-icon/6.png delete mode 100644 images/unread-icon/7.png delete mode 100644 images/unread-icon/8.png delete mode 100644 images/unread-icon/9-plus.png delete mode 100644 images/unread-icon/9.png delete mode 100644 images/unread-icon/marked-unread.png delete mode 100644 ts/util/unreadIcon.ts diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 45e59313a902..806cd0e5bb77 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -591,6 +591,14 @@ "messageformat": "This group is invalid. Please create a new group.", "description": "Displayed when a user can't send a message because something has gone wrong in the conversation." }, + "icu:taskbarMarkedUnread": { + "messageformat": "Marked Unread", + "description": "(Deleted 2024/03/20) On Windows, description for screen readers for the OS taskbar icon's overlay badge when the user has marked chat(s) as unread." + }, + "icu:taskbarUnreadMessages": { + "messageformat": "{count, plural, one {# Unread Message} other {# Unread Messages}}", + "description": "(Deleted 2024/03/20) On Windows, description for screen readers for the OS taskbar icon's overlay badge when there are unread messages." + }, "icu:scrollDown": { "messageformat": "Scroll to bottom of chat", "description": "Alt text for button to take user down to bottom of conversation, shown when user scrolls up" @@ -611,14 +619,6 @@ "messageformat": "{count, plural, one {# Unread Message} other {# Unread Messages}}", "description": "Text for unread message separator, with count" }, - "icu:taskbarMarkedUnread": { - "messageformat": "Marked Unread", - "description": "On Windows, description for screen readers for the OS taskbar icon's overlay badge when the user has marked chat(s) as unread." - }, - "icu:taskbarUnreadMessages": { - "messageformat": "{count, plural, one {# Unread Message} other {# Unread Messages}}", - "description": "On Windows, description for screen readers for the OS taskbar icon's overlay badge when there are unread messages." - }, "icu:messageHistoryUnsynced": { "messageformat": "For your security, chat history isn't transferred to new linked devices.", "description": "Shown in the conversation history when a user links a new device to explain what is not supported." diff --git a/app/main.ts b/app/main.ts index 9c3cdfd1d27d..45c6831a81cf 100644 --- a/app/main.ts +++ b/app/main.ts @@ -117,7 +117,6 @@ import type { ParsedSignalRoute } from '../ts/util/signalRoutes'; import { parseSignalRoute } from '../ts/util/signalRoutes'; import * as dns from '../ts/util/dns'; import { ZoomFactorService } from '../ts/services/ZoomFactorService'; -import { getMarkedUnreadIcon, getUnreadIcon } from '../ts/util/unreadIcon'; const STICKER_CREATOR_PARTITION = 'sticker-creator'; @@ -2269,44 +2268,10 @@ ipc.on( if (process.platform === 'darwin') { // Will show a ● on macOS when undefined app.setBadgeCount(undefined); - } else if (process.platform === 'win32') { - // setBadgeCount is unsupported on Windows, so we use setOverlayIcon - let description; - try { - description = getResolvedMessagesLocale().i18n( - 'icu:taskbarMarkedUnread' - ); - } catch { - description = 'Unread'; - } - mainWindow?.setOverlayIcon(getMarkedUnreadIcon(), description); } else { // All other OS's need a number app.setBadgeCount(1); } - return; - } - - if (process.platform === 'win32') { - if (!mainWindow) { - return; - } - - let description; - try { - description = getResolvedMessagesLocale().i18n( - 'icu:taskbarUnreadMessages', - { count: badge } - ); - } catch { - description = String(badge); - } - - if (badge === 0) { - mainWindow.setOverlayIcon(null, ''); - } else { - mainWindow.setOverlayIcon(getUnreadIcon(badge), description); - } } else { app.setBadgeCount(badge); } diff --git a/images/unread-icon/1.png b/images/unread-icon/1.png deleted file mode 100644 index 842d2f2ddde721d712a9f0c85cd8059cf42672c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 437 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dy6#+gWu0Z;Wi`jPvi!aXR-#vh& z8IS=a{|7j{cQAM#;PBtU;j^>(XJ^w-uBM-y%|1JueFbyBIGKWx#TOUTFAk<(T+F|? znu3uPNc;c)KNrsW>hJvb`Ll27(ZAO&|6Y{wd*|kV&!7ETyZmdk|BLMAYM|XRB|(0{ z4CfW@E8L&|UH}LtyiZv0e*T31goJ*B{saR9>-pE+f$A=Jx;TbZ#I^Qa4?AMO!@BzEBSrXkDtj4Li;{5D$YCpak3~U!}%|7m0LcXYT`Qa^G9&SbjPTK^G(}7 z6isG~Jn!!Qs7P>5oz=3Y}4mTTP7%m05>ZaHM+@vJB+^1E>`3lOEaH?$qHW20$| zx|{nBOVJIg;t4&Yta5HxW1Ny(&0XfsyKn4>4I7vYg$Wyt&I2sXx66EcV5u01sJ`Uv zlPUpHs+Gv%X|)h3J6aj0R7ZIs$z1kS5AMSIW=@iO*-#B(>D$ROl{E&Q;3xfsGN9-1 zA+L0xo-gP^%g>K=wP3I2wCGmz9jhYrs7`BHpI9|UT7F_F^7viIsWM=ok6bR^oCP4{ z6(QhM)FmjS0UHEuoP|L{9^zsa{F~39w8Otw>42W3jjFKAQa=e%*B*CmpX}RV&$<2s XnO9m6_>@7#00000NkvXXu0mjfbz}rw diff --git a/images/unread-icon/3.png b/images/unread-icon/3.png deleted file mode 100644 index 3bf14aaf54096ec308bd0bc84e30717c0ea88811..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 562 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dys{?#OT!Hi#7qc(U=HDGGzBrqG z_W+XSK*s+7hxZN!pPkL$2RQt9aQN(O`q|m+tF!qhSJO|Vd`pk{(b@QG;jDkp zpZz`p~So(nH) z4&Y%42=pm@?{`tUtJ+upcYLJ5$&12jcjPU2E_JNQuqdc^@b*~P}kr) zGfK1`+hx^ked1SiwtmGq^Yy$be+0UU3?eEE5lEzDzu$IPFq zjZQ00T>5gTJv|~Qaqnlx@GJd3GwiQSRIWVVtJ%EvpW*_=Bdz_M6Y@)r&Uthp?!+FW zw4X~C1%rF=(~gS21WDiPhC@t|zwlbyUf-Rs5P?f==-^4#o9 ycSX$Z_1>ZPIKuY74U8?fEBfX7f~PI(7kj||IMGM8Px64F$>8bg=d#Wzp$Pz(Bouc5 diff --git a/images/unread-icon/4.png b/images/unread-icon/4.png deleted file mode 100644 index e1d4e7e399b247eaa4498fb28db0e9a43a20f566..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 497 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyT>(BJu0Z;Wi`f@v^DoY3-yJNz zdsqM&K<;N}^Zx-3?;Q-@2RQt9aQNzM{>jeR2hoW?!5vzBrhEaWVbk1V*l= zUtF!e07(~+QUCw{|G9A1SAXY!&!7E${_IC*Lzef50`~2z8g|lCy{l6Dw{G8hN zd*_zlJ2(GYIP2%a+3pwho&#MYQxfDC%y9nxeFcU0^Ct)Z!Tbdi-Y2|IFz8R{PcSg( zzx%#c0;uknr;B4qMONqcm1_35P_7rkFzuVQrl*!w#!DuizSQKX!5y`)r$u1b zgKjq_&xfac-*RqR^tA89YJ;SQFKZS*e0HaE;%Ubf6$hreXs|D|`zG_FU=4d>uZc?U zy$Ou|{Vf~~OW7kF_I&6pROemxNx{8;t^rfGz1e@MgKW01+V_bsxp&E;{g|HXt}fl0 kPhT&s$y*pX<zopr0A1wp8UO$Q diff --git a/images/unread-icon/5.png b/images/unread-icon/5.png deleted file mode 100644 index f50dbcf19113ef066640b46e24b9374301c41031..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 543 zcmV+)0^t3LP)t8M^FufCLpJq8H}gX^^FucBMK$w7 zHS|O^^g=lFLN)Y4HS|C=^hGuFMK$z9H}pk1|NsB=LpJ{N^7T(c^;=K-#K8HXn)r!< z{Lsz*=jQl+b@+;b_?3;ZTBRRIayYK&OWz;5k<@=Y*JYa4btAr>~&c+4P>?tAU%wWvD zryDDO)IKM}Tnu^OysUUO`X^?%e|e)~xP$LAtoj8USLGn5t8R(I1+O?b(^UxI5!3j+ z@9>0$4;x~Lbn8)Wc)`Xfh(U31#yUHchnxfj3l8?EHMZV~Er3|1^~Y{^>3+e03p;puiA~-PIO2)l*5L6G*%5V7Xlybr@B!|`_6s8F zQzkb6*d%>^Wiqq@#0XOe9nYG|TLJWJYa(yMudVfOehVF*VfG82acLO9m>m&YhBlaj hb)=SUQpKt0{sCi6TO~AXiUt4x002ovPDHLkV1lco0sQ~~ diff --git a/images/unread-icon/6.png b/images/unread-icon/6.png deleted file mode 100644 index 50f7261cea453642d4cee2c0d859493ab6418613..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 571 zcmV-B0>u4^P)BwARwRb5D*X$kndoSpP=txk6+nR1j%r01|kC! zEfQ+$J`Dt-E;S{0a%G-1+5>3`)R24RmEb}5LwiPo{FNZ18t!YEpB4zX-CMCe2-Hg= zJgbsxzlijSQh}0R4(pBOXSs+oS|GpSl@pOYTf`pqhJrWZxjaW~Oa>3j&VB87l_-W{ zoXGrb+4~cSNmPL?i$i{7eUG;Qv45_$PdoFy^ zVFeMFi((1^GOWuvb^VKO{pX5Z)}qOI_-E}^@ds1?DnxA({S}}zrGCqolD?%y$EW&k zo}tY)rT;ypLE zQZhS=<}6d5e{bQ=PwC9(7$))r98h64>0p&P!o=rem7s8mvC&X+f!lnZg8oxWm~tAn zhd3}#@R`uydqkvSg^^o|sm@H-cS4(UzkS-*`c(Siz12Z#>)Tz diff --git a/images/unread-icon/8.png b/images/unread-icon/8.png deleted file mode 100644 index 5fca2fd6be57809f98050d3d02a79f9e531efeb9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 570 zcmV-A0>%A_P)|Z)R=1~ z8pPyNeXX$&Rq2*^!gmZCH|rJlsHh_^GS`l0Z@=V5Ec1KE-yah$Wq1i-VVWImma^bN zB56;!a1y0Xl&F1R{*%su>A%!&&_E0smaZI;iT0!u*4VhR!Ai6)8EJN~uI#ZB%}|?# zBR=xnV$DLESW$fA%rVuPHlz#KJU?Kj9XeuN{SAidT%^<-Zg3eONxOU^Bj zxw6Dev@s>}#5*uMtQNqh7#c)9=~9a`cFHP&C}2gg-4?6}h|~$6IysWCY#ui0LJ*eB z1G+K_AI?YQkQ@HKBI$YmHR+b1&qAjjkWX{mH=Xm)bX#is7cvQ3q5DSc)&Kwi07*qo IM6N<$f~!9iE&u=k diff --git a/images/unread-icon/9-plus.png b/images/unread-icon/9-plus.png deleted file mode 100644 index 5facbea0741769c98b0a375356610b78bd0adb59..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 604 zcmV-i0;BzjP)5pYIS5kPr}%pYNbx?~jjQU@$N+ zk6`&!bwB_B0YOPbK~#9!bjlJ$ zBo%2+CSDRyX_Fzl7Sz@Uh=^r)Qtv9ml-hbREIHorwBb1t6=`2cm6vM6rEcBh#V8no z%VCRKVn=*63S8)MNKkMnGLAn=DT%7YM*y)x;z#*CAQuR%ou~w)<%seu-XFk1p!Ps6sV6p;(;p3g(@qE^bx;^S0VX5 z4KcuwSk8Y-Sor_|9IEVg1z8*b9?_`}Eb^#>HvrA?I`R(G*51GQH85+2-Or+-b>9Hm qoC!5%eFtoV)x@2ZNq028>;3~%{b79E#p0*{0000J%=P)q{pjZX+u8PJTlHE{_?3R!Y-93U7|=%KfwO*yoQw-!ye70VT+7&A2`di2en}XB%J$#m4*o!-Ed7>G~O5* z@=an<#`^|dBm}WoW4B>`1EAhRHzZr&VzIYs0v9VJ#rkC9i~&|F4A-T2Vij^Mhtnl3 zqv-Dt&_E6`j!79({f!w#Ly54(E 9 ? '9-plus.png' : `${String(unreadCount)}.png`; - const path = join(__dirname, '..', '..', 'images', 'unread-icon', filename); - // if path does not exist, this returns an empty NativeImage - return nativeImage.createFromPath(path); -} - -export function getMarkedUnreadIcon(): NativeImage { - const path = join( - __dirname, - '..', - '..', - 'images', - 'unread-icon', - 'marked-unread.png' - ); - return nativeImage.createFromPath(path); -} diff --git a/yarn.lock b/yarn.lock index 82e94bd036ce..9a42c724f4c2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9205,10 +9205,10 @@ electron-window@^0.8.0: dependencies: is-electron-renderer "^2.0.0" -electron@29.1.0: - version "29.1.0" - resolved "https://registry.yarnpkg.com/electron/-/electron-29.1.0.tgz#37f0e4915226db3c87bc54b187795272bf61fc39" - integrity sha512-giJVIm0sWVp+8V1GXrKqKTb+h7no0P3ooYqEd34AD9wMJzGnAeL+usj+R0155/0pdvvP1mgydnA7lcaFA2M9lw== +electron@29.1.5: + version "29.1.5" + resolved "https://registry.yarnpkg.com/electron/-/electron-29.1.5.tgz#b745b4d201c1ac9f84d6aa034126288dde34d5a1" + integrity sha512-1uWGRw/ffA62lcrklxGUgVxVtOHojsg/nwsYr+/F9cVjipZJn8iPv/ABGIIexhmUqWcho8BqfTJ4osCBa29gBg== dependencies: "@electron/get" "^2.0.0" "@types/node" "^20.9.0"