Some changes in about section, fix links
This commit is contained in:
committed by
Koitharu
parent
253f4abba1
commit
eb5976a796
@@ -187,6 +187,7 @@ class AppSettings private constructor(private val prefs: SharedPreferences) :
|
||||
const val KEY_APP_UPDATE = "app_update"
|
||||
const val KEY_APP_UPDATE_AUTO = "app_update_auto"
|
||||
const val KEY_APP_TRANSLATION = "about_app_translation"
|
||||
const val KEY_APP_GRATITUDES = "about_gratitudes"
|
||||
const val KEY_FEEDBACK_4PDA = "about_feedback_4pda"
|
||||
const val KEY_FEEDBACK_GITHUB = "about_feedback_github"
|
||||
const val KEY_SUPPORT_DEVELOPER = "about_support_developer"
|
||||
|
||||
@@ -50,16 +50,22 @@ class AboutSettingsFragment : BasePreferenceFragment(R.string.about) {
|
||||
}
|
||||
AppSettings.KEY_FEEDBACK_GITHUB -> {
|
||||
startActivity(context?.let { BrowserActivity.newIntent(it,
|
||||
"https://4pda.to/forum/index.php?showtopic=697669",
|
||||
resources.getString(R.string.about_feedback_4pda)) })
|
||||
"https://github.com/nv95/Kotatsu/issues",
|
||||
"GitHub") })
|
||||
true
|
||||
}
|
||||
AppSettings.KEY_SUPPORT_DEVELOPER -> {
|
||||
startActivity(context?.let { BrowserActivity.newIntent(it,
|
||||
"https://4pda.to/forum/index.php?showtopic=697669",
|
||||
"https://yoomoney.ru/to/410012543938752",
|
||||
resources.getString(R.string.about_support_developer)) })
|
||||
true
|
||||
}
|
||||
AppSettings.KEY_APP_GRATITUDES -> {
|
||||
startActivity(context?.let { BrowserActivity.newIntent(it,
|
||||
"https://github.com/nv95/Kotatsu/graphs/contributors",
|
||||
resources.getString(R.string.about_gratitudes)) })
|
||||
true
|
||||
}
|
||||
else -> super.onPreferenceTreeClick(preference)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
package org.koitharu.kotatsu.settings.about
|
||||
|
||||
import android.os.Bundle
|
||||
import android.text.SpannableStringBuilder
|
||||
import android.text.method.LinkMovementMethod
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.graphics.Insets
|
||||
import androidx.core.text.HtmlCompat
|
||||
import androidx.core.text.parseAsHtml
|
||||
import androidx.core.view.updatePadding
|
||||
import org.koitharu.kotatsu.R
|
||||
import org.koitharu.kotatsu.base.ui.BaseFragment
|
||||
import org.koitharu.kotatsu.databinding.FragmentGratitudesBinding
|
||||
|
||||
class GratitudesFragment : BaseFragment<FragmentGratitudesBinding>() {
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
binding.textView.apply {
|
||||
text =
|
||||
SpannableStringBuilder(resources.openRawResource(R.raw.gratitudes).bufferedReader()
|
||||
.readText()
|
||||
.parseAsHtml(HtmlCompat.FROM_HTML_SEPARATOR_LINE_BREAK_LIST))
|
||||
movementMethod = LinkMovementMethod.getInstance()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onInflateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?
|
||||
) = FragmentGratitudesBinding.inflate(inflater, container, false)
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
activity?.setTitle(R.string.about_gratitudes)
|
||||
}
|
||||
|
||||
override fun onWindowInsetsChanged(insets: Insets) = Unit
|
||||
|
||||
}
|
||||
@@ -9,12 +9,11 @@ import android.view.ViewGroup
|
||||
import androidx.core.graphics.Insets
|
||||
import androidx.core.text.HtmlCompat
|
||||
import androidx.core.text.parseAsHtml
|
||||
import androidx.core.view.updatePadding
|
||||
import org.koitharu.kotatsu.R
|
||||
import org.koitharu.kotatsu.base.ui.BaseFragment
|
||||
import org.koitharu.kotatsu.databinding.FragmentCopyrightBinding
|
||||
|
||||
class CopyrightFragment : BaseFragment<FragmentCopyrightBinding>() {
|
||||
class LicenseFragment : BaseFragment<FragmentCopyrightBinding>() {
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
@@ -34,7 +33,7 @@ class CopyrightFragment : BaseFragment<FragmentCopyrightBinding>() {
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
activity?.setTitle(R.string.about_copyright)
|
||||
activity?.setTitle(R.string.about_license)
|
||||
}
|
||||
|
||||
override fun onWindowInsetsChanged(insets: Insets) = Unit
|
||||
Reference in New Issue
Block a user