Added button to open FAQ from settings.

This commit is contained in:
Koen 2023-10-20 14:43:01 +02:00
parent 576b37f64c
commit da0ac281e2

View file

@ -6,6 +6,7 @@ import android.content.Intent
import android.net.Uri
import android.os.Build
import android.webkit.CookieManager
import androidx.core.content.ContextCompat.startActivity
import androidx.lifecycle.lifecycleScope
import com.futo.platformplayer.activities.*
import com.futo.platformplayer.api.http.ManagedHttpClient
@ -44,7 +45,7 @@ class Settings : FragmentedStorageFileJson() {
@FormField(
"Manage Polycentric identity", FieldForm.BUTTON,
"Manage your Polycentric identity", -2
"Manage your Polycentric identity", -3
)
fun managePolycentricIdentity() {
SettingsActivity.getActivity()?.let {
@ -56,6 +57,19 @@ class Settings : FragmentedStorageFileJson() {
}
}
@FormField(
"Open FAQ", FieldForm.BUTTON,
"Get answers to common questions", -2
)
fun openFAQ() {
try {
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse("https://grayjay.app/faq.html"))
SettingsActivity.getActivity()?.startActivity(browserIntent);
} catch (e: Throwable) {
//Ignored
}
}
@FormField(
"Submit feedback", FieldForm.BUTTON,
"Give feedback on the application", -1