Skip to content

Commit

Permalink
Merge pull request #86 from makeen-project/ALS-1702_broken_display_at…
Browse files Browse the repository at this point in the history
…tribution_main_forked

Broken display on attribution bug fix
  • Loading branch information
shah279 authored Oct 6, 2023
2 parents 0093b6a + cc5733a commit d378490
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import com.aws.amazonlocation.ui.main.web_view.WebViewActivity
import com.aws.amazonlocation.utils.KEY_MAP_NAME
import com.aws.amazonlocation.utils.KEY_URL
import com.aws.amazonlocation.utils.MAP_STYLE_ATTRIBUTION
import com.aws.amazonlocation.utils.attributionPattern

class AttributionFragment : BaseFragment() {

Expand Down Expand Up @@ -46,10 +47,12 @@ class AttributionFragment : BaseFragment() {

private fun init() {
mBinding.apply {
tvAttribution.text = mPreferenceManager.getValue(MAP_STYLE_ATTRIBUTION, getString(R.string.esri))
tvAttribution.text =
mPreferenceManager.getValue(MAP_STYLE_ATTRIBUTION, getString(R.string.esri))
?.replace(Regex(attributionPattern), "") ?: ""

}
}

private fun initClick() {
mBinding.apply {
btnLearnMoreSa.setOnClickListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3403,6 +3403,7 @@ class ExploreFragment :
mBinding.apply {
bottomSheetAttribution.apply {
tvAttribution.text = mPreferenceManager.getValue(MAP_STYLE_ATTRIBUTION, getString(R.string.esri))
?.replace(Regex(attributionPattern), "") ?: ""
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ val regionDisplayName = arrayListOf("Automatic", "Europe (Ireland) eu-west-1", "
* eg 2> "49.281174, -123.116823" > Check LAT_LNG_REG_EXP > return true
*/
const val LAT_LNG_REG_EXP = "([+-]?\\d+\\.?\\d+)\\s*,\\s*([+-]?\\d+\\.?\\d+)"
const val attributionPattern = "<a[^>]*>|</a>"

const val GEOFENCE_NAME_REG_EXP = "^[-._\\p{L}\\p{N}]+\$"
const val userPoolIdPattern = "[\\w-]+_[0-9a-zA-Z]+"
Expand Down

0 comments on commit d378490

Please sign in to comment.