forked from github/wulkanowy-mirror
Add twitter page link to about fragment (#1411)
This commit is contained in:
@ -93,6 +93,15 @@ class AboutFragment : BaseFragment<FragmentAboutBinding>(R.layout.fragment_about
|
||||
)
|
||||
}
|
||||
|
||||
override val twitterRes: Triple<String, String, Drawable?>?
|
||||
get() = context?.run {
|
||||
Triple(
|
||||
getString(R.string.about_twitter),
|
||||
getString(R.string.about_twitter_summary),
|
||||
getCompatDrawable(R.drawable.ic_about_twitter)
|
||||
)
|
||||
}
|
||||
|
||||
override val homepageRes: Triple<String, String, Drawable?>?
|
||||
get() = context?.run {
|
||||
Triple(
|
||||
@ -164,6 +173,10 @@ class AboutFragment : BaseFragment<FragmentAboutBinding>(R.layout.fragment_about
|
||||
context?.openInternetBrowser("https://www.facebook.com/wulkanowy", ::showMessage)
|
||||
}
|
||||
|
||||
override fun openTwitterPage() {
|
||||
context?.openInternetBrowser("https://twitter.com/wulkanowy", ::showMessage)
|
||||
}
|
||||
|
||||
override fun openHomepage() {
|
||||
context?.openInternetBrowser("https://wulkanowy.github.io/", ::showMessage)
|
||||
}
|
||||
|
@ -51,6 +51,11 @@ class AboutPresenter @Inject constructor(
|
||||
openFacebookPage()
|
||||
analytics.logEvent("about_open", "name" to "facebook")
|
||||
}
|
||||
twitterRes?.first -> {
|
||||
Timber.i("Opening twitter")
|
||||
openTwitterPage()
|
||||
analytics.logEvent("about_open", "name" to "twitter")
|
||||
}
|
||||
homepageRes?.first -> {
|
||||
Timber.i("Opening homepage")
|
||||
openHomepage()
|
||||
@ -84,6 +89,7 @@ class AboutPresenter @Inject constructor(
|
||||
faqRes,
|
||||
discordRes,
|
||||
facebookRes,
|
||||
twitterRes,
|
||||
homepageRes,
|
||||
licensesRes,
|
||||
privacyRes
|
||||
|
@ -15,6 +15,8 @@ interface AboutView : BaseView {
|
||||
|
||||
val discordRes: Triple<String, String, Drawable?>?
|
||||
|
||||
val twitterRes: Triple<String, String, Drawable?>?
|
||||
|
||||
val facebookRes: Triple<String, String, Drawable?>?
|
||||
|
||||
val homepageRes: Triple<String, String, Drawable?>?
|
||||
@ -35,6 +37,8 @@ interface AboutView : BaseView {
|
||||
|
||||
fun openFacebookPage()
|
||||
|
||||
fun openTwitterPage()
|
||||
|
||||
fun openEmailClient()
|
||||
|
||||
fun openFaqPage()
|
||||
|
Reference in New Issue
Block a user