From e78754d598808cadeae224b07fd0394e6adb51ea Mon Sep 17 00:00:00 2001 From: rxu Date: Thu, 16 Sep 2021 15:50:59 +0800 Subject: [PATCH] [fenix] Add default topsite 58 for MozillaOnline builds --- .../java/org/mozilla/fenix/components/Core.kt | 7 +++++++ .../topsites/TopSiteItemViewHolder.kt | 3 +++ .../org/mozilla/fenix/settings/SupportUtils.kt | 1 + app/src/main/res/drawable/ic_tc.png | Bin 0 -> 3026 bytes .../main/res/values-zh-rCN/mozonline_strings.xml | 2 ++ app/src/main/res/values/mozonline_strings.xml | 2 ++ 6 files changed, 15 insertions(+) create mode 100644 app/src/main/res/drawable/ic_tc.png diff --git a/app/src/main/java/org/mozilla/fenix/components/Core.kt b/app/src/main/java/org/mozilla/fenix/components/Core.kt index fdb72a39ef..1606b4c54c 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Core.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Core.kt @@ -354,6 +354,13 @@ class Core( SupportUtils.PDD_URL ) ) + + defaultTopSites.add( + Pair( + context.getString(R.string.default_top_site_tc), + SupportUtils.TC_URL + ) + ) } else { defaultTopSites.add( Pair( diff --git a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/topsites/TopSiteItemViewHolder.kt b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/topsites/TopSiteItemViewHolder.kt index 1477f84222..d4ade4c27e 100644 --- a/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/topsites/TopSiteItemViewHolder.kt +++ b/app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/topsites/TopSiteItemViewHolder.kt @@ -85,6 +85,9 @@ class TopSiteItemViewHolder( SupportUtils.PDD_URL -> { binding.faviconImage.setImageDrawable(getDrawable(itemView.context, R.drawable.ic_pdd)) } + SupportUtils.TC_URL -> { + binding.faviconImage.setImageDrawable(getDrawable(itemView.context, R.drawable.ic_tc)) + } else -> { itemView.context.components.core.icons.loadIntoView(binding.faviconImage, topSite.url) } diff --git a/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt b/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt index 58c9893529..7fffad4984 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt @@ -34,6 +34,7 @@ object SupportUtils { "AEwdRGF0cMhIAVB5ZFAETBVAaXRwyFQdcKydLSUpaCEtYFAIXN2UrWCUyIgdVK1slXVZaCCtZFAMWDg%3D%3D" const val PDD_URL = "https://mobile.yangkeduo.com/duo_cms_mall.html?pid=13289095_194240604&" + "cpsSign=CM_210309_13289095_194240604_8bcfd56d5db3c43d983014d2658ec26e&duoduo_type=2" + const val TC_URL = "https://jumpluna.58.com/i/29HU" const val GOOGLE_US_URL = "https://www.google.com/webhp?client=firefox-b-1-m&channel=ts" const val GOOGLE_XX_URL = "https://www.google.com/webhp?client=firefox-b-m&channel=ts" diff --git a/app/src/main/res/drawable/ic_tc.png b/app/src/main/res/drawable/ic_tc.png new file mode 100644 index 0000000000000000000000000000000000000000..0ef692f297115dead06bf2d3a4b9a2ffad9060f1 GIT binary patch literal 3026 zcmV;@3oZ1CP)`#-J_iE?0NLuV6xjv#0NbbldjCH~CIkPMHbK2V zJ@S@|L{k@9jI0Gmfh*_~RQYpP(n+G}2~R{;g>QkMl7sd{I>KuZ3VoorokHOaa0C+A zL89cT61D$QqJCMAKYSnXQ?|jDNFCe)ehO|u7!Ws>DC;eWI_F6gy2bdx3xF%hgz_Rc z09S&prA;L&2$m>#k3_w_@C1qUmz5ZO~^TO;g=+y&k3 zJWsv`wTitYDt!T0JBbg!k8fs4-DC!P*EA#qaYHxw2)J$WLY~VJW=~{1kWlQcp(|eA zk6rfG;&C64o`3@mF#`AgU82AOtjNP5+sh0V1tf&#AQC^vt!zaTR`^oiEZom26FEv| zTZ8P0Og$(0(v270iIq+1zS@OK++66MyQ}d&E9w(FH^yxRo>S7VUS0@%7%q;gGvXv_ z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Nt zV}5g!HebK~yhTyuauVZl_)0MrWQ=Q^@ZoZ(Z5v0`g(FhB>)K}b5wLLK}`$R zcvH+;Z~8t_O{KF{;yK|tm<=rB7pO+lBa>+^LPtlY*XtCqUZ)7p-q|EPXJ?P_jQ8H0 zwvLps1>_uUjFfZ5Qlu)jfa${@c=`K7nB!}dH&8N=4UwiM0LvIiv&SaV^s&h_Vq6-H zn~+8=A~GS1CcnFsLZ+;x=7s`t(b*IkW+_q~kI2a5JYw8T=7hTZhhAlAkRO2Tk2KmT z6PZadz>>$2a+e0GW2&oq1=2aZigq>Aqu6y`&u0hzmx z$cyo6idmLC1O4KBl1ux!bs8=Gdlu z+u&?I#8e=2f53yeD#~8gl0HfGB%DVHCw*&?18j+`1#@5@?1d>nb_xZ4GIB4|kRv>F zVl;DnJ-+_rf#(AtbHBq4MBR*bqdN$^g`ZaqRwDoWe0NnwiIptm zglXZ-2^LQw%Yn)b1#$bDb?=oEc|#1h5!i|kZ46uvESMj7n#{@PYNHSEm$P1GjxDj7vZwQh1{h zB1;?SjB1<${4LSrCv}q*eW4t(7aHQaB0e&>P4MB7deB z{Uk(IH~((+ti-^VfGkAHdInse6Lf*j&|L0)BGRCrY$;Oc3|F3F+-cAN$wb)Xzd=B5jS@;Ehg|l!BcEfD&1G2@x07+;I U@f京东 拼多多 + + 58同城 diff --git a/app/src/main/res/values/mozonline_strings.xml b/app/src/main/res/values/mozonline_strings.xml index a9b52aba1e..290794d1e3 100644 --- a/app/src/main/res/values/mozonline_strings.xml +++ b/app/src/main/res/values/mozonline_strings.xml @@ -27,6 +27,8 @@ JD PDD + + 58