From a83496568f11c4e83c55de79ddb9511b26004014 Mon Sep 17 00:00:00 2001 From: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com> Date: Fri, 17 Feb 2023 18:53:23 +0700 Subject: [PATCH 01/16] chore: code cleanup (#681) Improve the readability of the code. Commits: * chore: correct typos `fragement` to `fragment` * chore: put a single newline at end of file. --- .../settings_manage_api_url.dart | 0 .../settings_manage_sources.dart | 0 .../settings_update_language.dart | 0 .../settings_update_theme.dart | 0 lib/ui/views/settings/settings_view.dart | 2 +- lib/ui/views/settings/settings_viewmodel.dart | 4 ++-- lib/ui/widgets/settingsView/settings_advanced_section.dart | 4 ++-- 7 files changed, 5 insertions(+), 5 deletions(-) rename lib/ui/views/settings/{settingsFragement => settingsFragment}/settings_manage_api_url.dart (100%) rename lib/ui/views/settings/{settingsFragement => settingsFragment}/settings_manage_sources.dart (100%) rename lib/ui/views/settings/{settingsFragement => settingsFragment}/settings_update_language.dart (100%) rename lib/ui/views/settings/{settingsFragement => settingsFragment}/settings_update_theme.dart (100%) diff --git a/lib/ui/views/settings/settingsFragement/settings_manage_api_url.dart b/lib/ui/views/settings/settingsFragment/settings_manage_api_url.dart similarity index 100% rename from lib/ui/views/settings/settingsFragement/settings_manage_api_url.dart rename to lib/ui/views/settings/settingsFragment/settings_manage_api_url.dart diff --git a/lib/ui/views/settings/settingsFragement/settings_manage_sources.dart b/lib/ui/views/settings/settingsFragment/settings_manage_sources.dart similarity index 100% rename from lib/ui/views/settings/settingsFragement/settings_manage_sources.dart rename to lib/ui/views/settings/settingsFragment/settings_manage_sources.dart diff --git a/lib/ui/views/settings/settingsFragement/settings_update_language.dart b/lib/ui/views/settings/settingsFragment/settings_update_language.dart similarity index 100% rename from lib/ui/views/settings/settingsFragement/settings_update_language.dart rename to lib/ui/views/settings/settingsFragment/settings_update_language.dart diff --git a/lib/ui/views/settings/settingsFragement/settings_update_theme.dart b/lib/ui/views/settings/settingsFragment/settings_update_theme.dart similarity index 100% rename from lib/ui/views/settings/settingsFragement/settings_update_theme.dart rename to lib/ui/views/settings/settingsFragment/settings_update_theme.dart diff --git a/lib/ui/views/settings/settings_view.dart b/lib/ui/views/settings/settings_view.dart index 01d461e1..d19addd6 100644 --- a/lib/ui/views/settings/settings_view.dart +++ b/lib/ui/views/settings/settings_view.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:google_fonts/google_fonts.dart'; -import 'package:revanced_manager/ui/views/settings/settingsFragement/settings_update_theme.dart'; +import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_update_theme.dart'; import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart'; import 'package:revanced_manager/ui/widgets/settingsView/settings_advanced_section.dart'; import 'package:revanced_manager/ui/widgets/settingsView/settings_export_section.dart'; diff --git a/lib/ui/views/settings/settings_viewmodel.dart b/lib/ui/views/settings/settings_viewmodel.dart index 502b7a1e..48d41c76 100644 --- a/lib/ui/views/settings/settings_viewmodel.dart +++ b/lib/ui/views/settings/settings_viewmodel.dart @@ -9,8 +9,8 @@ import 'package:revanced_manager/app/app.router.dart'; import 'package:revanced_manager/services/manager_api.dart'; import 'package:revanced_manager/services/toast.dart'; import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart'; -import 'package:revanced_manager/ui/views/settings/settingsFragement/settings_update_language.dart'; -import 'package:revanced_manager/ui/views/settings/settingsFragement/settings_update_theme.dart'; +import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_update_language.dart'; +import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_update_theme.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; import 'package:share_extend/share_extend.dart'; import 'package:stacked/stacked.dart'; diff --git a/lib/ui/widgets/settingsView/settings_advanced_section.dart b/lib/ui/widgets/settingsView/settings_advanced_section.dart index 73a4de55..2dda210e 100644 --- a/lib/ui/widgets/settingsView/settings_advanced_section.dart +++ b/lib/ui/widgets/settingsView/settings_advanced_section.dart @@ -2,8 +2,8 @@ import 'package:flutter/material.dart'; import 'package:flutter_i18n/widgets/I18nText.dart'; -import 'package:revanced_manager/ui/views/settings/settingsFragement/settings_manage_api_url.dart'; -import 'package:revanced_manager/ui/views/settings/settingsFragement/settings_manage_sources.dart'; +import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_manage_api_url.dart'; +import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_manage_sources.dart'; import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart'; import 'package:revanced_manager/ui/widgets/settingsView/settings_experimental_patches.dart'; import 'package:revanced_manager/ui/widgets/settingsView/settings_experimental_universal_patches.dart'; From dc665f227e58bfe310bdedb3c8ca674b34a6be26 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Fri, 17 Feb 2023 16:28:01 +0400 Subject: [PATCH 02/16] fix: use high resolution adaptive icons (#675) Use high-resolution icons instead of the low-resolution ones on ReVanced Manager. Commits: * High resolution adaptive icons, built using revanced-logo-no-background.svg Same icons currently used for ReVanced YouTube. * tweak background color to match revanced-logo-no-background.svg * recreated foreground using 'revanced-logo-shape.svg' * updated full resolution icons, using same ratio as original SVG * updated icons with gradient border --- .../drawable-hdpi/ic_launcher_background.png | Bin 0 -> 2162 bytes .../drawable-hdpi/ic_launcher_foreground.png | Bin 1401 -> 1781 bytes .../drawable-mdpi/ic_launcher_background.png | Bin 0 -> 1520 bytes .../drawable-mdpi/ic_launcher_foreground.png | Bin 814 -> 1147 bytes .../drawable-xhdpi/ic_launcher_background.png | Bin 0 -> 2789 bytes .../drawable-xhdpi/ic_launcher_foreground.png | Bin 2090 -> 2427 bytes .../ic_launcher_background.png | Bin 0 -> 4153 bytes .../ic_launcher_foreground.png | Bin 3484 -> 3818 bytes .../ic_launcher_background.png | Bin 0 -> 5584 bytes .../ic_launcher_foreground.png | Bin 5498 -> 5037 bytes .../res/mipmap-anydpi-v26/ic_launcher.xml | 2 +- android/app/src/main/res/values/colors.xml | 4 ---- 12 files changed, 1 insertion(+), 5 deletions(-) create mode 100644 android/app/src/main/res/drawable-hdpi/ic_launcher_background.png create mode 100644 android/app/src/main/res/drawable-mdpi/ic_launcher_background.png create mode 100644 android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png create mode 100644 android/app/src/main/res/drawable-xxhdpi/ic_launcher_background.png create mode 100644 android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png delete mode 100644 android/app/src/main/res/values/colors.xml diff --git a/android/app/src/main/res/drawable-hdpi/ic_launcher_background.png b/android/app/src/main/res/drawable-hdpi/ic_launcher_background.png new file mode 100644 index 0000000000000000000000000000000000000000..473330feee26ff425119c7390f1398ff556bcf55 GIT binary patch literal 2162 zcmeAS@N?(olHy`uVBq!ia0y~yU|0mg983%h489W@eHa)xEInNuLn;{GTx8wIY{1}h z&{#a=)69*$R_psu&yHkYZL9Pq^LqyWE!|tpXWcLCQmekOOQm|jPmZYnC*`*Mn`E2u zR}IXyKPk6m-)7s4y7cM`e@=Z{@N?$d#%IbIbt%;sYR-RK@H6g>FK{|nQ+cgAXFI=|X?aNG zH?PNYYu2YaeGvbl{zv@}2Ok4FxAo`Go-?XyZxpgkEwh~K`*M?to1D##tnK~U)rU`d_$kpkIS#1KIZqI42h=BhDxam`|Ri1Y};P0 zE%|hNwC>CYTVDUXa&phlznKB;O)dZJ=CZBxe}4F8-pB2?^`Z*O3YN{+b7PF*nK9po z`O4Xs{~JRiTkfu0a_Z88#JKr9Oe1W;cJU ziEERlr2o{VlRYQrK5I8-`(0-D_ImM#goamPoA2u_%Xz0+vwz0MYgZp$@Hv{WOFrD%e>r$Q?G2@p4Y!IR5H0Pvz%kk%f{G{iSyQelSsCkZFp(% z%|0zpgJ6y(?N1f^4xih0sNOGK=S$61M}uQN6OW{K+nPN~ZT>m;cK=E)AK^_Uu62*U z+(@vSdGYNfd9@N=H_lW}-@gxdGx~YX953#wwVgBbq{JD)M@1)ZTwg4Ccdn-K_f?e= zN?&+aSKd0~UK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Gd| zb@Q}2%D==`eo+XT$g6*=aWnV3umgMKzuZ%c@xHzGwB?S2e-GWxb3S?VmfoBS4mF{5 zkA5e<+GsaFJ6FN{$dSEyPYV((yqwRS-TGF2W95!C#%DL`I;t10@7ua??K|Bm-&}IP zJ$bb*sO^FN2mc@bKLlkM_{3hxHbnl9um0kA#DIr2@PovX@ADcqaj|n+a literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png index 6501a710744b00a5da8dc2efcfd134f5484c146b..0616301e748760a41d2d39502674f504a92adc0b 100644 GIT binary patch literal 1781 zcmeAS@N?(olHy`uVBq!ia0y~yU|0mg9Bd2>42M36Ni#68?eTPR45?szbI_0xB&hIv zx!F;>1O{TjlXLrQ9V{n(4P^M=f89Fj_O{&H+vd(S{d5z=*l)%j+ncpGNxl62Y}=Pp ztR!Tvt}d?Y|9^c?FUJA7k~yb~ggBm+zWX)T_V%|w_x8;Wx^8#>KKG|%KUEl}UD&wp z`+jpz0nUa6U5BepCvJKBu~~oX+mE$5YW6CO9}+9p+vr|$E{}y6=YH78e>PG;fTAhlbZo;=nP(Th~rcBta<-RL#k zwt4HgZ5vDdtH1uN+LLtk@iaj$T~)_(uT(A0)^w@7a50T~67lWBM}y9fr~WEFp2{9@ zb#>YI^RKGE{xjhGWV~F_oOk`n$DU1jWea>w1?Q;!_gYk^{cZnWzR4H<_eJGx-&|3q z$!RoszEhcyp03J;B{mm~g8P-N8K(^Ycdg>*8j(IHvt@XK7#a zGgL_Ftlh;+&vtt7A68D6b6r%Y-S_8#Pw^A?^aJ-_rcV2Kc=Pm03RYWWGL5|*s!qJq z0jqDQd~;n$#>n}-V&Jj5>Y9u<=IRGtS7_Wh{^NZg_hb#5&lZ=O8zyN| zcj40C^+p;6l586qj{JChFS_UdUyjKSN-Aci{{8r3sS4Nmf6^=KEO_@gEDEg<+p_TP z1S2k%_AP~GoklnJ)MqUE$zbu8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p2etG8Fn_u_liu3zF^N|pH@=rQF@q>Y$-OQW6DylZ$E>1jfgD?8lx{Cek zo7J2$=CgS3&E5a^tk=$qjfzH_!?tLxWnU-ff9%ky^ATNFuW`>m^Z&_%4VqVPpRcz` zpE^5B-ytVr>va40EwbWFi=JBsZr>N1ILCQGf!@8Jd8vCNg7X8n zMP%=_-g>H)f%Czk&xKc4nXq4>>+q7mIOM7qNCfNUB=S;PvtEHq{*yP8_)#wK(;=gJ#sW*cIlgUeA~A z71B6yDemU_61Uo};u|ZjI5=KAEqc(gE8%ALHko4%j(hrJbG9vcAzYqa8ZgaiuVQOw z*yfcRI?uL=91MC};t-iNcb$HEVZi*mUdKxvB5(PfFSJxuInleyZ98|@4e`o;=5 zktY>4`WGW*)<^e9CkAv`^!Bv)cACAP=L^hxcU0+Q!*=J)n3U&*w2`V>K1Vd>8w5B{~$>}I&@H;>`v&Z$lW$GWJ#@;Iab+6*3UjJvg39;>n`<5wH6*u@%Zo`OTlM;s_|@0d+>MOfP~K)P$KxNVF7evUyw7?+8lT^)w5qf*absw1w_wCxA3Ub|(lmL*(zv|LwK$138WsysT}K?UD;3n%QzQh&!DorE;YdKU@xd7_jL7hS?83{1OSp()n)(y literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png index aa226804ddc9ff53251688b2453d183a14538275..4a454727fbc74b7d7518a27a2ca7cd1caba2bf68 100644 GIT binary patch literal 1147 zcmeAS@N?(olHy`uVBq!ia0y~yV8{Vs4mJh`hW@nhvkVL@PM$7~Ar*{o4mL6{FfcSM z_`6bkB@>8=gd1)yXIJo?q|x*Eea`J|`DZuh-sYH_dwW~%?Q166mK`^{b@}Rw_xsMS z%ABjeWqp$Iqwo5uZE;uPbr`xY%$j%A974+Z?gX1i$5w1(-xcBc27F< z%12}e|J3Z?vqIy4nQl0B`bT_N?NYG=tERYS+OA7W;L2gQ(9pCIi}}6NyeZq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4GjEU%O3m*sw~_^Sll}DLn)knB zWRzbjy%y+8Et^?-VNE}$k_dO!lVnR(C#zL2Yxj#EtB|^xs(APUnj2~_8Jxxq%m@%i|Vqc(o#QEIg zD?V+~Hy2nawKuZHk5~2Z`5g>~hEJCsKcb@Q?s+5F>+~__nnM?N*f_SlOLBG&IdSv< zIkBy~e{`%)WlX9$75+Rdob$wzxBEp!4_*J(usiZ+GsoO0zZdqAOQtmN#ILZ)dsW@z zTlwZd2K!&7lfREYXposH>&O07RH-D#N~<>hPxiwGmiRe$)^Q5F)!aWD#;^)n_47SSI&zmQ*U`HF z%N`i7oa^lS0*jI-`HBY{0e>F*@effi5Gi&%K&J?%0 zG-r><$N8{PwFex z=5>c4g0cQ?k4TW4n9UGX@uz*Nu0K%k}FkZavR=TC2B-Y6Qq4|%z@*|q!VPC4xb zrB5EsytG)fhX2)^U&YT)6=g#fx`^Z z3kpBPfB65H|G~L{afd{V#5$(%nnQ2@FO2=Ak*C4c!0=6A$@hB(f4dYr&;C!6*v)>H zqbZ}aqr=`fv%{mk@Xx%<3sjYq>dqD_D5(nCi+2c5oYW!DeWcUF^T>DBOHoQnk8U$% z$_ggR#EE-kcXo8>Yaf~F;&SA$Wer#~M^J9O!;#yTDrF*#o z;X;Cf`Q~6v=F&^Hy0{#9%?s9am96mc`>f_2AIomHv!x1s1dG8Agm`)Td WYf&}WcAkNOfx*+&&t;ucLK6T3-6rh- literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png index a6a49da232d8472aac60cd07f202344410a9200f..af465feb90677012f2acdb1537b500cebe82ca2d 100644 GIT binary patch literal 2427 zcmeAS@N?(olHy`uVBq!ia0y~yV7LLo9Bd2>44n$PZy6XkojhF}Ln;{G9BgD@U|?ui z@OP#7N+uAKBHVCu=WzwkPwTiJl;_?KJG*9W)a`A#x3}fKzjkZQ_u3qjuD5}=mzG_t zJXhvY7V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7@;2qg9+j$! z(A)Q}Wl1y&y)t|?fvKoeYSAUrfD*s-w{H{7%~d$a2CS%IIHZ}qSUqn` zY`en@pPk8JYSt>pyZkE~7CHYqAJ6jm__nk&F}EsMETf+@giEf7H)lSh@AiKCUh!>A zmbdkkX1#lnvzl!(LyA)2jz2~lzG-npnlbPx3CJ|ozTEoa?go(u+_~Rsxg{0)8S&Cs=UKL7f8 zx$_phvI*sReZau_lK2jdNQcVgvyWS*?q^vL*6`|jPXpuUt@C``+ZHH5q3eSU&LZl>M8@)b#U| zpXSrK^Gej$R{dn+aG1N|cy(Bs!h}~>-1v=u&A++i)2{IJ1)L6X`|6Tbznd0za<4s? z2k(>qzEf3#4O4vg+Bb4L{ClxtjX0yn%`3l!cQA}f;R=oa;&Bcy_lc#huVG+dVDNPH Kb6Mw<&;$UA1%h$_ diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png b/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_background.png new file mode 100644 index 0000000000000000000000000000000000000000..b7b84772f1ec21547dac4f7e5c5f470e22801a59 GIT binary patch literal 5584 zcmeAS@N?(olHy`uVBq!ia0y~yVB7%0983%h4DLG1YZ(|sr+d0MhEy=Vxx!lLYAC{b zU`F)>4Nc?Xx!EU>++$JijixX)=%Bojzn(4m9Dwd1-sgMv$g5=3PdC&Rxsu(mioMh8Kq z1_8zv4uvD#stiB)1RXlE89sPOdTb^uoHSgEE_WJp;pP!{Hc5^*7<@c_-Kd*%@_TBZbhjaS)qwz-%ZUj z?~5rX7T;L2$aL4@8%t77Xzy#;Zhdrreupy0qt#*`y8ElQs^9G`ax1-=yGXO`VL;B$ z9rd?7=Gw3Sq!ZsXzlmdx-AbO*A3yB+{K%`Lu~XmRQ8};n$IHt_=av7FIb!DX?oDKF zjQ6poyg)8tt_s+Rr-L%<1JDjKKl{0qfOuhW-cIL?%cIGrLrG0xd{G?xA*!9{h)}i9=*2^bqZs$wB zl4wwP^!W3y1#=2+Ki%!d=y&wm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+VpB%JKTohlojgz14 zjI@hPwVJZKrqE)=oc4RgOH_D*~D?{n*ZoPM_Ra8fge%r5owGH3Vg4cMf5Xp;Xn5A8iq&+NK7 zb+c=fSK0Nz+V@hQ-XvU8*j4t9-=fqv-uid{+pi0Q)|`5|Mnr6CN#qpExcP$fy=t63 zW*${ve^TcV(GrrTawOz~jy1u3P@TYwCnV!6iOpxJ32I;NSe;YD@hWNNaV}cdtYz(fDk-Y|i ze02sV5c`Gmo|z0BPz|mf*M%7r!J~?T3phSzH8Ge$1{Rqv%+p`aumCg^2pXw-bX0^v z<%lKNXvSXx=bs}<-IQT~4rekr*~|rvZgL1N;QyGyrT`i&Y}kM6@<|?tEz2KEHh>() z_^)*bgTULD8H`|Q@K~sv9zzRwjMAk+=}0pxL|qF{@vOLw-=_fD*OT)a^$Tj#DsrUtZ8-=4Nqx$pJiZRVDNPHb6Mw<&;$S+ C@(r>8 literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png index 91c4efff116fa15febf741966611e13f976c8353..bc688ad36ee4073c3e8451c2951c473d18f78efa 100644 GIT binary patch literal 5037 zcmeAS@N?(olHy`uVBq!ia0y~yVB7%09Bd2>3@7{yv=|tKOFUg1Ln>~)ImpP!z`)Qj z;otgq983&kgNB>U%pijp6#id#3kW42+!$=;?3{jK$0-Y*$MaoS^@ZoD{o=bYj=`&)&1YR1L;EIp6f*jHRT{73xr$2?Hn5F7ljCX}pv8+rR)hiz`Q zvGv>%*3WHU{Y`Lo#m;Bz z`cK@Q!^m(&J#%{0=B-=y-8vqe{e^LJum9CMr6KRWNi#UqPFlA`_rzU~%*M6;wY$UQ z4Q`(oHQ(#RC7x5HF{NZOBZG-rrpvp38)Ea;ygc{Oe7V)Jt0i*_zqszX``}K*&w2lf zgBG;4dW+VjGccT;ctyRn$lqT|`|?aLpYqywH$`?z$NtVqy(O@=%^-<+Arcx< z|9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<~)Z_+DB01j$ErnhQE;GfHZ=dE32Wj*VtsFyGlcL%c+9$%Dvi;ps;8+n)VPjFR8< zZ{Fck;hHm!FFZVR_0s?MtCn;!MDd^YFkg|8D`zGCM`p?0cc%$`qL(7kAOF4xZx9H8AxZUCDFFAuP z%Nj$<)g|glOL1K z3c_D1xiaKB?B6@-_SPh>2FV34j!l13yT6CEp-x&2Zc07#0wGR>q*ee8wdn$IDzF6HjJK*xhk> z@pvJ_e$EFoe9C{kSEywwwRpYRtSIzlk}E^5i~VOF-i6-l7(PU|AK2#izlO1NtG(m% z;#C5_PW)n+U;57f)-6Wqgs7HDn>4R{ulaeQRJuTwDT6s6+4a-G{a>5r?dEbxPpJ!S zvuFCbuF3N^BxZGVt{db6eLp`}?e zrD-k7@S_O-O}OC z@NSO5>`AKWYrom`@cn3=^X(0vp%O!R!M3#pKiQ8T;^|>Hqrw=$?r~&a_Hoefm=6qr6JXg-=$&C$Vd=Wvuxr2wN~1G}f- z^gGTDEDz+aC7o>M=wPt%=-Tl_j%m~>gFICJv)s2gm!9DHX)gl<1B0ilpUXO@geCw> CAJb0& diff --git a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index b26e945b..28f41b3c 100644 --- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -1,6 +1,6 @@ - + diff --git a/android/app/src/main/res/values/colors.xml b/android/app/src/main/res/values/colors.xml deleted file mode 100644 index 278b2dcb..00000000 --- a/android/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #1B1B1B - From 3ae4d69110e0c1abd14191e3b4bb485c9ca55684 Mon Sep 17 00:00:00 2001 From: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com> Date: Sun, 19 Feb 2023 10:16:49 +0700 Subject: [PATCH 03/16] chore: migrate deprecation code && code cleanup (#708) Fixes all issues in `flutter analyze`. Commits: * chore: migrate deprecated text style * chore: migrate `toggleableActiveColor` to individual theme * chore: don't use 'BuildContext's across async gaps --- lib/theme.dart | 47 ++++++++- lib/ui/theme/dynamic_theme_builder.dart | 96 ++++++++++++++++++- .../views/app_selector/app_selector_view.dart | 4 +- .../views/contributors/contributors_view.dart | 2 +- lib/ui/views/home/home_view.dart | 6 +- lib/ui/views/installer/installer_view.dart | 2 +- lib/ui/views/patcher/patcher_view.dart | 2 +- lib/ui/views/patcher/patcher_viewmodel.dart | 55 ++++++----- .../patches_selector_view.dart | 6 +- lib/ui/views/settings/settings_view.dart | 2 +- lib/ui/widgets/appInfoView/app_info_view.dart | 6 +- .../homeView/available_updates_card.dart | 4 +- .../widgets/homeView/installed_apps_card.dart | 2 +- .../patch_options_fields.dart | 2 +- lib/ui/widgets/shared/custom_chip.dart | 2 +- .../widgets/shared/custom_sliver_app_bar.dart | 2 +- 16 files changed, 189 insertions(+), 51 deletions(-) diff --git a/lib/theme.dart b/lib/theme.dart index 8affd911..f8f592df 100644 --- a/lib/theme.dart +++ b/lib/theme.dart @@ -40,6 +40,51 @@ var darkCustomTheme = ThemeData( ), canvasColor: const Color(0xff1B1A1D), scaffoldBackgroundColor: const Color(0xff1B1A1D), - toggleableActiveColor: const Color(0xffA5CAFF), textTheme: GoogleFonts.robotoTextTheme(ThemeData.dark().textTheme), + switchTheme: SwitchThemeData( + thumbColor: + MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return const Color(0xffA5CAFF); + } + return null; + }), + trackColor: + MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return const Color(0xffA5CAFF); + } + return null; + }), + ), + radioTheme: RadioThemeData( + fillColor: + MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return const Color(0xffA5CAFF); + } + return null; + }), + ), + checkboxTheme: CheckboxThemeData( + fillColor: + MaterialStateProperty.resolveWith((Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return const Color(0xffA5CAFF); + } + return null; + }), + ), ); diff --git a/lib/ui/theme/dynamic_theme_builder.dart b/lib/ui/theme/dynamic_theme_builder.dart index e1fd96b5..4c3076eb 100644 --- a/lib/ui/theme/dynamic_theme_builder.dart +++ b/lib/ui/theme/dynamic_theme_builder.dart @@ -41,8 +41,53 @@ class DynamicThemeBuilder extends StatelessWidget { ), scaffoldBackgroundColor: lightColorScheme?.surface, colorScheme: lightColorScheme?.harmonized(), - toggleableActiveColor: lightColorScheme?.primary, textTheme: GoogleFonts.robotoTextTheme(ThemeData.light().textTheme), + switchTheme: SwitchThemeData( + thumbColor: MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return lightColorScheme?.primary; + } + return null; + }), + trackColor: MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return lightColorScheme?.primary; + } + return null; + }), + ), + radioTheme: RadioThemeData( + fillColor: MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return lightColorScheme?.primary; + } + return null; + }), + ), + checkboxTheme: CheckboxThemeData( + fillColor: MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return lightColorScheme?.primary; + } + return null; + }), + ), ); final ThemeData darkDynamicTheme = ThemeData( useMaterial3: true, @@ -64,8 +109,53 @@ class DynamicThemeBuilder extends StatelessWidget { ), scaffoldBackgroundColor: darkColorScheme?.surface, colorScheme: darkColorScheme?.harmonized(), - toggleableActiveColor: darkColorScheme?.primary, textTheme: GoogleFonts.robotoTextTheme(ThemeData.dark().textTheme), + switchTheme: SwitchThemeData( + thumbColor: MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return darkColorScheme?.primary; + } + return null; + }), + trackColor: MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return darkColorScheme?.primary; + } + return null; + }), + ), + radioTheme: RadioThemeData( + fillColor: MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return darkColorScheme?.primary; + } + return null; + }), + ), + checkboxTheme: CheckboxThemeData( + fillColor: MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.disabled)) { + return null; + } + if (states.contains(MaterialState.selected)) { + return darkColorScheme?.primary; + } + return null; + }), + ), ); return DynamicTheme( themeCollection: ThemeCollection( @@ -90,4 +180,4 @@ class DynamicThemeBuilder extends StatelessWidget { }, ); } -} \ No newline at end of file +} diff --git a/lib/ui/views/app_selector/app_selector_view.dart b/lib/ui/views/app_selector/app_selector_view.dart index 8e661674..ea2c9264 100644 --- a/lib/ui/views/app_selector/app_selector_view.dart +++ b/lib/ui/views/app_selector/app_selector_view.dart @@ -41,14 +41,14 @@ class _AppSelectorViewState extends State { child: Text( '', style: TextStyle( - color: Theme.of(context).textTheme.headline6!.color, + color: Theme.of(context).textTheme.titleLarge!.color, ), ), ), leading: IconButton( icon: Icon( Icons.arrow_back, - color: Theme.of(context).textTheme.headline6!.color, + color: Theme.of(context).textTheme.titleLarge!.color, ), onPressed: () => Navigator.of(context).pop(), ), diff --git a/lib/ui/views/contributors/contributors_view.dart b/lib/ui/views/contributors/contributors_view.dart index ddc66267..3ebebd7a 100644 --- a/lib/ui/views/contributors/contributors_view.dart +++ b/lib/ui/views/contributors/contributors_view.dart @@ -23,7 +23,7 @@ class ContributorsView extends StatelessWidget { child: Text( '', style: GoogleFonts.inter( - color: Theme.of(context).textTheme.headline6!.color, + color: Theme.of(context).textTheme.titleLarge!.color, ), ), ), diff --git a/lib/ui/views/home/home_view.dart b/lib/ui/views/home/home_view.dart index 892cab49..6f09a647 100644 --- a/lib/ui/views/home/home_view.dart +++ b/lib/ui/views/home/home_view.dart @@ -34,7 +34,7 @@ class HomeView extends StatelessWidget { child: Text( '', style: GoogleFonts.inter( - color: Theme.of(context).textTheme.headline6!.color, + color: Theme.of(context).textTheme.titleLarge!.color, ), ), ), @@ -48,7 +48,7 @@ class HomeView extends StatelessWidget { 'homeView.updatesSubtitle', child: Text( '', - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, ), ), const SizedBox(height: 10), @@ -61,7 +61,7 @@ class HomeView extends StatelessWidget { 'homeView.patchedSubtitle', child: Text( '', - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, ), ), const SizedBox(height: 8), diff --git a/lib/ui/views/installer/installer_view.dart b/lib/ui/views/installer/installer_view.dart index d9ceda75..0a2c5487 100644 --- a/lib/ui/views/installer/installer_view.dart +++ b/lib/ui/views/installer/installer_view.dart @@ -28,7 +28,7 @@ class InstallerView extends StatelessWidget { title: Text( model.headerLogs, style: GoogleFonts.inter( - color: Theme.of(context).textTheme.headline6!.color, + color: Theme.of(context).textTheme.titleLarge!.color, ), ), onBackButtonPressed: () => model.onWillPop(context), diff --git a/lib/ui/views/patcher/patcher_view.dart b/lib/ui/views/patcher/patcher_view.dart index de73d07e..38af615d 100644 --- a/lib/ui/views/patcher/patcher_view.dart +++ b/lib/ui/views/patcher/patcher_view.dart @@ -34,7 +34,7 @@ class PatcherView extends StatelessWidget { child: Text( '', style: GoogleFonts.inter( - color: Theme.of(context).textTheme.headline6!.color, + color: Theme.of(context).textTheme.titleLarge!.color, ), ), ), diff --git a/lib/ui/views/patcher/patcher_viewmodel.dart b/lib/ui/views/patcher/patcher_viewmodel.dart index eaac984e..4b7bdddd 100644 --- a/lib/ui/views/patcher/patcher_viewmodel.dart +++ b/lib/ui/views/patcher/patcher_viewmodel.dart @@ -52,31 +52,33 @@ class PatcherViewModel extends BaseViewModel { Future showPatchConfirmationDialog(BuildContext context) async { final bool isValid = await isValidPatchConfig(); - if (isValid) { - navigateToInstaller(); - } else { - return showDialog( - context: context, - builder: (context) => AlertDialog( - title: I18nText('warning'), - backgroundColor: Theme.of(context).colorScheme.secondaryContainer, - content: I18nText('patcherView.patchDialogText'), - actions: [ - CustomMaterialButton( - isFilled: false, - label: I18nText('noButton'), - onPressed: () => Navigator.of(context).pop(), - ), - CustomMaterialButton( - label: I18nText('yesButton'), - onPressed: () { - Navigator.of(context).pop(); - navigateToInstaller(); - }, - ) - ], - ), - ); + if (context.mounted) { + if (isValid) { + navigateToInstaller(); + } else { + return showDialog( + context: context, + builder: (context) => AlertDialog( + title: I18nText('warning'), + backgroundColor: Theme.of(context).colorScheme.secondaryContainer, + content: I18nText('patcherView.patchDialogText'), + actions: [ + CustomMaterialButton( + isFilled: false, + label: I18nText('noButton'), + onPressed: () => Navigator.of(context).pop(), + ), + CustomMaterialButton( + label: I18nText('yesButton'), + onPressed: () { + Navigator.of(context).pop(); + navigateToInstaller(); + }, + ) + ], + ), + ); + } } } @@ -114,7 +116,8 @@ class PatcherViewModel extends BaseViewModel { await _managerAPI.getSelectedPatches(selectedApp!.originalPackageName); final List patches = _patcherAPI.getFilteredPatches(selectedApp!.originalPackageName); - this.selectedPatches + this + .selectedPatches .addAll(patches.where((patch) => selectedPatches.contains(patch.name))); notifyListeners(); } diff --git a/lib/ui/views/patches_selector/patches_selector_view.dart b/lib/ui/views/patches_selector/patches_selector_view.dart index dcff7409..280ae53e 100644 --- a/lib/ui/views/patches_selector/patches_selector_view.dart +++ b/lib/ui/views/patches_selector/patches_selector_view.dart @@ -50,14 +50,14 @@ class _PatchesSelectorViewState extends State { child: Text( '', style: TextStyle( - color: Theme.of(context).textTheme.headline6!.color, + color: Theme.of(context).textTheme.titleLarge!.color, ), ), ), leading: IconButton( icon: Icon( Icons.arrow_back, - color: Theme.of(context).textTheme.headline6!.color, + color: Theme.of(context).textTheme.titleLarge!.color, ), onPressed: () => Navigator.of(context).pop(), ), @@ -74,7 +74,7 @@ class _PatchesSelectorViewState extends State { child: Text( model.patchesVersion!, style: TextStyle( - color: Theme.of(context).textTheme.headline6!.color, + color: Theme.of(context).textTheme.titleLarge!.color, ), ), ), diff --git a/lib/ui/views/settings/settings_view.dart b/lib/ui/views/settings/settings_view.dart index d19addd6..a122bb7f 100644 --- a/lib/ui/views/settings/settings_view.dart +++ b/lib/ui/views/settings/settings_view.dart @@ -32,7 +32,7 @@ class SettingsView extends StatelessWidget { child: Text( '', style: GoogleFonts.inter( - color: Theme.of(context).textTheme.headline6!.color, + color: Theme.of(context).textTheme.titleLarge!.color, ), ), ), diff --git a/lib/ui/widgets/appInfoView/app_info_view.dart b/lib/ui/widgets/appInfoView/app_info_view.dart index b1e0b3cb..ade295ff 100644 --- a/lib/ui/widgets/appInfoView/app_info_view.dart +++ b/lib/ui/widgets/appInfoView/app_info_view.dart @@ -27,7 +27,7 @@ class AppInfoView extends StatelessWidget { child: Text( '', style: GoogleFonts.inter( - color: Theme.of(context).textTheme.headline6!.color, + color: Theme.of(context).textTheme.titleLarge!.color, ), ), ), @@ -51,13 +51,13 @@ class AppInfoView extends StatelessWidget { Text( app.name, textAlign: TextAlign.center, - style: Theme.of(context).textTheme.headline6, + style: Theme.of(context).textTheme.titleLarge, ), const SizedBox(height: 4), Text( app.version, textAlign: TextAlign.center, - style: Theme.of(context).textTheme.subtitle1, + style: Theme.of(context).textTheme.titleLarge, ), const SizedBox(height: 20), Padding( diff --git a/lib/ui/widgets/homeView/available_updates_card.dart b/lib/ui/widgets/homeView/available_updates_card.dart index db341b6f..a1405ebd 100644 --- a/lib/ui/widgets/homeView/available_updates_card.dart +++ b/lib/ui/widgets/homeView/available_updates_card.dart @@ -28,7 +28,7 @@ class AvailableUpdatesCard extends StatelessWidget { child: Text( '', textAlign: TextAlign.center, - style: Theme.of(context).textTheme.subtitle1!.copyWith( + style: Theme.of(context).textTheme.titleMedium!.copyWith( color: Theme.of(context).colorScheme.secondary, ), ), @@ -53,7 +53,7 @@ class AvailableUpdatesCard extends StatelessWidget { // child: Text( // '', // textAlign: TextAlign.center, - // style: Theme.of(context).textTheme.subtitle1!.copyWith( + // style: Theme.of(context).textTheme.titleMedium!.copyWith( // color: Theme.of(context).colorScheme.secondary, // ), // ), diff --git a/lib/ui/widgets/homeView/installed_apps_card.dart b/lib/ui/widgets/homeView/installed_apps_card.dart index 81917d5b..2eb1119c 100644 --- a/lib/ui/widgets/homeView/installed_apps_card.dart +++ b/lib/ui/widgets/homeView/installed_apps_card.dart @@ -30,7 +30,7 @@ class InstalledAppsCard extends StatelessWidget { child: Text( '', textAlign: TextAlign.center, - style: Theme.of(context).textTheme.subtitle1!.copyWith( + style: Theme.of(context).textTheme.titleMedium!.copyWith( color: Theme.of(context).colorScheme.secondary, ), ), diff --git a/lib/ui/widgets/patchesSelectorView/patch_options_fields.dart b/lib/ui/widgets/patchesSelectorView/patch_options_fields.dart index 9cac726d..3f40e4a5 100644 --- a/lib/ui/widgets/patchesSelectorView/patch_options_fields.dart +++ b/lib/ui/widgets/patchesSelectorView/patch_options_fields.dart @@ -61,7 +61,7 @@ class OptionsFilePicker extends StatelessWidget { child: Text( 'Select File', style: TextStyle( - color: Theme.of(context).textTheme.bodyText1?.color, + color: Theme.of(context).textTheme.bodyLarge?.color, ), ), ), diff --git a/lib/ui/widgets/shared/custom_chip.dart b/lib/ui/widgets/shared/custom_chip.dart index 524348cd..8f3bb418 100644 --- a/lib/ui/widgets/shared/custom_chip.dart +++ b/lib/ui/widgets/shared/custom_chip.dart @@ -17,7 +17,7 @@ class CustomChip extends StatelessWidget { showCheckmark: false, label: label, selected: isSelected, - labelStyle: Theme.of(context).textTheme.subtitle2!.copyWith( + labelStyle: Theme.of(context).textTheme.titleSmall!.copyWith( color: isSelected ? Theme.of(context).colorScheme.primary : Theme.of(context).colorScheme.secondary, diff --git a/lib/ui/widgets/shared/custom_sliver_app_bar.dart b/lib/ui/widgets/shared/custom_sliver_app_bar.dart index 72c48ce3..144bd6ab 100644 --- a/lib/ui/widgets/shared/custom_sliver_app_bar.dart +++ b/lib/ui/widgets/shared/custom_sliver_app_bar.dart @@ -33,7 +33,7 @@ class CustomSliverAppBar extends StatelessWidget { : IconButton( icon: Icon( Icons.arrow_back, - color: Theme.of(context).textTheme.headline6!.color, + color: Theme.of(context).textTheme.titleLarge!.color, ), onPressed: onBackButtonPressed ?? () => Navigator.of(context).pop(), From 6829d3cdeac94fb305b8885570840fe25769b6a6 Mon Sep 17 00:00:00 2001 From: Sailesh Dahal Date: Tue, 21 Feb 2023 18:06:56 +0545 Subject: [PATCH 04/16] refactor: update deprecated and minor code refactors (#710) Improve code readability & additional refactoring Commits: chore: exclude generated from analyzer refactor: add SharedPreferences to locator refactor: access shared pref from locator, and code refactor refactor: remove unwanted `await` refactor: remove `const` from `CacheConfig` --- analysis_options.yaml | 2 ++ lib/app/app.dart | 5 +++ lib/main.dart | 36 ++++++++----------- lib/services/crowdin_api.dart | 17 +++++---- lib/services/github_api.dart | 14 ++++---- lib/services/manager_api.dart | 12 +++---- lib/services/patcher_api.dart | 26 ++++++++------ lib/services/revanced_api.dart | 16 ++++----- lib/services/root_api.dart | 8 ++--- .../app_selector/app_selector_viewmodel.dart | 2 +- lib/ui/views/home/home_viewmodel.dart | 4 +-- .../views/installer/installer_viewmodel.dart | 22 ++++++------ .../navigation/navigation_viewmodel.dart | 2 +- .../settings_update_language.dart | 14 ++------ lib/ui/views/settings/settings_viewmodel.dart | 13 ++++--- 15 files changed, 97 insertions(+), 96 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 39e73350..4c75e38f 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -12,6 +12,8 @@ include: package:flutter_lints/flutter.yaml analyzer: exclude: - lib/utils/env_class.g.dart + - "**/*.locator.dart" + - "**/*.router.dart" linter: rules: diff --git a/lib/app/app.dart b/lib/app/app.dart index 2f10b09a..58f9fcc9 100644 --- a/lib/app/app.dart +++ b/lib/app/app.dart @@ -15,6 +15,7 @@ import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart'; import 'package:revanced_manager/ui/views/patches_selector/patches_selector_view.dart'; import 'package:revanced_manager/ui/views/settings/settings_view.dart'; import 'package:revanced_manager/ui/widgets/appInfoView/app_info_view.dart'; +import 'package:shared_preferences/shared_preferences.dart'; import 'package:stacked/stacked_annotations.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -40,6 +41,10 @@ import 'package:stacked_services/stacked_services.dart'; LazySingleton(classType: GithubAPI), LazySingleton(classType: CrowdinAPI), LazySingleton(classType: Toast), + Presolve( + classType: SharedPreferences, + presolveUsing: SharedPreferences.getInstance, + ) ], ) class AppSetup {} diff --git a/lib/main.dart b/lib/main.dart index 9763504a..7d2ff82e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:revanced_manager/app/app.locator.dart'; -import 'package:revanced_manager/services/crowdin_api.dart'; import 'package:revanced_manager/services/github_api.dart'; import 'package:revanced_manager/services/manager_api.dart'; import 'package:revanced_manager/services/patcher_api.dart'; @@ -13,27 +12,25 @@ import 'package:revanced_manager/ui/theme/dynamic_theme_builder.dart'; import 'package:revanced_manager/ui/views/navigation/navigation_view.dart'; import 'package:revanced_manager/utils/environment.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; -import 'package:shared_preferences/shared_preferences.dart'; -import 'package:stacked_themes/stacked_themes.dart'; import 'package:timezone/data/latest.dart' as tz; -late SharedPreferences prefs; Future main() async { - await ThemeManager.initialise(); - await setupLocator(); WidgetsFlutterBinding.ensureInitialized(); - await locator().initialize(); - final String apiUrl = locator().getApiUrl(); - await locator().initialize(apiUrl); - await locator().initialize(); - final bool isSentryEnabled = locator().isSentryEnabled(); - final String repoUrl = locator().getRepoUrl(); - locator().initialize(repoUrl); - await locator().initialize(); - tz.initializeTimeZones(); - prefs = await SharedPreferences.getInstance(); + await setupLocator(); + final manager = locator(); + await manager.initialize(); + final String apiUrl = manager.getApiUrl(); + final bool isSentryEnabled = manager.isSentryEnabled(); + final String repoUrl = manager.getRepoUrl(); - await SentryFlutter.init( + await Future.wait([ + locator().initialize(apiUrl), + locator().initialize(), + ]); + locator().initialize(repoUrl); + tz.initializeTimeZones(); + + return SentryFlutter.init( (options) { options ..dsn = isSentryEnabled ? Environment.sentryDSN : '' @@ -51,11 +48,8 @@ Future main() async { } } as BeforeSendCallback?; }, - appRunner: () { - runApp(const MyApp()); - }, + appRunner: () => runApp(const MyApp()), ); - runApp(const MyApp()); } class MyApp extends StatelessWidget { diff --git a/lib/services/crowdin_api.dart b/lib/services/crowdin_api.dart index 053d5a41..0b470261 100644 --- a/lib/services/crowdin_api.dart +++ b/lib/services/crowdin_api.dart @@ -7,11 +7,14 @@ import 'package:sentry_flutter/sentry_flutter.dart'; @lazySingleton class CrowdinAPI { - late Dio _dio = Dio(); - final DioCacheManager _dioCacheManager = DioCacheManager(CacheConfig()); - final apiKey = Environment.crowdinKEY; + CrowdinAPI() { + initialize(); + } + Dio _dio = Dio(); + DioCacheManager get _dioCacheManager => DioCacheManager(CacheConfig()); + String get apiKey => Environment.crowdinKEY; - Future initialize() async { + void initialize() { try { _dio = Dio( BaseOptions( @@ -24,7 +27,7 @@ class CrowdinAPI { captureFailedRequests: true, ); } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } @@ -32,7 +35,7 @@ class CrowdinAPI { try { await _dioCacheManager.clearAll(); } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } @@ -56,7 +59,7 @@ class CrowdinAPI { return targetLanguages; } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return []; } } diff --git a/lib/services/github_api.dart b/lib/services/github_api.dart index de4676e9..54e1a7a2 100644 --- a/lib/services/github_api.dart +++ b/lib/services/github_api.dart @@ -42,7 +42,7 @@ class GithubAPI { captureFailedRequests: true, ); } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } @@ -50,7 +50,7 @@ class GithubAPI { try { await _dioCacheManager.clearAll(); } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } @@ -62,7 +62,7 @@ class GithubAPI { ); return response.data[0]; } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return null; } } @@ -93,7 +93,7 @@ class GithubAPI { ) .toList(); } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return List.empty(); } } @@ -113,7 +113,7 @@ class GithubAPI { } } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return null; } return null; @@ -128,7 +128,7 @@ class GithubAPI { patches = list.map((patch) => Patch.fromJson(patch)).toList(); } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return List.empty(); } return patches; @@ -143,7 +143,7 @@ class GithubAPI { return 'Unknown'; } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return ''; } } diff --git a/lib/services/manager_api.dart b/lib/services/manager_api.dart index 2c79b3bc..350e0e39 100644 --- a/lib/services/manager_api.dart +++ b/lib/services/manager_api.dart @@ -1,5 +1,6 @@ import 'dart:convert'; import 'dart:io'; + import 'package:device_apps/device_apps.dart'; import 'package:injectable/injectable.dart'; import 'package:package_info_plus/package_info_plus.dart'; @@ -17,10 +18,10 @@ import 'package:shared_preferences/shared_preferences.dart'; class ManagerAPI { final RevancedAPI _revancedAPI = locator(); final GithubAPI _githubAPI = locator(); + final SharedPreferences _prefs = locator(); final RootAPI _rootAPI = RootAPI(); final String patcherRepo = 'revanced-patcher'; final String cliRepo = 'revanced-cli'; - late SharedPreferences _prefs; String storedPatchesFile = '/selected-patches.json'; String defaultApiUrl = 'https://releases.revanced.app/'; String defaultRepoUrl = 'https://api.github.com'; @@ -31,7 +32,6 @@ class ManagerAPI { String defaultManagerRepo = 'revanced/revanced-manager'; Future initialize() async { - _prefs = await SharedPreferences.getInstance(); storedPatchesFile = (await getApplicationDocumentsDirectory()).path + storedPatchesFile; } @@ -180,7 +180,7 @@ class ManagerAPI { _revancedAPI.clearAllCache(); _githubAPI.clearAllCache(); } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } @@ -197,7 +197,7 @@ class ManagerAPI { return await _githubAPI.getPatches(repoName); } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return []; } } @@ -214,7 +214,7 @@ class ManagerAPI { return await _githubAPI.getLatestReleaseFile('.jar', repoName); } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return null; } } @@ -231,7 +231,7 @@ class ManagerAPI { return await _githubAPI.getLatestReleaseFile('.apk', repoName); } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return null; } } diff --git a/lib/services/patcher_api.dart b/lib/services/patcher_api.dart index d5ba92b6..17bd1808 100644 --- a/lib/services/patcher_api.dart +++ b/lib/services/patcher_api.dart @@ -50,7 +50,7 @@ class PatcherAPI { _patches = await _managerAPI.getPatches(); } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); _patches = List.empty(); } } @@ -92,7 +92,7 @@ class PatcherAPI { } } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); continue; } } @@ -171,7 +171,7 @@ class PatcherAPI { } return originalFilePath; } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return originalFilePath; } } @@ -194,7 +194,7 @@ class PatcherAPI { selectedPatches.add(settingsPatch); } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); // ignore } } @@ -231,11 +231,11 @@ class PatcherAPI { 'keyStoreFilePath': _keyStoreFile.path, }, ); - } on Exception catch (e, s) { + } on Exception catch (e) { if (kDebugMode) { print(e); } - throw await Sentry.captureException(e, stackTrace: s); + rethrow; } } } @@ -257,7 +257,7 @@ class PatcherAPI { return await DeviceApps.isAppInstalled(patchedApp.packageName); } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return false; } } @@ -268,11 +268,15 @@ class PatcherAPI { try { if (_outFile != null) { final String newName = _getFileName(appName, version); - CRFileSaver.saveFileWithDialog(SaveFileDialogParams( - sourceFilePath: _outFile!.path, destinationFileName: newName,),); + CRFileSaver.saveFileWithDialog( + SaveFileDialogParams( + sourceFilePath: _outFile!.path, + destinationFileName: newName, + ), + ); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } @@ -287,7 +291,7 @@ class PatcherAPI { ShareExtend.share(shareFile.path, 'file'); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } diff --git a/lib/services/revanced_api.dart b/lib/services/revanced_api.dart index fb78d63c..4394aad8 100644 --- a/lib/services/revanced_api.dart +++ b/lib/services/revanced_api.dart @@ -46,7 +46,7 @@ class RevancedAPI { captureFailedRequests: true, ); } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } @@ -54,7 +54,7 @@ class RevancedAPI { try { await _dioCacheManager.clearAll(); } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } @@ -68,7 +68,7 @@ class RevancedAPI { contributors[name] = repo['contributors']; } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return {}; } return contributors; @@ -80,7 +80,7 @@ class RevancedAPI { final List patches = response.data; return patches.map((patch) => Patch.fromJson(patch)).toList(); } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return List.empty(); } } @@ -98,7 +98,7 @@ class RevancedAPI { (t['name'] as String).endsWith(extension), ); } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return null; } } @@ -116,7 +116,7 @@ class RevancedAPI { return release['version']; } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return null; } return null; @@ -133,7 +133,7 @@ class RevancedAPI { return await DefaultCacheManager().getSingleFile(url); } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return null; } return null; @@ -154,7 +154,7 @@ class RevancedAPI { return format(timestamp, locale: 'en_short'); } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return null; } return null; diff --git a/lib/services/root_api.dart b/lib/services/root_api.dart index 0153848d..036bb3da 100644 --- a/lib/services/root_api.dart +++ b/lib/services/root_api.dart @@ -11,7 +11,7 @@ class RootAPI { final bool? isRooted = await Root.isRootAvailable(); return isRooted != null && isRooted; } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return false; } } @@ -25,7 +25,7 @@ class RootAPI { } return false; } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return false; } } @@ -79,7 +79,7 @@ class RootAPI { return apps.map((pack) => pack.trim()).toList(); } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return List.empty(); } return List.empty(); @@ -126,7 +126,7 @@ class RootAPI { await mountApk(packageName, originalFilePath); return true; } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return false; } } diff --git a/lib/ui/views/app_selector/app_selector_viewmodel.dart b/lib/ui/views/app_selector/app_selector_viewmodel.dart index d7019ae7..2ee25eb2 100644 --- a/lib/ui/views/app_selector/app_selector_viewmodel.dart +++ b/lib/ui/views/app_selector/app_selector_viewmodel.dart @@ -88,7 +88,7 @@ class AppSelectorViewModel extends BaseViewModel { } } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); _toast.showBottom('appSelectorView.errorMessage'); } } diff --git a/lib/ui/views/home/home_viewmodel.dart b/lib/ui/views/home/home_viewmodel.dart index d09ed202..fbb0f46e 100644 --- a/lib/ui/views/home/home_viewmodel.dart +++ b/lib/ui/views/home/home_viewmodel.dart @@ -96,7 +96,7 @@ class HomeViewModel extends BaseViewModel { int.parse(currentVersion.replaceAll(RegExp('[^0-9]'), '')); return latestVersionInt > currentVersionInt; } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); return false; } } @@ -138,7 +138,7 @@ class HomeViewModel extends BaseViewModel { _toast.showBottom('homeView.errorDownloadMessage'); } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); _toast.showBottom('homeView.errorInstallMessage'); } } diff --git a/lib/ui/views/installer/installer_viewmodel.dart b/lib/ui/views/installer/installer_viewmodel.dart index fb891795..4b293255 100644 --- a/lib/ui/views/installer/installer_viewmodel.dart +++ b/lib/ui/views/installer/installer_viewmodel.dart @@ -57,7 +57,7 @@ class InstallerViewModel extends BaseViewModel { ), ).then((value) => FlutterBackground.enableBackgroundExecution()); } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); // ignore } } @@ -131,14 +131,13 @@ class InstallerViewModel extends BaseViewModel { _app.apkFilePath, _patches, ); - } on Exception catch (e, s) { + } on Exception catch (e) { update( -100.0, 'Aborting...', 'An error occurred! Aborting\nError:\n$e', ); - await Sentry.captureException(e, stackTrace: s); - throw await Sentry.captureException(e, stackTrace: s); + rethrow; } } else { update(-100.0, 'Aborting...', 'No app or patches selected! Aborting'); @@ -146,14 +145,13 @@ class InstallerViewModel extends BaseViewModel { if (FlutterBackground.isBackgroundExecutionEnabled) { try { FlutterBackground.disableBackgroundExecution(); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); - // ignore + } on Exception { + rethrow; } } await Wakelock.disable(); } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } @@ -212,7 +210,7 @@ class InstallerViewModel extends BaseViewModel { } } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } @@ -220,7 +218,7 @@ class InstallerViewModel extends BaseViewModel { try { _patcherAPI.exportPatchedFile(_app.name, _app.version); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } @@ -228,7 +226,7 @@ class InstallerViewModel extends BaseViewModel { try { _patcherAPI.sharePatchedFile(_app.name, _app.version); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } @@ -243,7 +241,7 @@ class InstallerViewModel extends BaseViewModel { locator().selectedPatches.clear(); locator().notifyListeners(); } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } diff --git a/lib/ui/views/navigation/navigation_viewmodel.dart b/lib/ui/views/navigation/navigation_viewmodel.dart index 0cdf582d..8d23ddb8 100644 --- a/lib/ui/views/navigation/navigation_viewmodel.dart +++ b/lib/ui/views/navigation/navigation_viewmodel.dart @@ -15,9 +15,9 @@ import 'package:stacked/stacked.dart'; @lazySingleton class NavigationViewModel extends IndexTrackingViewModel { + final prefs = locator(); Future initialize(BuildContext context) async { locator().initialize(context); - final SharedPreferences prefs = await SharedPreferences.getInstance(); if (prefs.getBool('permissionsRequested') == null) { await prefs.setBool('permissionsRequested', true); RootAPI().hasRootPermissions().then( diff --git a/lib/ui/views/settings/settingsFragment/settings_update_language.dart b/lib/ui/views/settings/settingsFragment/settings_update_language.dart index 833d4a87..3873a9d1 100644 --- a/lib/ui/views/settings/settingsFragment/settings_update_language.dart +++ b/lib/ui/views/settings/settingsFragment/settings_update_language.dart @@ -3,7 +3,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:revanced_manager/app/app.locator.dart'; -import 'package:revanced_manager/main.dart'; import 'package:revanced_manager/services/crowdin_api.dart'; import 'package:revanced_manager/services/toast.dart'; import 'package:revanced_manager/ui/views/navigation/navigation_viewmodel.dart'; @@ -17,23 +16,14 @@ final _settingViewModel = SettingsViewModel(); class SUpdateLanguage extends BaseViewModel { final CrowdinAPI _crowdinAPI = locator(); + final SharedPreferences _prefs = locator(); final Toast _toast = locator(); - late SharedPreferences _prefs; String selectedLanguage = 'English'; - String selectedLanguageLocale = prefs.getString('language') ?? 'en_US'; + String get selectedLanguageLocale => _prefs.getString('language') ?? 'en_US'; List languages = []; - Future initialize() async { - _prefs = await SharedPreferences.getInstance(); - selectedLanguageLocale = - _prefs.getString('language') ?? selectedLanguageLocale; - notifyListeners(); - } - Future updateLanguage(BuildContext context, String? value) async { if (value != null) { - selectedLanguageLocale = value; - _prefs = await SharedPreferences.getInstance(); await _prefs.setString('language', value); await FlutterI18n.refresh(context, Locale(value)); timeago.setLocaleMessages(value, timeago.EnMessages()); diff --git a/lib/ui/views/settings/settings_viewmodel.dart b/lib/ui/views/settings/settings_viewmodel.dart index 48d41c76..1e9680b5 100644 --- a/lib/ui/views/settings/settings_viewmodel.dart +++ b/lib/ui/views/settings/settings_viewmodel.dart @@ -1,4 +1,5 @@ import 'dart:io'; + import 'package:cr_file_saver/file_saver.dart'; import 'package:device_info_plus/device_info_plus.dart'; import 'package:file_picker/file_picker.dart'; @@ -74,14 +75,18 @@ class SettingsViewModel extends BaseViewModel { if (outFile.existsSync()) { final String dateTime = DateTime.now().toString().replaceAll(' ', '_').split('.').first; - await CRFileSaver.saveFileWithDialog(SaveFileDialogParams( - sourceFilePath: outFile.path, destinationFileName: 'selected_patches_$dateTime.json',),); + await CRFileSaver.saveFileWithDialog( + SaveFileDialogParams( + sourceFilePath: outFile.path, + destinationFileName: 'selected_patches_$dateTime.json', + ), + ); _toast.showBottom('settingsView.exportedPatches'); } else { _toast.showBottom('settingsView.noExportFileFound'); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); } } @@ -101,7 +106,7 @@ class SettingsViewModel extends BaseViewModel { _toast.showBottom('settingsView.importedPatches'); } } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + Sentry.captureException(e, stackTrace: s).ignore(); _toast.showBottom('settingsView.jsonSelectorErrorMessage'); } } From 8319dc91640cd7ba45e173a65a1cc23f0e628e1d Mon Sep 17 00:00:00 2001 From: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com> Date: Sat, 25 Feb 2023 11:04:48 +0700 Subject: [PATCH 05/16] fix: improperly sized monochrome icon (#715) --- .../drawable-xxxhdpi/ic_launcher_monochrome.png | Bin 0 -> 9381 bytes .../main/res/mipmap-anydpi-v26/ic_launcher.xml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 android/app/src/main/res/drawable-xxxhdpi/ic_launcher_monochrome.png diff --git a/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_monochrome.png new file mode 100644 index 0000000000000000000000000000000000000000..0872d68843eaa79e07d3c3d352ad25985444641b GIT binary patch literal 9381 zcmeAS@N?(olHy`uVBq!ia0y~yVB7%09Bd2>3@7{yv=|r|I14-?iy0W0gFu*3fI-EJ zfq_A?#5JNMI6tkVJh3R1p}f3YFEcN@I61K(RWH9NefB#WDFy}w22U5qkcv5P?^aHT zd0PAK<8#~P)nR8hcql6iSPLdGBsw=ep2E3n!XZ(GHiknAjD5xC?bWAm?Ay7oG9*fduV5kw^QpLc)u*9)}kztR^C@~ra1DFn` zWPfFNFt^S#ewxXP4bLV|`WJU8VlDgH_?q)clGQ7FEU)?WG51BR4iui@n|O1L^qrc2 z>yvGkx?lP~p=8lw#XWj2Z%>LV3*j$r*m!MQ70-v$izoS=UhvL$l3nyiIpxj&F6{n) z>cpR|KNf3OyKQe%etMoiFEVh=#}&I(Vqa98k5g+k) zZ-3$6N7Z7|Gqa6usjvF|rR}Ktyzr;{POHxB`S#n-t<;cPFu`My#!Gj}Yw@Ok*@SPM zR(WcCM}5_XV_{ZHvP~otB5&xtTrPR_n2t+>;>w3S+4Vk`IDg+sYF;Y&j(_WnuJ?b{ zRjaq8Jgw^v^VUlL(PeO2Ai-mm!ppNfuh-xCEgyE#qwTko?!>#1509R;r&LY{@tIjJm01Z2ZoBmu#QPK6|e!J7ZB;uBqGnt30gB z(|9g@)ik^~tM-4ao&U8r?<>?N`;`2BVk4(ucaGWF%WU=MgDN-QdmgNx`|EmsUu5;x zsr%#}SKj1VK5v`nZnn7pXRZfWJpAc>?(X(Ix*p%&@ErRz&!?i})tnQ2KJM&oQ_gHi z*=(hr)4D`I<2w7SmqyNIdupaGVcptp!u?OeTedAPzB=J+{j$4T0=mu>?V7B4ZQVr0 zJriVPB`&?1w#Zz?S1zdNZ*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ydpi-v26/ic_launcher.xml index 28f41b3c..b51aeb83 100644 --- a/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -2,5 +2,5 @@ - + From ab8fccc54475bf498438f251e0bef176da92eccf Mon Sep 17 00:00:00 2001 From: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com> Date: Mon, 27 Feb 2023 17:51:20 +0700 Subject: [PATCH 06/16] chore(deps): bump patcher version from 6.4.3 -> 7.0.0 --- android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 332eb13b..cfb50931 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -71,7 +71,7 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" // ReVanced - implementation "app.revanced:revanced-patcher:6.4.3" + implementation "app.revanced:revanced-patcher:7.0.0" // Signing & aligning implementation("org.bouncycastle:bcpkix-jdk15on:1.70") From 8e3ba883189fb9053a69fd76cde5a2e9c11544f5 Mon Sep 17 00:00:00 2001 From: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com> Date: Mon, 27 Feb 2023 19:26:10 +0700 Subject: [PATCH 07/16] chore: bump gradle 7.5-rc.1 -> 7.6.1 (#717) * chore: upgrade gradle from 7.5-rc.1 -> 7.6.1 * chore: remove unrelated changes --- android/build.gradle | 2 +- android/gradle/wrapper/gradle-wrapper.properties | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index c93e8db2..2d13b78c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,6 +1,6 @@ buildscript { ext.cronetVersion = '102.5005.125' - ext.kotlin_version = '1.8.0' + ext.kotlin_version = '1.7.10' repositories { google() mavenCentral() diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index af82424a..50832291 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon May 09 12:07:41 MSK 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-rc-1-bin.zip distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists From 48a10440fe4f22d2421af795315509deaaad7a6a Mon Sep 17 00:00:00 2001 From: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com> Date: Thu, 2 Mar 2023 11:06:15 +0700 Subject: [PATCH 08/16] ci(build): remove environment on PR build --- .github/workflows/pull-request-build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/pull-request-build.yml b/.github/workflows/pull-request-build.yml index 177e9cf1..99019146 100644 --- a/.github/workflows/pull-request-build.yml +++ b/.github/workflows/pull-request-build.yml @@ -20,10 +20,6 @@ jobs: - uses: subosito/flutter-action@v2 with: channel: 'stable' - - name: Set environment variables - run: echo $SECRETS | base64 -d > lib/utils/environment.dart - env: - SECRETS: ${{ secrets.SECRETS }} - name: Set up Flutter run: flutter pub get - name: Generate files with Builder From a635e5b8d04d21cbc42cb33fa69374d68c46d3b8 Mon Sep 17 00:00:00 2001 From: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com> Date: Thu, 2 Mar 2023 14:51:35 +0700 Subject: [PATCH 09/16] chore: `addFiles` -> `addIntegrations` (#725) fix #721 --- .../main/kotlin/app/revanced/manager/flutter/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt b/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt index e3da5972..3611bf42 100644 --- a/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt +++ b/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt @@ -150,7 +150,7 @@ class MainActivity : FlutterActivity() { ) ) } - patcher.addFiles(listOf(integrations)) {} + patcher.addIntegrations(listOf(integrations)) {} } handler.post { From 6d6054162634f4a8ec6838cc40909a3e58df80fb Mon Sep 17 00:00:00 2001 From: Ushie Date: Fri, 3 Mar 2023 03:11:44 +0300 Subject: [PATCH 10/16] chore(deps): meet patcher breaking changes --- .../revanced/manager/flutter/MainActivity.kt | 24 ++++++---------- lib/services/patcher_api.dart | 28 ++----------------- 2 files changed, 11 insertions(+), 41 deletions(-) diff --git a/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt b/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt index 3611bf42..352174a8 100644 --- a/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt +++ b/android/app/src/main/kotlin/app/revanced/manager/flutter/MainActivity.kt @@ -43,7 +43,6 @@ class MainActivity : FlutterActivity() { val integrationsPath = call.argument("integrationsPath") val selectedPatches = call.argument>("selectedPatches") val cacheDirPath = call.argument("cacheDirPath") - val mergeIntegrations = call.argument("mergeIntegrations") val keyStoreFilePath = call.argument("keyStoreFilePath") if (patchBundleFilePath != null && originalFilePath != null && @@ -53,7 +52,6 @@ class MainActivity : FlutterActivity() { integrationsPath != null && selectedPatches != null && cacheDirPath != null && - mergeIntegrations != null && keyStoreFilePath != null ) { runPatcher( @@ -66,7 +64,6 @@ class MainActivity : FlutterActivity() { integrationsPath, selectedPatches, cacheDirPath, - mergeIntegrations, keyStoreFilePath ) } else { @@ -88,7 +85,6 @@ class MainActivity : FlutterActivity() { integrationsPath: String, selectedPatches: List, cacheDirPath: String, - mergeIntegrations: Boolean, keyStoreFilePath: String ) { val originalFile = File(originalFilePath) @@ -139,19 +135,17 @@ class MainActivity : FlutterActivity() { mapOf("progress" to 0.3, "header" to "", "log" to "") ) } - if (mergeIntegrations) { - handler.post { - installerChannel.invokeMethod( - "update", - mapOf( - "progress" to 0.4, - "header" to "Merging integrations...", - "log" to "Merging integrations" - ) + handler.post { + installerChannel.invokeMethod( + "update", + mapOf( + "progress" to 0.4, + "header" to "Merging integrations...", + "log" to "Merging integrations" ) - } - patcher.addIntegrations(listOf(integrations)) {} + ) } + patcher.addIntegrations(listOf(integrations)) {} handler.post { installerChannel.invokeMethod( diff --git a/lib/services/patcher_api.dart b/lib/services/patcher_api.dart index 17bd1808..7e208b4d 100644 --- a/lib/services/patcher_api.dart +++ b/lib/services/patcher_api.dart @@ -122,25 +122,6 @@ class PatcherAPI { .toList(); } - bool dependencyNeedsIntegrations(String name) { - return name.contains('integrations') || - _patches.any( - (patch) => - patch.name == name && - (patch.dependencies.any( - (dep) => dependencyNeedsIntegrations(dep), - )), - ); - } - - Future needsIntegrations(List selectedPatches) async { - return selectedPatches.any( - (patch) => patch.dependencies.any( - (dep) => dependencyNeedsIntegrations(dep), - ), - ); - } - Future needsResourcePatching(List selectedPatches) async { return selectedPatches.any( (patch) => patch.dependencies.any( @@ -181,7 +162,6 @@ class PatcherAPI { String originalFilePath, List selectedPatches, ) async { - final bool mergeIntegrations = await needsIntegrations(selectedPatches); final bool includeSettings = await needsSettingsPatch(selectedPatches); if (includeSettings) { try { @@ -199,10 +179,7 @@ class PatcherAPI { } } final File? patchBundleFile = await _managerAPI.downloadPatches(); - File? integrationsFile; - if (mergeIntegrations) { - integrationsFile = await _managerAPI.downloadIntegrations(); - } + final File? integrationsFile = await _managerAPI.downloadIntegrations(); if (patchBundleFile != null) { _dataDir.createSync(); _tmpDir.createSync(); @@ -224,10 +201,9 @@ class PatcherAPI { 'inputFilePath': inputFile.path, 'patchedFilePath': patchedFile.path, 'outFilePath': _outFile!.path, - 'integrationsPath': mergeIntegrations ? integrationsFile!.path : '', + 'integrationsPath': integrationsFile!.path, 'selectedPatches': selectedPatches.map((p) => p.name).toList(), 'cacheDirPath': cacheDir.path, - 'mergeIntegrations': mergeIntegrations, 'keyStoreFilePath': _keyStoreFile.path, }, ); From 68ccefc59f01b74daffa014c5c21d2a218bb18ce Mon Sep 17 00:00:00 2001 From: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com> Date: Fri, 3 Mar 2023 18:06:24 +0700 Subject: [PATCH 11/16] revert: "refactor: update deprecated and minor code refactors (#710)" This reverts commit 6829d3cdeac94fb305b8885570840fe25769b6a6. Signed-off-by: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com> --- analysis_options.yaml | 2 -- lib/app/app.dart | 5 --- lib/main.dart | 32 +++++++++++-------- lib/services/crowdin_api.dart | 17 ++++------ lib/services/github_api.dart | 14 ++++---- lib/services/manager_api.dart | 12 +++---- lib/services/patcher_api.dart | 26 +++++++-------- lib/services/revanced_api.dart | 16 +++++----- lib/services/root_api.dart | 8 ++--- .../app_selector/app_selector_viewmodel.dart | 2 +- lib/ui/views/home/home_viewmodel.dart | 4 +-- .../views/installer/installer_viewmodel.dart | 22 +++++++------ .../navigation/navigation_viewmodel.dart | 2 +- .../settings_update_language.dart | 14 ++++++-- lib/ui/views/settings/settings_viewmodel.dart | 13 +++----- 15 files changed, 94 insertions(+), 95 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 4c75e38f..39e73350 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -12,8 +12,6 @@ include: package:flutter_lints/flutter.yaml analyzer: exclude: - lib/utils/env_class.g.dart - - "**/*.locator.dart" - - "**/*.router.dart" linter: rules: diff --git a/lib/app/app.dart b/lib/app/app.dart index 58f9fcc9..2f10b09a 100644 --- a/lib/app/app.dart +++ b/lib/app/app.dart @@ -15,7 +15,6 @@ import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart'; import 'package:revanced_manager/ui/views/patches_selector/patches_selector_view.dart'; import 'package:revanced_manager/ui/views/settings/settings_view.dart'; import 'package:revanced_manager/ui/widgets/appInfoView/app_info_view.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import 'package:stacked/stacked_annotations.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -41,10 +40,6 @@ import 'package:stacked_services/stacked_services.dart'; LazySingleton(classType: GithubAPI), LazySingleton(classType: CrowdinAPI), LazySingleton(classType: Toast), - Presolve( - classType: SharedPreferences, - presolveUsing: SharedPreferences.getInstance, - ) ], ) class AppSetup {} diff --git a/lib/main.dart b/lib/main.dart index 7d2ff82e..9763504a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,6 +4,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:revanced_manager/app/app.locator.dart'; +import 'package:revanced_manager/services/crowdin_api.dart'; import 'package:revanced_manager/services/github_api.dart'; import 'package:revanced_manager/services/manager_api.dart'; import 'package:revanced_manager/services/patcher_api.dart'; @@ -12,25 +13,27 @@ import 'package:revanced_manager/ui/theme/dynamic_theme_builder.dart'; import 'package:revanced_manager/ui/views/navigation/navigation_view.dart'; import 'package:revanced_manager/utils/environment.dart'; import 'package:sentry_flutter/sentry_flutter.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:stacked_themes/stacked_themes.dart'; import 'package:timezone/data/latest.dart' as tz; +late SharedPreferences prefs; Future main() async { - WidgetsFlutterBinding.ensureInitialized(); + await ThemeManager.initialise(); await setupLocator(); - final manager = locator(); - await manager.initialize(); - final String apiUrl = manager.getApiUrl(); - final bool isSentryEnabled = manager.isSentryEnabled(); - final String repoUrl = manager.getRepoUrl(); - - await Future.wait([ - locator().initialize(apiUrl), - locator().initialize(), - ]); + WidgetsFlutterBinding.ensureInitialized(); + await locator().initialize(); + final String apiUrl = locator().getApiUrl(); + await locator().initialize(apiUrl); + await locator().initialize(); + final bool isSentryEnabled = locator().isSentryEnabled(); + final String repoUrl = locator().getRepoUrl(); locator().initialize(repoUrl); + await locator().initialize(); tz.initializeTimeZones(); + prefs = await SharedPreferences.getInstance(); - return SentryFlutter.init( + await SentryFlutter.init( (options) { options ..dsn = isSentryEnabled ? Environment.sentryDSN : '' @@ -48,8 +51,11 @@ Future main() async { } } as BeforeSendCallback?; }, - appRunner: () => runApp(const MyApp()), + appRunner: () { + runApp(const MyApp()); + }, ); + runApp(const MyApp()); } class MyApp extends StatelessWidget { diff --git a/lib/services/crowdin_api.dart b/lib/services/crowdin_api.dart index 0b470261..053d5a41 100644 --- a/lib/services/crowdin_api.dart +++ b/lib/services/crowdin_api.dart @@ -7,14 +7,11 @@ import 'package:sentry_flutter/sentry_flutter.dart'; @lazySingleton class CrowdinAPI { - CrowdinAPI() { - initialize(); - } - Dio _dio = Dio(); - DioCacheManager get _dioCacheManager => DioCacheManager(CacheConfig()); - String get apiKey => Environment.crowdinKEY; + late Dio _dio = Dio(); + final DioCacheManager _dioCacheManager = DioCacheManager(CacheConfig()); + final apiKey = Environment.crowdinKEY; - void initialize() { + Future initialize() async { try { _dio = Dio( BaseOptions( @@ -27,7 +24,7 @@ class CrowdinAPI { captureFailedRequests: true, ); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); } } @@ -35,7 +32,7 @@ class CrowdinAPI { try { await _dioCacheManager.clearAll(); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); } } @@ -59,7 +56,7 @@ class CrowdinAPI { return targetLanguages; } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return []; } } diff --git a/lib/services/github_api.dart b/lib/services/github_api.dart index 54e1a7a2..de4676e9 100644 --- a/lib/services/github_api.dart +++ b/lib/services/github_api.dart @@ -42,7 +42,7 @@ class GithubAPI { captureFailedRequests: true, ); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); } } @@ -50,7 +50,7 @@ class GithubAPI { try { await _dioCacheManager.clearAll(); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); } } @@ -62,7 +62,7 @@ class GithubAPI { ); return response.data[0]; } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return null; } } @@ -93,7 +93,7 @@ class GithubAPI { ) .toList(); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return List.empty(); } } @@ -113,7 +113,7 @@ class GithubAPI { } } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return null; } return null; @@ -128,7 +128,7 @@ class GithubAPI { patches = list.map((patch) => Patch.fromJson(patch)).toList(); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return List.empty(); } return patches; @@ -143,7 +143,7 @@ class GithubAPI { return 'Unknown'; } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return ''; } } diff --git a/lib/services/manager_api.dart b/lib/services/manager_api.dart index 350e0e39..2c79b3bc 100644 --- a/lib/services/manager_api.dart +++ b/lib/services/manager_api.dart @@ -1,6 +1,5 @@ import 'dart:convert'; import 'dart:io'; - import 'package:device_apps/device_apps.dart'; import 'package:injectable/injectable.dart'; import 'package:package_info_plus/package_info_plus.dart'; @@ -18,10 +17,10 @@ import 'package:shared_preferences/shared_preferences.dart'; class ManagerAPI { final RevancedAPI _revancedAPI = locator(); final GithubAPI _githubAPI = locator(); - final SharedPreferences _prefs = locator(); final RootAPI _rootAPI = RootAPI(); final String patcherRepo = 'revanced-patcher'; final String cliRepo = 'revanced-cli'; + late SharedPreferences _prefs; String storedPatchesFile = '/selected-patches.json'; String defaultApiUrl = 'https://releases.revanced.app/'; String defaultRepoUrl = 'https://api.github.com'; @@ -32,6 +31,7 @@ class ManagerAPI { String defaultManagerRepo = 'revanced/revanced-manager'; Future initialize() async { + _prefs = await SharedPreferences.getInstance(); storedPatchesFile = (await getApplicationDocumentsDirectory()).path + storedPatchesFile; } @@ -180,7 +180,7 @@ class ManagerAPI { _revancedAPI.clearAllCache(); _githubAPI.clearAllCache(); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); } } @@ -197,7 +197,7 @@ class ManagerAPI { return await _githubAPI.getPatches(repoName); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return []; } } @@ -214,7 +214,7 @@ class ManagerAPI { return await _githubAPI.getLatestReleaseFile('.jar', repoName); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return null; } } @@ -231,7 +231,7 @@ class ManagerAPI { return await _githubAPI.getLatestReleaseFile('.apk', repoName); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return null; } } diff --git a/lib/services/patcher_api.dart b/lib/services/patcher_api.dart index 7e208b4d..2ea16d15 100644 --- a/lib/services/patcher_api.dart +++ b/lib/services/patcher_api.dart @@ -50,7 +50,7 @@ class PatcherAPI { _patches = await _managerAPI.getPatches(); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); _patches = List.empty(); } } @@ -92,7 +92,7 @@ class PatcherAPI { } } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); continue; } } @@ -152,7 +152,7 @@ class PatcherAPI { } return originalFilePath; } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return originalFilePath; } } @@ -174,7 +174,7 @@ class PatcherAPI { selectedPatches.add(settingsPatch); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); // ignore } } @@ -207,11 +207,11 @@ class PatcherAPI { 'keyStoreFilePath': _keyStoreFile.path, }, ); - } on Exception catch (e) { + } on Exception catch (e, s) { if (kDebugMode) { print(e); } - rethrow; + throw await Sentry.captureException(e, stackTrace: s); } } } @@ -233,7 +233,7 @@ class PatcherAPI { return await DeviceApps.isAppInstalled(patchedApp.packageName); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return false; } } @@ -244,15 +244,11 @@ class PatcherAPI { try { if (_outFile != null) { final String newName = _getFileName(appName, version); - CRFileSaver.saveFileWithDialog( - SaveFileDialogParams( - sourceFilePath: _outFile!.path, - destinationFileName: newName, - ), - ); + CRFileSaver.saveFileWithDialog(SaveFileDialogParams( + sourceFilePath: _outFile!.path, destinationFileName: newName,),); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + Sentry.captureException(e, stackTrace: s); } } @@ -267,7 +263,7 @@ class PatcherAPI { ShareExtend.share(shareFile.path, 'file'); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + Sentry.captureException(e, stackTrace: s); } } diff --git a/lib/services/revanced_api.dart b/lib/services/revanced_api.dart index 4394aad8..fb78d63c 100644 --- a/lib/services/revanced_api.dart +++ b/lib/services/revanced_api.dart @@ -46,7 +46,7 @@ class RevancedAPI { captureFailedRequests: true, ); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); } } @@ -54,7 +54,7 @@ class RevancedAPI { try { await _dioCacheManager.clearAll(); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); } } @@ -68,7 +68,7 @@ class RevancedAPI { contributors[name] = repo['contributors']; } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return {}; } return contributors; @@ -80,7 +80,7 @@ class RevancedAPI { final List patches = response.data; return patches.map((patch) => Patch.fromJson(patch)).toList(); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return List.empty(); } } @@ -98,7 +98,7 @@ class RevancedAPI { (t['name'] as String).endsWith(extension), ); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return null; } } @@ -116,7 +116,7 @@ class RevancedAPI { return release['version']; } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return null; } return null; @@ -133,7 +133,7 @@ class RevancedAPI { return await DefaultCacheManager().getSingleFile(url); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return null; } return null; @@ -154,7 +154,7 @@ class RevancedAPI { return format(timestamp, locale: 'en_short'); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return null; } return null; diff --git a/lib/services/root_api.dart b/lib/services/root_api.dart index 036bb3da..0153848d 100644 --- a/lib/services/root_api.dart +++ b/lib/services/root_api.dart @@ -11,7 +11,7 @@ class RootAPI { final bool? isRooted = await Root.isRootAvailable(); return isRooted != null && isRooted; } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return false; } } @@ -25,7 +25,7 @@ class RootAPI { } return false; } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return false; } } @@ -79,7 +79,7 @@ class RootAPI { return apps.map((pack) => pack.trim()).toList(); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return List.empty(); } return List.empty(); @@ -126,7 +126,7 @@ class RootAPI { await mountApk(packageName, originalFilePath); return true; } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return false; } } diff --git a/lib/ui/views/app_selector/app_selector_viewmodel.dart b/lib/ui/views/app_selector/app_selector_viewmodel.dart index 2ee25eb2..d7019ae7 100644 --- a/lib/ui/views/app_selector/app_selector_viewmodel.dart +++ b/lib/ui/views/app_selector/app_selector_viewmodel.dart @@ -88,7 +88,7 @@ class AppSelectorViewModel extends BaseViewModel { } } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); _toast.showBottom('appSelectorView.errorMessage'); } } diff --git a/lib/ui/views/home/home_viewmodel.dart b/lib/ui/views/home/home_viewmodel.dart index fbb0f46e..d09ed202 100644 --- a/lib/ui/views/home/home_viewmodel.dart +++ b/lib/ui/views/home/home_viewmodel.dart @@ -96,7 +96,7 @@ class HomeViewModel extends BaseViewModel { int.parse(currentVersion.replaceAll(RegExp('[^0-9]'), '')); return latestVersionInt > currentVersionInt; } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); return false; } } @@ -138,7 +138,7 @@ class HomeViewModel extends BaseViewModel { _toast.showBottom('homeView.errorDownloadMessage'); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); _toast.showBottom('homeView.errorInstallMessage'); } } diff --git a/lib/ui/views/installer/installer_viewmodel.dart b/lib/ui/views/installer/installer_viewmodel.dart index 4b293255..fb891795 100644 --- a/lib/ui/views/installer/installer_viewmodel.dart +++ b/lib/ui/views/installer/installer_viewmodel.dart @@ -57,7 +57,7 @@ class InstallerViewModel extends BaseViewModel { ), ).then((value) => FlutterBackground.enableBackgroundExecution()); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); // ignore } } @@ -131,13 +131,14 @@ class InstallerViewModel extends BaseViewModel { _app.apkFilePath, _patches, ); - } on Exception catch (e) { + } on Exception catch (e, s) { update( -100.0, 'Aborting...', 'An error occurred! Aborting\nError:\n$e', ); - rethrow; + await Sentry.captureException(e, stackTrace: s); + throw await Sentry.captureException(e, stackTrace: s); } } else { update(-100.0, 'Aborting...', 'No app or patches selected! Aborting'); @@ -145,13 +146,14 @@ class InstallerViewModel extends BaseViewModel { if (FlutterBackground.isBackgroundExecutionEnabled) { try { FlutterBackground.disableBackgroundExecution(); - } on Exception { - rethrow; + } on Exception catch (e, s) { + await Sentry.captureException(e, stackTrace: s); + // ignore } } await Wakelock.disable(); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); } } @@ -210,7 +212,7 @@ class InstallerViewModel extends BaseViewModel { } } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); } } @@ -218,7 +220,7 @@ class InstallerViewModel extends BaseViewModel { try { _patcherAPI.exportPatchedFile(_app.name, _app.version); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + Sentry.captureException(e, stackTrace: s); } } @@ -226,7 +228,7 @@ class InstallerViewModel extends BaseViewModel { try { _patcherAPI.sharePatchedFile(_app.name, _app.version); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + Sentry.captureException(e, stackTrace: s); } } @@ -241,7 +243,7 @@ class InstallerViewModel extends BaseViewModel { locator().selectedPatches.clear(); locator().notifyListeners(); } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); } } diff --git a/lib/ui/views/navigation/navigation_viewmodel.dart b/lib/ui/views/navigation/navigation_viewmodel.dart index 8d23ddb8..0cdf582d 100644 --- a/lib/ui/views/navigation/navigation_viewmodel.dart +++ b/lib/ui/views/navigation/navigation_viewmodel.dart @@ -15,9 +15,9 @@ import 'package:stacked/stacked.dart'; @lazySingleton class NavigationViewModel extends IndexTrackingViewModel { - final prefs = locator(); Future initialize(BuildContext context) async { locator().initialize(context); + final SharedPreferences prefs = await SharedPreferences.getInstance(); if (prefs.getBool('permissionsRequested') == null) { await prefs.setBool('permissionsRequested', true); RootAPI().hasRootPermissions().then( diff --git a/lib/ui/views/settings/settingsFragment/settings_update_language.dart b/lib/ui/views/settings/settingsFragment/settings_update_language.dart index 3873a9d1..833d4a87 100644 --- a/lib/ui/views/settings/settingsFragment/settings_update_language.dart +++ b/lib/ui/views/settings/settingsFragment/settings_update_language.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:revanced_manager/app/app.locator.dart'; +import 'package:revanced_manager/main.dart'; import 'package:revanced_manager/services/crowdin_api.dart'; import 'package:revanced_manager/services/toast.dart'; import 'package:revanced_manager/ui/views/navigation/navigation_viewmodel.dart'; @@ -16,14 +17,23 @@ final _settingViewModel = SettingsViewModel(); class SUpdateLanguage extends BaseViewModel { final CrowdinAPI _crowdinAPI = locator(); - final SharedPreferences _prefs = locator(); final Toast _toast = locator(); + late SharedPreferences _prefs; String selectedLanguage = 'English'; - String get selectedLanguageLocale => _prefs.getString('language') ?? 'en_US'; + String selectedLanguageLocale = prefs.getString('language') ?? 'en_US'; List languages = []; + Future initialize() async { + _prefs = await SharedPreferences.getInstance(); + selectedLanguageLocale = + _prefs.getString('language') ?? selectedLanguageLocale; + notifyListeners(); + } + Future updateLanguage(BuildContext context, String? value) async { if (value != null) { + selectedLanguageLocale = value; + _prefs = await SharedPreferences.getInstance(); await _prefs.setString('language', value); await FlutterI18n.refresh(context, Locale(value)); timeago.setLocaleMessages(value, timeago.EnMessages()); diff --git a/lib/ui/views/settings/settings_viewmodel.dart b/lib/ui/views/settings/settings_viewmodel.dart index 1e9680b5..48d41c76 100644 --- a/lib/ui/views/settings/settings_viewmodel.dart +++ b/lib/ui/views/settings/settings_viewmodel.dart @@ -1,5 +1,4 @@ import 'dart:io'; - import 'package:cr_file_saver/file_saver.dart'; import 'package:device_info_plus/device_info_plus.dart'; import 'package:file_picker/file_picker.dart'; @@ -75,18 +74,14 @@ class SettingsViewModel extends BaseViewModel { if (outFile.existsSync()) { final String dateTime = DateTime.now().toString().replaceAll(' ', '_').split('.').first; - await CRFileSaver.saveFileWithDialog( - SaveFileDialogParams( - sourceFilePath: outFile.path, - destinationFileName: 'selected_patches_$dateTime.json', - ), - ); + await CRFileSaver.saveFileWithDialog(SaveFileDialogParams( + sourceFilePath: outFile.path, destinationFileName: 'selected_patches_$dateTime.json',),); _toast.showBottom('settingsView.exportedPatches'); } else { _toast.showBottom('settingsView.noExportFileFound'); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + Sentry.captureException(e, stackTrace: s); } } @@ -106,7 +101,7 @@ class SettingsViewModel extends BaseViewModel { _toast.showBottom('settingsView.importedPatches'); } } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s).ignore(); + await Sentry.captureException(e, stackTrace: s); _toast.showBottom('settingsView.jsonSelectorErrorMessage'); } } From 5617535a63070caacd44ef6dfabad6c871a9792a Mon Sep 17 00:00:00 2001 From: Aunali321 <48486084+Aunali321@users.noreply.github.com> Date: Sun, 5 Mar 2023 14:42:46 +0530 Subject: [PATCH 12/16] refactor: remove sentry and crowdin (#730) We no longer use sentry and crowdin. --- .env | 3 - assets/i18n/en_US.json | 2 - lib/app/app.dart | 2 - lib/main.dart | 27 -------- lib/services/crowdin_api.dart | 63 ------------------- lib/services/github_api.dart | 56 ++++++++++------- lib/services/manager_api.dart | 34 +++++----- lib/services/patcher_api.dart | 56 ++++++++++------- lib/services/revanced_api.dart | 54 +++++++++------- lib/services/root_api.dart | 26 +++++--- .../app_selector/app_selector_viewmodel.dart | 8 ++- lib/ui/views/home/home_viewmodel.dart | 14 +++-- .../views/installer/installer_viewmodel.dart | 53 ++++++++++------ .../settings_update_language.dart | 3 - lib/ui/views/settings/settings_view.dart | 2 - lib/ui/views/settings/settings_viewmodel.dart | 32 +++++----- .../settings_logging_section.dart | 36 ----------- lib/utils/environment.dart | 5 -- pubspec.yaml | 5 +- 19 files changed, 198 insertions(+), 283 deletions(-) delete mode 100644 .env delete mode 100644 lib/services/crowdin_api.dart delete mode 100644 lib/ui/widgets/settingsView/settings_logging_section.dart delete mode 100644 lib/utils/environment.dart diff --git a/.env b/.env deleted file mode 100644 index 4ead69a3..00000000 --- a/.env +++ /dev/null @@ -1,3 +0,0 @@ -sentryDSN= -apiKey= -appId= \ No newline at end of file diff --git a/assets/i18n/en_US.json b/assets/i18n/en_US.json index 9490cc91..4c094867 100644 --- a/assets/i18n/en_US.json +++ b/assets/i18n/en_US.json @@ -145,8 +145,6 @@ "exportSectionTitle": "Import & export", "aboutLabel": "About", "snackbarMessage": "Copied to clipboard", - "sentryLabel": "Sentry logging", - "sentryHint": "Send anonymous logs to help us improve ReVanced Manager", "restartAppForChanges": "Restart the app to apply changes", "deleteKeystoreLabel": "Delete keystore", "deleteKeystoreHint": "Delete the keystore used to sign the app", diff --git a/lib/app/app.dart b/lib/app/app.dart index 2f10b09a..76c32b19 100644 --- a/lib/app/app.dart +++ b/lib/app/app.dart @@ -1,4 +1,3 @@ -import 'package:revanced_manager/services/crowdin_api.dart'; import 'package:revanced_manager/services/github_api.dart'; import 'package:revanced_manager/services/manager_api.dart'; import 'package:revanced_manager/services/patcher_api.dart'; @@ -38,7 +37,6 @@ import 'package:stacked_services/stacked_services.dart'; LazySingleton(classType: PatcherAPI), LazySingleton(classType: RevancedAPI), LazySingleton(classType: GithubAPI), - LazySingleton(classType: CrowdinAPI), LazySingleton(classType: Toast), ], ) diff --git a/lib/main.dart b/lib/main.dart index 9763504a..d34f9d66 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,15 +4,12 @@ import 'package:flutter/material.dart'; import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:revanced_manager/app/app.locator.dart'; -import 'package:revanced_manager/services/crowdin_api.dart'; import 'package:revanced_manager/services/github_api.dart'; import 'package:revanced_manager/services/manager_api.dart'; import 'package:revanced_manager/services/patcher_api.dart'; import 'package:revanced_manager/services/revanced_api.dart'; import 'package:revanced_manager/ui/theme/dynamic_theme_builder.dart'; import 'package:revanced_manager/ui/views/navigation/navigation_view.dart'; -import 'package:revanced_manager/utils/environment.dart'; -import 'package:sentry_flutter/sentry_flutter.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:stacked_themes/stacked_themes.dart'; import 'package:timezone/data/latest.dart' as tz; @@ -25,36 +22,12 @@ Future main() async { await locator().initialize(); final String apiUrl = locator().getApiUrl(); await locator().initialize(apiUrl); - await locator().initialize(); - final bool isSentryEnabled = locator().isSentryEnabled(); final String repoUrl = locator().getRepoUrl(); locator().initialize(repoUrl); await locator().initialize(); tz.initializeTimeZones(); prefs = await SharedPreferences.getInstance(); - await SentryFlutter.init( - (options) { - options - ..dsn = isSentryEnabled ? Environment.sentryDSN : '' - ..environment = 'alpha' - ..release = '0.1' - ..tracesSampleRate = 1.0 - ..anrEnabled = true - ..enableOutOfMemoryTracking = true - ..sampleRate = isSentryEnabled ? 1.0 : 0.0 - ..beforeSend = (event, hint) { - if (isSentryEnabled) { - return event; - } else { - return null; - } - } as BeforeSendCallback?; - }, - appRunner: () { - runApp(const MyApp()); - }, - ); runApp(const MyApp()); } diff --git a/lib/services/crowdin_api.dart b/lib/services/crowdin_api.dart deleted file mode 100644 index 053d5a41..00000000 --- a/lib/services/crowdin_api.dart +++ /dev/null @@ -1,63 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:dio_http_cache_lts/dio_http_cache_lts.dart'; -import 'package:injectable/injectable.dart' hide Environment; -import 'package:revanced_manager/utils/environment.dart'; -import 'package:sentry_dio/sentry_dio.dart'; -import 'package:sentry_flutter/sentry_flutter.dart'; - -@lazySingleton -class CrowdinAPI { - late Dio _dio = Dio(); - final DioCacheManager _dioCacheManager = DioCacheManager(CacheConfig()); - final apiKey = Environment.crowdinKEY; - - Future initialize() async { - try { - _dio = Dio( - BaseOptions( - baseUrl: 'https://api.crowdin.com/api/v2', - ), - ); - - _dio.interceptors.add(_dioCacheManager.interceptor); - _dio.addSentry( - captureFailedRequests: true, - ); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); - } - } - - Future clearAllCache() async { - try { - await _dioCacheManager.clearAll(); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); - } - } - - Future getLanguages() async { - try { - final response = await _dio.get( - '/projects', - options: buildCacheOptions( - const Duration(hours: 6), - maxStale: const Duration(days: 1), - options: Options( - headers: { - 'Authorization': 'Bearer $apiKey', - }, - contentType: 'application/json', - ), - ), - ); - final List targetLanguages = - await response.data['data'][0]['data']['targetLanguages']; - - return targetLanguages; - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); - return []; - } - } -} diff --git a/lib/services/github_api.dart b/lib/services/github_api.dart index de4676e9..0af9fbb1 100644 --- a/lib/services/github_api.dart +++ b/lib/services/github_api.dart @@ -4,11 +4,10 @@ import 'dart:io'; import 'package:collection/collection.dart'; import 'package:dio/dio.dart'; import 'package:dio_http_cache_lts/dio_http_cache_lts.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter_cache_manager/flutter_cache_manager.dart'; import 'package:injectable/injectable.dart'; import 'package:revanced_manager/models/patch.dart'; -import 'package:sentry_dio/sentry_dio.dart'; -import 'package:sentry_flutter/sentry_flutter.dart'; @lazySingleton class GithubAPI { @@ -38,19 +37,20 @@ class GithubAPI { ); _dio.interceptors.add(_dioCacheManager.interceptor); - _dio.addSentry( - captureFailedRequests: true, - ); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } } Future clearAllCache() async { try { await _dioCacheManager.clearAll(); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } } @@ -61,8 +61,10 @@ class GithubAPI { options: _cacheOptions, ); return response.data[0]; - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return null; } } @@ -92,10 +94,12 @@ class GithubAPI { '\n' as String, ) .toList(); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); - return List.empty(); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } + return []; } Future getLatestReleaseFile(String extension, String repoName) async { @@ -112,9 +116,10 @@ class GithubAPI { ); } } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); - return null; + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } return null; } @@ -127,10 +132,12 @@ class GithubAPI { final List list = jsonDecode(f.readAsStringSync()); patches = list.map((patch) => Patch.fromJson(patch)).toList(); } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); - return List.empty(); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } + return patches; } @@ -142,9 +149,12 @@ class GithubAPI { } else { return 'Unknown'; } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); - return ''; + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } + + return 'Unknown'; } } } diff --git a/lib/services/manager_api.dart b/lib/services/manager_api.dart index 2c79b3bc..c4eaeb60 100644 --- a/lib/services/manager_api.dart +++ b/lib/services/manager_api.dart @@ -1,6 +1,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:device_apps/device_apps.dart'; +import 'package:flutter/foundation.dart'; import 'package:injectable/injectable.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:path_provider/path_provider.dart'; @@ -10,7 +11,6 @@ import 'package:revanced_manager/models/patched_application.dart'; import 'package:revanced_manager/services/github_api.dart'; import 'package:revanced_manager/services/revanced_api.dart'; import 'package:revanced_manager/services/root_api.dart'; -import 'package:sentry_flutter/sentry_flutter.dart'; import 'package:shared_preferences/shared_preferences.dart'; @lazySingleton @@ -98,14 +98,6 @@ class ManagerAPI { await _prefs.setBool('useDarkTheme', value); } - bool isSentryEnabled() { - return _prefs.getBool('sentryEnabled') ?? true; - } - - Future setSentryStatus(bool value) async { - await _prefs.setBool('sentryEnabled', value); - } - bool areUniversalPatchesEnabled() { return _prefs.getBool('universalPatchesEnabled') ?? false; } @@ -179,8 +171,10 @@ class ManagerAPI { try { _revancedAPI.clearAllCache(); _githubAPI.clearAllCache(); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } } @@ -196,8 +190,10 @@ class ManagerAPI { } else { return await _githubAPI.getPatches(repoName); } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return []; } } @@ -213,8 +209,10 @@ class ManagerAPI { } else { return await _githubAPI.getLatestReleaseFile('.jar', repoName); } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return null; } } @@ -230,8 +228,10 @@ class ManagerAPI { } else { return await _githubAPI.getLatestReleaseFile('.apk', repoName); } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return null; } } diff --git a/lib/services/patcher_api.dart b/lib/services/patcher_api.dart index 2ea16d15..75e253a4 100644 --- a/lib/services/patcher_api.dart +++ b/lib/services/patcher_api.dart @@ -13,7 +13,6 @@ import 'package:revanced_manager/models/patch.dart'; import 'package:revanced_manager/models/patched_application.dart'; import 'package:revanced_manager/services/manager_api.dart'; import 'package:revanced_manager/services/root_api.dart'; -import 'package:sentry_flutter/sentry_flutter.dart'; import 'package:share_extend/share_extend.dart'; @lazySingleton @@ -49,8 +48,10 @@ class PatcherAPI { if (_patches.isEmpty) { _patches = await _managerAPI.getPatches(); } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } _patches = List.empty(); } } @@ -91,9 +92,10 @@ class PatcherAPI { filteredApps.add(app); } } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); - continue; + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } } } @@ -151,8 +153,10 @@ class PatcherAPI { ); } return originalFilePath; - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return originalFilePath; } } @@ -173,9 +177,10 @@ class PatcherAPI { if (settingsPatch != null) { selectedPatches.add(settingsPatch); } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); - // ignore + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } } final File? patchBundleFile = await _managerAPI.downloadPatches(); @@ -207,11 +212,10 @@ class PatcherAPI { 'keyStoreFilePath': _keyStoreFile.path, }, ); - } on Exception catch (e, s) { + } on Exception catch (e) { if (kDebugMode) { print(e); } - throw await Sentry.captureException(e, stackTrace: s); } } } @@ -232,8 +236,10 @@ class PatcherAPI { await AppInstaller.installApk(_outFile!.path); return await DeviceApps.isAppInstalled(patchedApp.packageName); } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return false; } } @@ -244,11 +250,17 @@ class PatcherAPI { try { if (_outFile != null) { final String newName = _getFileName(appName, version); - CRFileSaver.saveFileWithDialog(SaveFileDialogParams( - sourceFilePath: _outFile!.path, destinationFileName: newName,),); + CRFileSaver.saveFileWithDialog( + SaveFileDialogParams( + sourceFilePath: _outFile!.path, + destinationFileName: newName, + ), + ); + } + } on Exception catch (e) { + if (kDebugMode) { + print(e); } - } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s); } } @@ -262,8 +274,10 @@ class PatcherAPI { final File shareFile = _outFile!.copySync(newPath); ShareExtend.share(shareFile.path, 'file'); } - } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } } diff --git a/lib/services/revanced_api.dart b/lib/services/revanced_api.dart index fb78d63c..f7626d45 100644 --- a/lib/services/revanced_api.dart +++ b/lib/services/revanced_api.dart @@ -4,13 +4,12 @@ import 'dart:io'; import 'package:collection/collection.dart'; import 'package:dio/dio.dart'; import 'package:dio_http_cache_lts/dio_http_cache_lts.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter_cache_manager/flutter_cache_manager.dart'; import 'package:injectable/injectable.dart'; import 'package:native_dio_client/native_dio_client.dart'; import 'package:revanced_manager/models/patch.dart'; import 'package:revanced_manager/utils/check_for_gms.dart'; -import 'package:sentry_dio/sentry_dio.dart'; -import 'package:sentry_flutter/sentry_flutter.dart'; import 'package:timeago/timeago.dart'; @lazySingleton @@ -42,19 +41,20 @@ class RevancedAPI { log('ReVanced API: Using CronetEngine + $isGMSInstalled'); } _dio.interceptors.add(_dioCacheManager.interceptor); - _dio.addSentry( - captureFailedRequests: true, - ); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } } Future clearAllCache() async { try { await _dioCacheManager.clearAll(); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } } @@ -67,8 +67,10 @@ class RevancedAPI { final String name = repo['name']; contributors[name] = repo['contributors']; } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return {}; } return contributors; @@ -79,8 +81,10 @@ class RevancedAPI { final response = await _dio.get('/patches', options: _cacheOptions); final List patches = response.data; return patches.map((patch) => Patch.fromJson(patch)).toList(); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return List.empty(); } } @@ -97,8 +101,10 @@ class RevancedAPI { t['repository'] == repoName && (t['name'] as String).endsWith(extension), ); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return null; } } @@ -115,8 +121,10 @@ class RevancedAPI { if (release != null) { return release['version']; } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return null; } return null; @@ -132,8 +140,10 @@ class RevancedAPI { final String url = release['browser_download_url']; return await DefaultCacheManager().getSingleFile(url); } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return null; } return null; @@ -153,8 +163,10 @@ class RevancedAPI { DateTime.parse(release['timestamp'] as String); return format(timestamp, locale: 'en_short'); } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return null; } return null; diff --git a/lib/services/root_api.dart b/lib/services/root_api.dart index 0153848d..727bac1d 100644 --- a/lib/services/root_api.dart +++ b/lib/services/root_api.dart @@ -1,5 +1,5 @@ +import 'package:flutter/foundation.dart'; import 'package:root/root.dart'; -import 'package:sentry_flutter/sentry_flutter.dart'; class RootAPI { final String _managerDirPath = '/data/local/tmp/revanced-manager'; @@ -10,8 +10,10 @@ class RootAPI { try { final bool? isRooted = await Root.isRootAvailable(); return isRooted != null && isRooted; - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return false; } } @@ -24,8 +26,10 @@ class RootAPI { return isRooted != null && isRooted; } return false; - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return false; } } @@ -78,8 +82,10 @@ class RootAPI { apps.removeWhere((pack) => pack.isEmpty); return apps.map((pack) => pack.trim()).toList(); } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return List.empty(); } return List.empty(); @@ -125,8 +131,10 @@ class RootAPI { await installApk(packageName, patchedFilePath); await mountApk(packageName, originalFilePath); return true; - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return false; } } diff --git a/lib/ui/views/app_selector/app_selector_viewmodel.dart b/lib/ui/views/app_selector/app_selector_viewmodel.dart index d7019ae7..21d21d96 100644 --- a/lib/ui/views/app_selector/app_selector_viewmodel.dart +++ b/lib/ui/views/app_selector/app_selector_viewmodel.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:device_apps/device_apps.dart'; import 'package:file_picker/file_picker.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:revanced_manager/app/app.locator.dart'; import 'package:revanced_manager/models/patched_application.dart'; @@ -9,7 +10,6 @@ import 'package:revanced_manager/services/manager_api.dart'; import 'package:revanced_manager/services/patcher_api.dart'; import 'package:revanced_manager/services/toast.dart'; import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart'; -import 'package:sentry_flutter/sentry_flutter.dart'; import 'package:stacked/stacked.dart'; class AppSelectorViewModel extends BaseViewModel { @@ -87,8 +87,10 @@ class AppSelectorViewModel extends BaseViewModel { locator().loadLastSelectedPatches(); } } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } _toast.showBottom('appSelectorView.errorMessage'); } } diff --git a/lib/ui/views/home/home_viewmodel.dart b/lib/ui/views/home/home_viewmodel.dart index d09ed202..ac553061 100644 --- a/lib/ui/views/home/home_viewmodel.dart +++ b/lib/ui/views/home/home_viewmodel.dart @@ -4,6 +4,7 @@ import 'dart:io'; import 'package:app_installer/app_installer.dart'; import 'package:cross_connectivity/cross_connectivity.dart'; import 'package:device_apps/device_apps.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; @@ -18,7 +19,6 @@ import 'package:revanced_manager/services/toast.dart'; import 'package:revanced_manager/ui/views/navigation/navigation_viewmodel.dart'; import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart'; import 'package:revanced_manager/ui/widgets/homeView/update_confirmation_dialog.dart'; -import 'package:sentry_flutter/sentry_flutter.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; import 'package:timezone/timezone.dart' as tz; @@ -95,8 +95,10 @@ class HomeViewModel extends BaseViewModel { final int currentVersionInt = int.parse(currentVersion.replaceAll(RegExp('[^0-9]'), '')); return latestVersionInt > currentVersionInt; - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } return false; } } @@ -137,8 +139,10 @@ class HomeViewModel extends BaseViewModel { } else { _toast.showBottom('homeView.errorDownloadMessage'); } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } _toast.showBottom('homeView.errorInstallMessage'); } } diff --git a/lib/ui/views/installer/installer_viewmodel.dart b/lib/ui/views/installer/installer_viewmodel.dart index fb891795..c1523dab 100644 --- a/lib/ui/views/installer/installer_viewmodel.dart +++ b/lib/ui/views/installer/installer_viewmodel.dart @@ -1,5 +1,6 @@ // ignore_for_file: use_build_context_synchronously import 'package:device_apps/device_apps.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_background/flutter_background.dart'; @@ -14,7 +15,6 @@ import 'package:revanced_manager/services/root_api.dart'; import 'package:revanced_manager/services/toast.dart'; import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart'; import 'package:revanced_manager/ui/widgets/shared/custom_material_button.dart'; -import 'package:sentry_flutter/sentry_flutter.dart'; import 'package:stacked/stacked.dart'; import 'package:wakelock/wakelock.dart'; @@ -56,9 +56,10 @@ class InstallerViewModel extends BaseViewModel { ), ), ).then((value) => FlutterBackground.enableBackgroundExecution()); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); - // ignore + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } // ignore } } await Wakelock.enable(); @@ -131,14 +132,15 @@ class InstallerViewModel extends BaseViewModel { _app.apkFilePath, _patches, ); - } on Exception catch (e, s) { + } on Exception catch (e) { update( -100.0, 'Aborting...', 'An error occurred! Aborting\nError:\n$e', ); - await Sentry.captureException(e, stackTrace: s); - throw await Sentry.captureException(e, stackTrace: s); + if (kDebugMode) { + print(e); + } } } else { update(-100.0, 'Aborting...', 'No app or patches selected! Aborting'); @@ -146,14 +148,17 @@ class InstallerViewModel extends BaseViewModel { if (FlutterBackground.isBackgroundExecutionEnabled) { try { FlutterBackground.disableBackgroundExecution(); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); - // ignore + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } // ignore } } await Wakelock.disable(); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } } @@ -211,24 +216,30 @@ class InstallerViewModel extends BaseViewModel { await _managerAPI.savePatchedApp(_app); } } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } } void exportResult() { try { _patcherAPI.exportPatchedFile(_app.name, _app.version); - } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } } void shareResult() { try { _patcherAPI.sharePatchedFile(_app.name, _app.version); - } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } } @@ -242,8 +253,10 @@ class InstallerViewModel extends BaseViewModel { locator().selectedApp = null; locator().selectedPatches.clear(); locator().notifyListeners(); - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } } diff --git a/lib/ui/views/settings/settingsFragment/settings_update_language.dart b/lib/ui/views/settings/settingsFragment/settings_update_language.dart index 833d4a87..66bb2c3e 100644 --- a/lib/ui/views/settings/settingsFragment/settings_update_language.dart +++ b/lib/ui/views/settings/settingsFragment/settings_update_language.dart @@ -4,7 +4,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:revanced_manager/app/app.locator.dart'; import 'package:revanced_manager/main.dart'; -import 'package:revanced_manager/services/crowdin_api.dart'; import 'package:revanced_manager/services/toast.dart'; import 'package:revanced_manager/ui/views/navigation/navigation_viewmodel.dart'; import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart'; @@ -16,7 +15,6 @@ import 'package:timeago/timeago.dart' as timeago; final _settingViewModel = SettingsViewModel(); class SUpdateLanguage extends BaseViewModel { - final CrowdinAPI _crowdinAPI = locator(); final Toast _toast = locator(); late SharedPreferences _prefs; String selectedLanguage = 'English'; @@ -43,7 +41,6 @@ class SUpdateLanguage extends BaseViewModel { } Future initLang() async { - languages = await _crowdinAPI.getLanguages(); languages.sort((a, b) => a['name'].compareTo(b['name'])); notifyListeners(); } diff --git a/lib/ui/views/settings/settings_view.dart b/lib/ui/views/settings/settings_view.dart index a122bb7f..e1002b40 100644 --- a/lib/ui/views/settings/settings_view.dart +++ b/lib/ui/views/settings/settings_view.dart @@ -49,8 +49,6 @@ class SettingsView extends StatelessWidget { _settingsDivider, SExportSection(), _settingsDivider, - // SLoggingSection(), - // _settingsDivider, SInfoSection(), ], ), diff --git a/lib/ui/views/settings/settings_viewmodel.dart b/lib/ui/views/settings/settings_viewmodel.dart index 48d41c76..65df575e 100644 --- a/lib/ui/views/settings/settings_viewmodel.dart +++ b/lib/ui/views/settings/settings_viewmodel.dart @@ -2,6 +2,7 @@ import 'dart:io'; import 'package:cr_file_saver/file_saver.dart'; import 'package:device_info_plus/device_info_plus.dart'; import 'package:file_picker/file_picker.dart'; +import 'package:flutter/foundation.dart'; import 'package:logcat/logcat.dart'; import 'package:path_provider/path_provider.dart'; import 'package:revanced_manager/app/app.locator.dart'; @@ -11,7 +12,6 @@ import 'package:revanced_manager/services/toast.dart'; import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart'; import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_update_language.dart'; import 'package:revanced_manager/ui/views/settings/settingsFragment/settings_update_theme.dart'; -import 'package:sentry_flutter/sentry_flutter.dart'; import 'package:share_extend/share_extend.dart'; import 'package:stacked/stacked.dart'; import 'package:stacked_services/stacked_services.dart'; @@ -28,16 +28,6 @@ class SettingsViewModel extends BaseViewModel { _navigationService.navigateTo(Routes.contributorsView); } - bool isSentryEnabled() { - return _managerAPI.isSentryEnabled(); - } - - void useSentry(bool value) { - _managerAPI.setSentryStatus(value); - _toast.showBottom('settingsView.restartAppForChanges'); - notifyListeners(); - } - bool areUniversalPatchesEnabled() { return _managerAPI.areUniversalPatchesEnabled(); } @@ -74,14 +64,20 @@ class SettingsViewModel extends BaseViewModel { if (outFile.existsSync()) { final String dateTime = DateTime.now().toString().replaceAll(' ', '_').split('.').first; - await CRFileSaver.saveFileWithDialog(SaveFileDialogParams( - sourceFilePath: outFile.path, destinationFileName: 'selected_patches_$dateTime.json',),); + await CRFileSaver.saveFileWithDialog( + SaveFileDialogParams( + sourceFilePath: outFile.path, + destinationFileName: 'selected_patches_$dateTime.json', + ), + ); _toast.showBottom('settingsView.exportedPatches'); } else { _toast.showBottom('settingsView.noExportFileFound'); } - } on Exception catch (e, s) { - Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } } } @@ -100,8 +96,10 @@ class SettingsViewModel extends BaseViewModel { } _toast.showBottom('settingsView.importedPatches'); } - } on Exception catch (e, s) { - await Sentry.captureException(e, stackTrace: s); + } on Exception catch (e) { + if (kDebugMode) { + print(e); + } _toast.showBottom('settingsView.jsonSelectorErrorMessage'); } } diff --git a/lib/ui/widgets/settingsView/settings_logging_section.dart b/lib/ui/widgets/settingsView/settings_logging_section.dart deleted file mode 100644 index b06b589c..00000000 --- a/lib/ui/widgets/settingsView/settings_logging_section.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:flutter_i18n/widgets/I18nText.dart'; -import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart'; -import 'package:revanced_manager/ui/widgets/settingsView/custom_switch_tile.dart'; -import 'package:revanced_manager/ui/widgets/settingsView/settings_section.dart'; - -final _settingsViewModel = SettingsViewModel(); - -class SLoggingSection extends StatelessWidget { - const SLoggingSection({super.key}); - - @override - Widget build(BuildContext context) { - return SettingsSection( - title: 'settingsView.logsSectionTitle', - children: [ - CustomSwitchTile( - padding: const EdgeInsets.symmetric(horizontal: 20.0), - title: I18nText( - 'settingsView.sentryLabel', - child: const Text( - '', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.w500, - ), - ), - ), - subtitle: I18nText('settingsView.sentryHint'), - value: _settingsViewModel.isSentryEnabled(), - onTap: (value) => _settingsViewModel.useSentry(value), - ), - ], - ); - } -} diff --git a/lib/utils/environment.dart b/lib/utils/environment.dart deleted file mode 100644 index ba671b68..00000000 --- a/lib/utils/environment.dart +++ /dev/null @@ -1,5 +0,0 @@ -// Dummy environment variables used for building the app locally. These automatically get set with correct values during workflow builds. -class Environment { - static const sentryDSN = ''; - static const crowdinKEY = ''; -} diff --git a/pubspec.yaml b/pubspec.yaml index 92f8e715..05d739e4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,7 +10,6 @@ environment: sdk: ">=2.17.5 <3.0.0" dependencies: - sentry_flutter: ^6.12.2 animations: ^2.0.4 app_installer: ^1.1.0 collection: ^1.16.0 @@ -73,7 +72,6 @@ dependencies: timezone: ^0.8.0 url_launcher: ^6.1.5 wakelock: ^0.6.2 - sentry_dio: ^6.12.2 flutter_dotenv: ^5.0.2 pub_release: ^8.0.3 flutter_markdown: ^0.6.13 @@ -92,5 +90,4 @@ dev_dependencies: flutter: uses-material-design: true assets: - - assets/i18n/ - - .env + - assets/i18n/ \ No newline at end of file From 0074fee8653317062cdb7445acf1c5662d769e0d Mon Sep 17 00:00:00 2001 From: Aunali321 <48486084+Aunali321@users.noreply.github.com> Date: Sun, 5 Mar 2023 14:53:51 +0530 Subject: [PATCH 13/16] build: new ci (#731) New Build CI Commits: * buid: re-do ci * build: ignore tags * build: get the latest flutter version automatically && formatting --------- Co-authored-by: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com> --- .github/workflows/commit-build.yml | 114 +++++++++++++++++++++++++---- 1 file changed, 100 insertions(+), 14 deletions(-) diff --git a/.github/workflows/commit-build.yml b/.github/workflows/commit-build.yml index bb90180d..553f0651 100644 --- a/.github/workflows/commit-build.yml +++ b/.github/workflows/commit-build.yml @@ -1,35 +1,104 @@ -name: "Android CI Actions" - +name: Android Release on: push: branches: - "**" tags-ignore: - - "v*" # Ignore tags that start with "v" (e.g. v1.0.0) because they are handled by release-build.yml + - "v*" + + pull_request: + branches: + - "**" + + workflow_dispatch: jobs: - release: + version: + name: Create version number runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Set env - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - name: Set up JDK 12 - uses: actions/setup-java@v3 with: - java-version: '12' + fetch-depth: 0 + + - name: Fetch all history for all tags and branches + run: | + git config remote.origin.url https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + git fetch --prune --depth=10000 + + - name: Install GitVersion + uses: gittools/actions/gitversion/setup@v0.9.7 + with: + versionSpec: "5.x" + + - name: Use GitVersion + id: gitversion + uses: gittools/actions/gitversion/execute@v0.9.7 + + - name: Create version.txt with nuGetVersion + run: echo ${{ steps.gitversion.outputs.nuGetVersion }} > version.txt + + - name: Upload version.txt + uses: actions/upload-artifact@v2 + with: + name: gitversion + path: version.txt + + build: + name: Create Android Build + needs: version + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Get version.txt + uses: actions/download-artifact@v2 + with: + name: gitversion + + - name: Create new file without newline char from version.txt + run: tr -d '\n' < version.txt > version1.txt + + - name: Read version + id: version + uses: juliangruber/read-file-action@v1 + with: + path: version1.txt + + - name: Update version in YAML + run: sed -i 's/99.99.99+99/${{ steps.version.outputs.content }}+${{ github.run_number }}/g' pubspec.yaml + + - name: Download Android keystore + id: android_keystore + uses: timheuer/base64-to-file@v1.0.3 + with: + fileName: upload-keystore.jks + encodedString: ${{ secrets.SIGNING_KEYSTORE }} + + - name: Create key.properties + run: | + echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties + echo "storePassword=${{ secrets.SIGNING_KEYSTORE_PASSWORD }}" >> android/key.properties + echo "keyPassword=${{ secrets.SIGNING_KEY_PASSWORD }}" >> android/key.properties + echo "keyAlias=${{ secrets.SIGNING_KEY_ALIAS }}" >> android/key.properties + + - uses: actions/setup-java@v3 + with: distribution: 'zulu' + java-version: "12.x" + cache: gradle + - uses: subosito/flutter-action@v2 with: channel: 'stable' - - name: Set environment variables - run: echo $SECRETS | base64 -d > lib/utils/environment.dart - env: - SECRETS: ${{ secrets.SECRETS }} - - name: Set up Flutter + cache: true + + - name: Get dependencies run: flutter pub get + - name: Generate files with Builder run: flutter packages pub run build_runner build --delete-conflicting-outputs + - name: Build with Flutter env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -37,6 +106,7 @@ jobs: SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }} run: flutter build apk + - name: Sign APK id: sign_apk uses: ilharp/sign-android-release@v1 @@ -46,10 +116,26 @@ jobs: keyStorePassword: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }} keyAlias: ${{ secrets.SIGNING_KEY_ALIAS }} keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }} + - name: Add version to APK run: mv ${{ steps.sign_apk.outputs.signedFile }} revanced-manager-${{ env.RELEASE_VERSION }}.apk + - name: Upload APK uses: actions/upload-artifact@v3 with: name: revanced-manager-${{ env.RELEASE_VERSION }} path: revanced-manager-${{ env.RELEASE_VERSION }}.apk + + # deploy: + # name: Deploy Android Build + # needs: build + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v1 + # - name: Get Android Build from artifacts + # uses: actions/download-artifact@v2 + # with: + # name: android-release + +env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true From d318224a6f5a1ce2e72b4793623aad7cdc406c3f Mon Sep 17 00:00:00 2001 From: Aunali321 Date: Mon, 6 Mar 2023 18:08:48 +0530 Subject: [PATCH 14/16] fix: black screen after resetting custom sources --- .../settings/settingsFragment/settings_manage_sources.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/ui/views/settings/settingsFragment/settings_manage_sources.dart b/lib/ui/views/settings/settingsFragment/settings_manage_sources.dart index 10b3e64d..72825aee 100644 --- a/lib/ui/views/settings/settingsFragment/settings_manage_sources.dart +++ b/lib/ui/views/settings/settingsFragment/settings_manage_sources.dart @@ -152,8 +152,6 @@ class SManageSources extends BaseViewModel { _managerAPI.setPatchesRepo(''); _managerAPI.setIntegrationsRepo(''); Navigator.of(context).pop(); - Navigator.of(context).pop(); - Navigator.of(context).pop(); }, ) ], From b475bd25c8dad7c81071e2c6cf2ccb43ab31ce58 Mon Sep 17 00:00:00 2001 From: Aunali321 <48486084+Aunali321@users.noreply.github.com> Date: Sat, 11 Mar 2023 23:01:26 +0530 Subject: [PATCH 15/16] build: remove env setup step --- .github/workflows/release-build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index d0862122..c7401652 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -20,10 +20,6 @@ jobs: - uses: subosito/flutter-action@v2 with: channel: 'stable' - - name: Set environment variables - run: echo $SECRETS | base64 -d > lib/utils/environment.dart - env: - SECRETS: ${{ secrets.SECRETS }} - name: Set up Flutter run: flutter pub get - name: Generate files with Builder From 92a3b0d6e0e837c8661db65b5bed33ee582ef0b9 Mon Sep 17 00:00:00 2001 From: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com> Date: Tue, 14 Mar 2023 21:53:42 +0700 Subject: [PATCH 16/16] feat(style): use native switch & chip (#732) * chore: remove useless themedata * feat(style): new switch * feat(style): use native chip components * chore: remove unused import * feat(accessibility): set tooltip * chore: remove unneeded themedata * chore: fix theme * feat(i18n): add 3 new strings * feat(style): correct material 3 theme on nondynamic --- assets/i18n/en_US.json | 3 + lib/theme.dart | 50 +------- lib/ui/theme/dynamic_theme_builder.dart | 110 ------------------ lib/ui/views/home/home_view.dart | 43 +++++-- lib/ui/views/navigation/navigation_view.dart | 3 - .../patches_selector_view.dart | 32 +++-- .../settings_update_theme.dart | 22 ++-- .../settings_experimental_patches.dart | 7 +- ...ttings_experimental_universal_patches.dart | 7 +- 9 files changed, 75 insertions(+), 202 deletions(-) diff --git a/assets/i18n/en_US.json b/assets/i18n/en_US.json index 4c094867..49a95bf5 100644 --- a/assets/i18n/en_US.json +++ b/assets/i18n/en_US.json @@ -79,8 +79,11 @@ "searchBarHint": "Search patches", "doneButton": "Done", "recommended": "Recommended", + "recommendedTooltip": "Select all recommended patches", "all": "All", + "allTooltip": "Select all patches", "none": "None", + "noneTooltip": "Deselect all patches", "loadPatchesSelection": "Load patches selection", "noSavedPatches": "No saved patches for the selected app.\nPress Done to save current selection.", "noPatchesFound": "No patches found for the selected app", diff --git a/lib/theme.dart b/lib/theme.dart index f8f592df..89c93d52 100644 --- a/lib/theme.dart +++ b/lib/theme.dart @@ -12,7 +12,7 @@ var lightCustomTheme = ThemeData( navigationBarTheme: NavigationBarThemeData( labelTextStyle: MaterialStateProperty.all( TextStyle( - color: lightCustomColorScheme.secondary, + color: lightCustomColorScheme.onSurface, fontWeight: FontWeight.w500, ), ), @@ -33,7 +33,7 @@ var darkCustomTheme = ThemeData( navigationBarTheme: NavigationBarThemeData( labelTextStyle: MaterialStateProperty.all( TextStyle( - color: darkCustomColorScheme.secondary, + color: darkCustomColorScheme.onSurface, fontWeight: FontWeight.w500, ), ), @@ -41,50 +41,4 @@ var darkCustomTheme = ThemeData( canvasColor: const Color(0xff1B1A1D), scaffoldBackgroundColor: const Color(0xff1B1A1D), textTheme: GoogleFonts.robotoTextTheme(ThemeData.dark().textTheme), - switchTheme: SwitchThemeData( - thumbColor: - MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return const Color(0xffA5CAFF); - } - return null; - }), - trackColor: - MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return const Color(0xffA5CAFF); - } - return null; - }), - ), - radioTheme: RadioThemeData( - fillColor: - MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return const Color(0xffA5CAFF); - } - return null; - }), - ), - checkboxTheme: CheckboxThemeData( - fillColor: - MaterialStateProperty.resolveWith((Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return const Color(0xffA5CAFF); - } - return null; - }), - ), ); diff --git a/lib/ui/theme/dynamic_theme_builder.dart b/lib/ui/theme/dynamic_theme_builder.dart index 4c3076eb..65d74c2c 100644 --- a/lib/ui/theme/dynamic_theme_builder.dart +++ b/lib/ui/theme/dynamic_theme_builder.dart @@ -23,139 +23,29 @@ class DynamicThemeBuilder extends StatelessWidget { builder: (lightColorScheme, darkColorScheme) { final ThemeData lightDynamicTheme = ThemeData( useMaterial3: true, - canvasColor: lightColorScheme?.surface, navigationBarTheme: NavigationBarThemeData( - backgroundColor: lightColorScheme?.surface, - indicatorColor: lightColorScheme?.secondaryContainer, labelTextStyle: MaterialStateProperty.all( GoogleFonts.roboto( color: lightColorScheme?.onSurface, fontWeight: FontWeight.w500, ), ), - iconTheme: MaterialStateProperty.all( - IconThemeData( - color: lightColorScheme?.onSecondaryContainer, - ), - ), ), - scaffoldBackgroundColor: lightColorScheme?.surface, colorScheme: lightColorScheme?.harmonized(), textTheme: GoogleFonts.robotoTextTheme(ThemeData.light().textTheme), - switchTheme: SwitchThemeData( - thumbColor: MaterialStateProperty.resolveWith( - (Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return lightColorScheme?.primary; - } - return null; - }), - trackColor: MaterialStateProperty.resolveWith( - (Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return lightColorScheme?.primary; - } - return null; - }), - ), - radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.resolveWith( - (Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return lightColorScheme?.primary; - } - return null; - }), - ), - checkboxTheme: CheckboxThemeData( - fillColor: MaterialStateProperty.resolveWith( - (Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return lightColorScheme?.primary; - } - return null; - }), - ), ); final ThemeData darkDynamicTheme = ThemeData( useMaterial3: true, - canvasColor: darkColorScheme?.surface, navigationBarTheme: NavigationBarThemeData( - backgroundColor: darkColorScheme?.surface, - indicatorColor: darkColorScheme?.secondaryContainer, labelTextStyle: MaterialStateProperty.all( GoogleFonts.roboto( color: darkColorScheme?.onSurface, fontWeight: FontWeight.w500, ), ), - iconTheme: MaterialStateProperty.all( - IconThemeData( - color: darkColorScheme?.onSecondaryContainer, - ), - ), ), - scaffoldBackgroundColor: darkColorScheme?.surface, colorScheme: darkColorScheme?.harmonized(), textTheme: GoogleFonts.robotoTextTheme(ThemeData.dark().textTheme), - switchTheme: SwitchThemeData( - thumbColor: MaterialStateProperty.resolveWith( - (Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return darkColorScheme?.primary; - } - return null; - }), - trackColor: MaterialStateProperty.resolveWith( - (Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return darkColorScheme?.primary; - } - return null; - }), - ), - radioTheme: RadioThemeData( - fillColor: MaterialStateProperty.resolveWith( - (Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return darkColorScheme?.primary; - } - return null; - }), - ), - checkboxTheme: CheckboxThemeData( - fillColor: MaterialStateProperty.resolveWith( - (Set states) { - if (states.contains(MaterialState.disabled)) { - return null; - } - if (states.contains(MaterialState.selected)) { - return darkColorScheme?.primary; - } - return null; - }), - ), ); return DynamicTheme( themeCollection: ThemeCollection( diff --git a/lib/ui/views/home/home_view.dart b/lib/ui/views/home/home_view.dart index 6f09a647..4d067d5c 100644 --- a/lib/ui/views/home/home_view.dart +++ b/lib/ui/views/home/home_view.dart @@ -7,7 +7,6 @@ import 'package:revanced_manager/ui/views/home/home_viewmodel.dart'; import 'package:revanced_manager/ui/widgets/homeView/available_updates_card.dart'; import 'package:revanced_manager/ui/widgets/homeView/installed_apps_card.dart'; import 'package:revanced_manager/ui/widgets/homeView/latest_commit_card.dart'; -import 'package:revanced_manager/ui/widgets/shared/custom_chip.dart'; import 'package:revanced_manager/ui/widgets/shared/custom_sliver_app_bar.dart'; import 'package:stacked/stacked.dart'; @@ -22,8 +21,6 @@ class HomeView extends StatelessWidget { viewModelBuilder: () => locator(), builder: (context, model, child) => Scaffold( body: RefreshIndicator( - color: Theme.of(context).colorScheme.secondary, - backgroundColor: Theme.of(context).colorScheme.secondaryContainer, onRefresh: () => model.forceRefresh(context), child: CustomScrollView( slivers: [ @@ -67,21 +64,47 @@ class HomeView extends StatelessWidget { const SizedBox(height: 8), Row( children: [ - CustomChip( + ActionChip( + avatar: const Icon(Icons.grid_view), label: I18nText('homeView.installed'), - isSelected: !model.showUpdatableApps, - onSelected: (value) { + side: BorderSide( + color: model.showUpdatableApps + ? Theme.of(context).colorScheme.outline + : Theme.of(context) + .colorScheme + .secondaryContainer, + width: model.showUpdatableApps ? 1 : 1, + ), + backgroundColor: model.showUpdatableApps + ? Theme.of(context).colorScheme.background + : Theme.of(context) + .colorScheme + .secondaryContainer, + onPressed: () { model.toggleUpdatableApps(false); }, ), const SizedBox(width: 10), - CustomChip( + ActionChip( + avatar: const Icon(Icons.update), label: I18nText('homeView.updatesAvailable'), - isSelected: model.showUpdatableApps, - onSelected: (value) { + side: BorderSide( + color: !model.showUpdatableApps + ? Theme.of(context).colorScheme.outline + : Theme.of(context) + .colorScheme + .secondaryContainer, + width: !model.showUpdatableApps ? 1 : 1, + ), + backgroundColor: !model.showUpdatableApps + ? Theme.of(context).colorScheme.background + : Theme.of(context) + .colorScheme + .secondaryContainer, + onPressed: () { model.toggleUpdatableApps(true); }, - ) + ), ], ), const SizedBox(height: 14), diff --git a/lib/ui/views/navigation/navigation_view.dart b/lib/ui/views/navigation/navigation_view.dart index d8fdd5c6..2a78f933 100644 --- a/lib/ui/views/navigation/navigation_view.dart +++ b/lib/ui/views/navigation/navigation_view.dart @@ -42,7 +42,6 @@ class NavigationView extends StatelessWidget { context, 'navigationView.dashboardTab', ), - tooltip: '', ), NavigationDestination( icon: model.isIndexSelected(1) @@ -52,7 +51,6 @@ class NavigationView extends StatelessWidget { context, 'navigationView.patcherTab', ), - tooltip: '', ), NavigationDestination( icon: model.isIndexSelected(2) @@ -62,7 +60,6 @@ class NavigationView extends StatelessWidget { context, 'navigationView.settingsTab', ), - tooltip: '', ), ], ), diff --git a/lib/ui/views/patches_selector/patches_selector_view.dart b/lib/ui/views/patches_selector/patches_selector_view.dart index 280ae53e..91f75c9c 100644 --- a/lib/ui/views/patches_selector/patches_selector_view.dart +++ b/lib/ui/views/patches_selector/patches_selector_view.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_i18n/flutter_i18n.dart'; import 'package:revanced_manager/ui/views/patches_selector/patches_selector_viewmodel.dart'; import 'package:revanced_manager/ui/widgets/patchesSelectorView/patch_item.dart'; -import 'package:revanced_manager/ui/widgets/shared/custom_chip.dart'; import 'package:revanced_manager/ui/widgets/shared/custom_popup_menu.dart'; import 'package:revanced_manager/ui/widgets/shared/search_bar.dart'; import 'package:stacked/stacked.dart'; @@ -135,27 +134,36 @@ class _PatchesSelectorViewState extends State { children: [ Row( children: [ - CustomChip( - label: - I18nText('patchesSelectorView.recommended'), - onSelected: (value) { + ActionChip( + label: I18nText('patchesSelectorView.recommended'), + tooltip: FlutterI18n.translate( + context, + 'patchesSelectorView.recommendedTooltip', + ), + onPressed: () { model.selectRecommendedPatches(); }, ), const SizedBox(width: 8), - CustomChip( + ActionChip( label: I18nText('patchesSelectorView.all'), - onSelected: (value) { - if (value) { - model.selectAllPatcherWarning(context); - } + tooltip: FlutterI18n.translate( + context, + 'patchesSelectorView.allTooltip', + ), + onPressed: () { + model.selectAllPatcherWarning(context); model.selectAllPatches(true); }, ), const SizedBox(width: 8), - CustomChip( + ActionChip( label: I18nText('patchesSelectorView.none'), - onSelected: (value) { + tooltip: FlutterI18n.translate( + context, + 'patchesSelectorView.noneTooltip', + ), + onPressed: () { model.clearPatches(); }, ), diff --git a/lib/ui/views/settings/settingsFragment/settings_update_theme.dart b/lib/ui/views/settings/settingsFragment/settings_update_theme.dart index efc54042..684abc96 100644 --- a/lib/ui/views/settings/settingsFragment/settings_update_theme.dart +++ b/lib/ui/views/settings/settingsFragment/settings_update_theme.dart @@ -7,7 +7,6 @@ import 'package:flutter_i18n/widgets/I18nText.dart'; import 'package:revanced_manager/app/app.locator.dart'; import 'package:revanced_manager/services/manager_api.dart'; import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart'; -import 'package:revanced_manager/ui/widgets/settingsView/custom_switch_tile.dart'; import 'package:revanced_manager/ui/widgets/settingsView/settings_section.dart'; import 'package:stacked/stacked.dart'; @@ -64,8 +63,8 @@ class SUpdateThemeUI extends StatelessWidget { return SettingsSection( title: 'settingsView.appearanceSectionTitle', children: [ - CustomSwitchTile( - padding: const EdgeInsets.symmetric(horizontal: 20.0), + SwitchListTile( + contentPadding: const EdgeInsets.symmetric(horizontal: 20.0), title: I18nText( 'settingsView.darkThemeLabel', child: const Text( @@ -78,7 +77,7 @@ class SUpdateThemeUI extends StatelessWidget { ), subtitle: I18nText('settingsView.darkThemeHint'), value: SUpdateTheme().getDarkThemeStatus(), - onTap: (value) => SUpdateTheme().setUseDarkTheme( + onChanged: (value) => SUpdateTheme().setUseDarkTheme( context, value, ), @@ -88,8 +87,8 @@ class SUpdateThemeUI extends StatelessWidget { builder: (context, snapshot) => Visibility( visible: snapshot.hasData && snapshot.data! >= ANDROID_12_SDK_VERSION, - child: CustomSwitchTile( - padding: const EdgeInsets.symmetric(horizontal: 20.0), + child: SwitchListTile( + contentPadding: const EdgeInsets.symmetric(horizontal: 20.0), title: I18nText( 'settingsView.dynamicThemeLabel', child: const Text( @@ -102,11 +101,12 @@ class SUpdateThemeUI extends StatelessWidget { ), subtitle: I18nText('settingsView.dynamicThemeHint'), value: _settingViewModel.sUpdateTheme.getDynamicThemeStatus(), - onTap: (value) => - _settingViewModel.sUpdateTheme.setUseDynamicTheme( - context, - value, - ), + onChanged: (value) => { + _settingViewModel.sUpdateTheme.setUseDynamicTheme( + context, + value, + ), + }, ), ), ), diff --git a/lib/ui/widgets/settingsView/settings_experimental_patches.dart b/lib/ui/widgets/settingsView/settings_experimental_patches.dart index 964787a1..b5bf97db 100644 --- a/lib/ui/widgets/settingsView/settings_experimental_patches.dart +++ b/lib/ui/widgets/settingsView/settings_experimental_patches.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_i18n/widgets/I18nText.dart'; import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart'; -import 'package:revanced_manager/ui/widgets/settingsView/custom_switch_tile.dart'; class SExperimentalPatches extends StatefulWidget { const SExperimentalPatches({super.key}); @@ -15,8 +14,8 @@ final _settingsViewModel = SettingsViewModel(); class _SExperimentalPatchesState extends State { @override Widget build(BuildContext context) { - return CustomSwitchTile( - padding: const EdgeInsets.symmetric(horizontal: 20.0), + return SwitchListTile( + contentPadding: const EdgeInsets.symmetric(horizontal: 20.0), title: I18nText( 'settingsView.experimentalPatchesLabel', child: const Text( @@ -29,7 +28,7 @@ class _SExperimentalPatchesState extends State { ), subtitle: I18nText('settingsView.experimentalPatchesHint'), value: _settingsViewModel.areExperimentalPatchesEnabled(), - onTap: (value) { + onChanged: (value) { setState(() { _settingsViewModel.useExperimentalPatches(value); }); diff --git a/lib/ui/widgets/settingsView/settings_experimental_universal_patches.dart b/lib/ui/widgets/settingsView/settings_experimental_universal_patches.dart index c199259b..38e534fb 100644 --- a/lib/ui/widgets/settingsView/settings_experimental_universal_patches.dart +++ b/lib/ui/widgets/settingsView/settings_experimental_universal_patches.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_i18n/widgets/I18nText.dart'; import 'package:revanced_manager/ui/views/settings/settings_viewmodel.dart'; -import 'package:revanced_manager/ui/widgets/settingsView/custom_switch_tile.dart'; class SExperimentalUniversalPatches extends StatefulWidget { const SExperimentalUniversalPatches({super.key}); @@ -17,8 +16,8 @@ class _SExperimentalUniversalPatchesState extends State { @override Widget build(BuildContext context) { - return CustomSwitchTile( - padding: const EdgeInsets.symmetric(horizontal: 20.0), + return SwitchListTile( + contentPadding: const EdgeInsets.symmetric(horizontal: 20.0), title: I18nText( 'settingsView.experimentalUniversalPatchesLabel', child: const Text( @@ -31,7 +30,7 @@ class _SExperimentalUniversalPatchesState ), subtitle: I18nText('settingsView.experimentalUniversalPatchesHint'), value: _settingsViewModel.areUniversalPatchesEnabled(), - onTap: (value) { + onChanged: (value) { setState(() { _settingsViewModel.showUniversalPatches(value); });