Fix tingu tingu bugs
This commit is contained in:
@@ -27,7 +27,7 @@ import androidx.annotation.RequiresApi
|
|||||||
import com.aurora.store.R
|
import com.aurora.store.R
|
||||||
import com.aurora.store.databinding.ViewDevInfoBinding
|
import com.aurora.store.databinding.ViewDevInfoBinding
|
||||||
|
|
||||||
class ViewDevInfo : RelativeLayout {
|
class DevInfoLayout : RelativeLayout {
|
||||||
|
|
||||||
private lateinit var B: ViewDevInfoBinding
|
private lateinit var B: ViewDevInfoBinding
|
||||||
|
|
||||||
@@ -19,10 +19,7 @@
|
|||||||
|
|
||||||
package com.aurora.store.view.ui.details
|
package com.aurora.store.view.ui.details
|
||||||
|
|
||||||
import android.content.Intent
|
|
||||||
import android.os.Build
|
|
||||||
import android.text.Html
|
import android.text.Html
|
||||||
import android.text.Layout
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.RelativeLayout
|
import android.widget.RelativeLayout
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
@@ -30,7 +27,6 @@ import androidx.core.content.ContextCompat
|
|||||||
import androidx.core.text.HtmlCompat
|
import androidx.core.text.HtmlCompat
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import com.airbnb.epoxy.EpoxyRecyclerView
|
import com.airbnb.epoxy.EpoxyRecyclerView
|
||||||
import com.aurora.Constants
|
|
||||||
import com.aurora.extensions.hide
|
import com.aurora.extensions.hide
|
||||||
import com.aurora.extensions.load
|
import com.aurora.extensions.load
|
||||||
import com.aurora.extensions.show
|
import com.aurora.extensions.show
|
||||||
@@ -76,12 +72,10 @@ abstract class BaseDetailsActivity : BaseActivity() {
|
|||||||
B.txtRating.text = app.labeledRating
|
B.txtRating.text = app.labeledRating
|
||||||
B.txtSdk.text = ("Target SDK ${app.targetSdk}")
|
B.txtSdk.text = ("Target SDK ${app.targetSdk}")
|
||||||
B.txtUpdated.text = app.updatedOn
|
B.txtUpdated.text = app.updatedOn
|
||||||
|
B.txtDescription.text = HtmlCompat.fromHtml(
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
app.shortDescription,
|
||||||
B.txtDescription.justificationMode = Layout.JUSTIFICATION_MODE_INTER_WORD
|
HtmlCompat.FROM_HTML_OPTION_USE_CSS_COLORS
|
||||||
}
|
)
|
||||||
|
|
||||||
B.txtDescription.text = Html.fromHtml(app.shortDescription)
|
|
||||||
|
|
||||||
app.changes.apply {
|
app.changes.apply {
|
||||||
if (isEmpty()) {
|
if (isEmpty()) {
|
||||||
@@ -236,7 +230,7 @@ abstract class BaseDetailsActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (app.developerEmail.isNotEmpty()) {
|
if (app.developerEmail.isNotEmpty()) {
|
||||||
B.devWeb.apply {
|
B.devMail.apply {
|
||||||
setTxtSubtitle(app.developerEmail)
|
setTxtSubtitle(app.developerEmail)
|
||||||
visibility = View.VISIBLE
|
visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
@@ -360,20 +354,7 @@ abstract class BaseDetailsActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Helpers
|
/* App Review Helpers */
|
||||||
|
|
||||||
open fun getIntentPackageName(intent: Intent): String? {
|
|
||||||
if (intent.hasExtra(Constants.STRING_EXTRA)) {
|
|
||||||
return intent.getStringExtra(Constants.STRING_EXTRA)
|
|
||||||
} else if (intent.scheme != null && (intent.scheme == "market" || intent.scheme == "http" || intent.scheme == "https")
|
|
||||||
) {
|
|
||||||
return intent.data!!.getQueryParameter("id")
|
|
||||||
} else if (intent.extras != null) {
|
|
||||||
val bundle = intent.extras
|
|
||||||
return bundle!!.getString(Constants.STRING_EXTRA)
|
|
||||||
}
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun addAvgReviews(number: Int, max: Long, rating: Long): RelativeLayout {
|
private fun addAvgReviews(number: Int, max: Long, rating: Long): RelativeLayout {
|
||||||
return RatingView(this, number, max.toInt(), rating.toInt())
|
return RatingView(this, number, max.toInt(), rating.toInt())
|
||||||
@@ -415,7 +396,7 @@ abstract class BaseDetailsActivity : BaseActivity() {
|
|||||||
return reviewsHelper.getReviews(app.packageName, Review.Filter.CRITICAL)
|
return reviewsHelper.getReviews(app.packageName, Review.Filter.CRITICAL)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*---------------------------------- HELPERS FOR APP PRIVACY ---------------------------------*/
|
/* App Privacy Helpers */
|
||||||
|
|
||||||
private fun parseResponse(response: String, packageName: String): List<Report> {
|
private fun parseResponse(response: String, packageName: String): List<Report> {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:headerTitle="@string/details_dev_details" />
|
app:headerTitle="@string/details_dev_details" />
|
||||||
|
|
||||||
<com.aurora.store.view.custom.layouts.ViewDevInfo
|
<com.aurora.store.view.custom.layouts.DevInfoLayout
|
||||||
android:id="@+id/dev_web"
|
android:id="@+id/dev_web"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
app:txtTitle="@string/details_dev_website"
|
app:txtTitle="@string/details_dev_website"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<com.aurora.store.view.custom.layouts.ViewDevInfo
|
<com.aurora.store.view.custom.layouts.DevInfoLayout
|
||||||
android:id="@+id/dev_mail"
|
android:id="@+id/dev_mail"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
app:txtTitle="@string/details_dev_email"
|
app:txtTitle="@string/details_dev_email"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<com.aurora.store.view.custom.layouts.ViewDevInfo
|
<com.aurora.store.view.custom.layouts.DevInfoLayout
|
||||||
android:id="@+id/dev_address"
|
android:id="@+id/dev_address"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|||||||
Reference in New Issue
Block a user