Improve about page
This commit is contained in:
@@ -28,6 +28,7 @@ import com.airbnb.epoxy.ModelView
|
||||
import com.aurora.store.R
|
||||
import com.aurora.store.data.model.Link
|
||||
import com.aurora.store.databinding.ViewLinkBinding
|
||||
import com.aurora.store.util.extensions.hide
|
||||
import com.aurora.store.util.extensions.load
|
||||
import com.aurora.store.util.extensions.show
|
||||
import com.aurora.store.view.epoxy.views.BaseView
|
||||
@@ -65,12 +66,14 @@ class LinkView : RelativeLayout {
|
||||
fun link(link: Link) {
|
||||
B.line1.text = link.title
|
||||
B.line2.text = link.subtitle
|
||||
if (!link.url.startsWith("http")) {
|
||||
B.line3.show()
|
||||
B.line3.text = link.url
|
||||
|
||||
if (link.url.startsWith("http") || link.url.startsWith("upi")) {
|
||||
B.line3.hide()
|
||||
} else {
|
||||
B.line3.show()
|
||||
B.line3.text = link.url
|
||||
}
|
||||
|
||||
B.imgIcon.load(link.icon)
|
||||
}
|
||||
|
||||
|
||||
@@ -120,9 +120,10 @@ class AboutActivity : BaseActivity() {
|
||||
}
|
||||
|
||||
private fun processUrl(url: String) {
|
||||
if (url.startsWith("http"))
|
||||
browse(url)
|
||||
else
|
||||
copyToClipBoard(url)
|
||||
when {
|
||||
url.startsWith("http") -> browse(url)
|
||||
url.startsWith("upi") -> browse(url)
|
||||
else -> copyToClipBoard(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -123,7 +123,7 @@
|
||||
<item>"bc1qu7cy9fepjj309y4r2x3rymve7mw4ff39c8cpe0"</item>
|
||||
<item>"qpqus3qdlz8guf476vwz0fjl8s34fseukcmrl6eknl"</item>
|
||||
<item>"0x6977446933EC8b5964D921f7377950992337B1C6"</item>
|
||||
<item>"whyorean@dbs"</item>
|
||||
<item>"upi://pay?pa=whyorean@dbs&pn=whyorean&tn=AuroraOSS"</item>
|
||||
<item>"https://paypal.me/AuroraDev"</item>
|
||||
<item>"https://liberapay.com/on/gitlab/whyorean/ "</item>
|
||||
<item>"https://gitlab.com/AuroraOSS/AuroraStore"</item>
|
||||
|
||||
@@ -34,6 +34,6 @@
|
||||
app:entryValues="@array/pref_accent_values"
|
||||
app:iconSpaceReserved="false"
|
||||
app:key="PREFERENCE_THEME_ACCENT"
|
||||
app:title="@string/pref_ui_theme_title"
|
||||
app:title="@string/pref_ui_accent_title"
|
||||
app:useSimpleSummaryProvider="true" />
|
||||
</androidx.preference.PreferenceScreen>
|
||||
|
||||
Reference in New Issue
Block a user