diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutFragment.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutFragment.kt index 46dc5cfe..22276bdf 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutFragment.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutFragment.kt @@ -47,6 +47,11 @@ class AboutFragment : BaseFragment(), AboutView, MainView.TitledView { Triple(getString(R.string.about_feedback), getString(R.string.about_feedback_summary), getCompatDrawable(R.drawable.ic_about_feedback)) } + override val faqRes: Triple? + get() = context?.run { + Triple(getString(R.string.about_faq), getString(R.string.about_faq_summary), getCompatDrawable(R.drawable.ic_about_faq)) + } + override val discordRes: Triple? get() = context?.run { Triple(getString(R.string.about_discord), getString(R.string.about_discord_summary), getCompatDrawable(R.drawable.ic_about_discord)) @@ -130,6 +135,10 @@ class AboutFragment : BaseFragment(), AboutView, MainView.TitledView { } } + override fun openFaqPage() { + context?.openInternetBrowser("https://wulkanowy.github.io/czesto-zadawane-pytania", ::showMessage) + } + override fun openLicenses() { (activity as? MainActivity)?.pushView(LicenseFragment.newInstance()) } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutPresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutPresenter.kt index 5303d361..8087c955 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutPresenter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutPresenter.kt @@ -28,10 +28,15 @@ class AboutPresenter @Inject constructor( view?.run { when (item.title) { feedbackRes?.first -> { - Timber.i("Opening email client ") + Timber.i("Opening email client") openEmailClient() analytics.logEvent("about_open", "name" to "feedback") } + faqRes?.first -> { + Timber.i("Opening faq page") + openFaqPage() + analytics.logEvent("about_open", "name" to "faq") + } discordRes?.first -> { Timber.i("Opening discord") openDiscordInvite() @@ -61,6 +66,7 @@ class AboutPresenter @Inject constructor( updateData(AboutScrollableHeader(), listOfNotNull( versionRes?.let { (title, summary, image) -> AboutItem(title, summary, image) }, feedbackRes?.let { (title, summary, image) -> AboutItem(title, summary, image) }, + faqRes?.let { (title, summary, image) -> AboutItem(title, summary, image) }, discordRes?.let { (title, summary, image) -> AboutItem(title, summary, image) }, homepageRes?.let { (title, summary, image) -> AboutItem(title, summary, image) }, licensesRes?.let { (title, summary, image) -> AboutItem(title, summary, image) }, diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutView.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutView.kt index 318a75e4..34850bae 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutView.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/about/AboutView.kt @@ -9,6 +9,8 @@ interface AboutView : BaseView { val feedbackRes: Triple? + val faqRes: Triple? + val discordRes: Triple? val homepageRes: Triple? @@ -25,6 +27,8 @@ interface AboutView : BaseView { fun openEmailClient() + fun openFaqPage() + fun openHomepage() fun openLicenses() diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/login/form/LoginFormFragment.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/login/form/LoginFormFragment.kt index 8c7b52ea..a3e70489 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/login/form/LoginFormFragment.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/login/form/LoginFormFragment.kt @@ -62,7 +62,7 @@ class LoginFormFragment : BaseFragment(), LoginFormView { loginFormHost.setOnItemClickListener { _, _, _, _ -> presenter.onHostSelected() } loginFormSignIn.setOnClickListener { presenter.onSignInClick() } loginFormPrivacyLink.setOnClickListener { presenter.onPrivacyLinkClick() } - loginFormContactDiscord.setOnClickListener { presenter.onDiscordClick() } + loginFormFaq.setOnClickListener { presenter.onFaqClick() } loginFormContactEmail.setOnClickListener { presenter.onEmailClick() } loginFormPass.setOnEditorActionListener { _, id, _ -> @@ -161,8 +161,8 @@ class LoginFormFragment : BaseFragment(), LoginFormView { presenter.onDetachView() } - override fun openDiscordInvite() { - context?.openInternetBrowser("https://discord.gg/vccAQBr", ::showMessage) + override fun openFaqPage() { + context?.openInternetBrowser("https://wulkanowy.github.io/czesto-zadawane-pytania/dlaczego-nie-moge-sie-zalogowac", ::showMessage) } override fun openEmail() { diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/login/form/LoginFormPresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/login/form/LoginFormPresenter.kt index bdab1dad..10c0a663 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/login/form/LoginFormPresenter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/login/form/LoginFormPresenter.kt @@ -91,8 +91,8 @@ class LoginFormPresenter @Inject constructor( })) } - fun onDiscordClick() { - view?.openDiscordInvite() + fun onFaqClick() { + view?.openFaqPage() } fun onEmailClick() { diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/login/form/LoginFormView.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/login/form/LoginFormView.kt index 7eec9477..91e8d86e 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/login/form/LoginFormView.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/login/form/LoginFormView.kt @@ -45,7 +45,7 @@ interface LoginFormView : BaseView { fun showContact(show: Boolean) - fun openDiscordInvite() + fun openFaqPage() fun openEmail() } diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolFragment.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolFragment.kt index b7ae39a7..5e9ce3ba 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolFragment.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolFragment.kt @@ -50,7 +50,7 @@ class LoginSymbolFragment : BaseFragment(), LoginSymbolView { override fun initView() { loginSymbolSignIn.setOnClickListener { presenter.attemptLogin(loginSymbolName.text.toString()) } - loginSymbolContactDiscord.setOnClickListener { presenter.onDiscordClick() } + loginSymbolFaq.setOnClickListener { presenter.onFaqClick() } loginSymbolContactEmail.setOnClickListener { presenter.onEmailClick() } loginSymbolName.doOnTextChanged { _, _, _, _ -> presenter.onSymbolTextChanged() } @@ -126,8 +126,8 @@ class LoginSymbolFragment : BaseFragment(), LoginSymbolView { presenter.onDetachView() } - override fun openDiscordInvite() { - context?.openInternetBrowser("https://discord.gg/vccAQBr", ::showMessage) + override fun openFaqPage() { + context?.openInternetBrowser("https://wulkanowy.github.io/czesto-zadawane-pytania/co-to-jest-symbol", ::showMessage) } override fun openEmail() { diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolPresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolPresenter.kt index 8e4dd3b0..49aabc92 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolPresenter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolPresenter.kt @@ -89,8 +89,8 @@ class LoginSymbolPresenter @Inject constructor( } } - fun onDiscordClick() { - view?.openDiscordInvite() + fun onFaqClick() { + view?.openFaqPage() } fun onEmailClick() { diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolView.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolView.kt index 9b5340cf..1afc1532 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolView.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/login/symbol/LoginSymbolView.kt @@ -29,7 +29,7 @@ interface LoginSymbolView : BaseView { fun showContact(show: Boolean) - fun openDiscordInvite() + fun openFaqPage() fun openEmail() } diff --git a/app/src/main/res/drawable/ic_about_faq.xml b/app/src/main/res/drawable/ic_about_faq.xml new file mode 100644 index 00000000..d6ab255b --- /dev/null +++ b/app/src/main/res/drawable/ic_about_faq.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/fragment_login_form.xml b/app/src/main/res/layout/fragment_login_form.xml index 29943515..9f7f01e0 100644 --- a/app/src/main/res/layout/fragment_login_form.xml +++ b/app/src/main/res/layout/fragment_login_form.xml @@ -2,7 +2,8 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + tools:context=".ui.modules.login.form.LoginFormFragment"> + android:text="@string/about_faq" + app:icon="@drawable/ic_about_faq" /> + android:layout_height="match_parent" + tools:context=".ui.modules.login.symbol.LoginSymbolFragment"> + android:layout_marginRight="16dp" + android:orientation="horizontal"> + + android:layout_marginLeft="8dp" + android:layout_weight="1" + android:text="@string/about_faq" + app:icon="@drawable/ic_about_faq" /> Wersja aplikacji Zgłoś błąd Wyślij zgłoszenie o błędzie poprzez e-maila + FAQ + Zobacz Najczęściej Zadawane Pytania Serwer discord Dołącz do społeczności wulkanowego Polityka prywatności diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9673355e..13bdfc79 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -240,6 +240,8 @@ App version Report a bug Send a bug report via e-mail + FAQ + Read Frequently Asked Questions Discord server Join the wulkanowy community Privacy policy