File tree Expand file tree Collapse file tree
owncloud/android/ui/fragment/community Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ package com.nextcloud.utils
99import com.owncloud.android.BuildConfig
1010
1111object BuildHelper {
12- const val GPLAY : String = " gplay"
12+ fun isFlavourGPlay (): Boolean = BuildConfig . FLAVOR = = " gplay"
1313
14- fun isFlavourGPlay (): Boolean = GPLAY == BuildConfig . FLAVOR
14+ fun isHuaweiFlavor (): Boolean = BuildConfig . FLAVOR == " huawei "
1515}
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import android.view.LayoutInflater
1313import android.view.View
1414import android.view.ViewGroup
1515import androidx.fragment.app.Fragment
16+ import com.nextcloud.utils.BuildHelper
1617import com.nextcloud.utils.extensions.setHtmlContent
1718import com.owncloud.android.R
1819import com.owncloud.android.databinding.FragmentCommunityBinding
@@ -38,6 +39,9 @@ class CommunityFragment : Fragment() {
3839 binding?.communityReleaseCandidateText?.movementMethod = LinkMovementMethod .getInstance()
3940 setupViews()
4041 setOnClickListeners()
42+ if (BuildHelper .isHuaweiFlavor()) {
43+ hideRCSection()
44+ }
4145 }
4246
4347 private fun setupViews () {
@@ -100,6 +104,15 @@ class CommunityFragment : Fragment() {
100104 }
101105 }
102106
107+ private fun hideRCSection () {
108+ binding?.run {
109+ communityReleaseCandidateHeadline.visibility = View .GONE
110+ communityReleaseCandidateText.visibility = View .GONE
111+ communityReleaseCandidateFdroid.visibility = View .GONE
112+ communityReleaseCandidatePlaystore.visibility = View .GONE
113+ }
114+ }
115+
103116 override fun onDestroyView () {
104117 super .onDestroyView()
105118 binding = null
You can’t perform that action at this time.
0 commit comments