Skip to content

Commit

Permalink
Add default topsite 58 for MozillaOnline builds
Browse files Browse the repository at this point in the history
  • Loading branch information
rxumoz authored and mergify[bot] committed Sep 16, 2021
1 parent 4e846b3 commit e6395bf
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/src/main/java/org/mozilla/fenix/components/Core.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
Binary file added app/src/main/res/drawable/ic_tc.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions app/src/main/res/values-zh-rCN/mozonline_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
<string name="default_top_site_jd">京东</string>
<!-- Default title for pinned JD top site that links to PDD home page -->
<string name="default_top_site_pdd">拼多多</string>
<!-- Default title for pinned 58 top site that links to 58 home page -->
<string name="default_top_site_tc">58同城</string>

<!-- FxA server switch-->
<!-- Switch Preference for domestic China/global fxa server -->
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/mozonline_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
<string name="default_top_site_jd">JD</string>
<!-- Default title for pinned JD top site that links to PDD home page -->
<string name="default_top_site_pdd">PDD</string>
<!-- Default title for pinned 58 top site that links to 58 home page -->
<string name="default_top_site_tc">58</string>

<!-- FxA server switch-->
<!-- Switch Preference for domestic China/global fxa server -->
Expand Down

0 comments on commit e6395bf

Please sign in to comment.