|
|
|
|
@ -20,7 +20,6 @@ import net.pokeranalytics.android.ui.adapter.StaticRowRepresentableDataSource |
|
|
|
|
import net.pokeranalytics.android.ui.fragment.components.PokerAnalyticsFragment |
|
|
|
|
import net.pokeranalytics.android.ui.view.RowRepresentable |
|
|
|
|
import net.pokeranalytics.android.ui.view.rowrepresentable.SettingRow |
|
|
|
|
import net.pokeranalytics.android.util.LocaleUtils |
|
|
|
|
import net.pokeranalytics.android.util.Preferences |
|
|
|
|
import net.pokeranalytics.android.util.URL |
|
|
|
|
import net.pokeranalytics.android.util.extensions.openContactMail |
|
|
|
|
@ -57,7 +56,6 @@ class SettingsFragment : PokerAnalyticsFragment(), RowRepresentableDelegate, Sta |
|
|
|
|
override fun stringForRow(row: RowRepresentable): String { |
|
|
|
|
return when (row) { |
|
|
|
|
SettingRow.VERSION -> BuildConfig.VERSION_NAME + if (BuildConfig.DEBUG) " DEBUG" else "" |
|
|
|
|
SettingRow.LANGUAGE -> LocaleUtils.getCurrentLocale(requireContext()).displayLanguage |
|
|
|
|
SettingRow.CURRENCY -> Currency.getInstance(Preferences.getCurrencyLocale(this.parentActivity)).symbol |
|
|
|
|
else -> "" |
|
|
|
|
} |
|
|
|
|
@ -94,10 +92,6 @@ class SettingsFragment : PokerAnalyticsFragment(), RowRepresentableDelegate, Sta |
|
|
|
|
SettingRow.RATE_APP -> parentActivity.openPlayStorePage() |
|
|
|
|
SettingRow.CONTACT_US -> parentActivity.openContactMail(R.string.contact) |
|
|
|
|
SettingRow.BUG_REPORT -> parentActivity.openContactMail(R.string.bug_report_subject) |
|
|
|
|
SettingRow.LANGUAGE -> { |
|
|
|
|
LocaleUtils.setCurrentLocale(requireContext(), "fr") |
|
|
|
|
activity?.recreate() |
|
|
|
|
} |
|
|
|
|
SettingRow.CURRENCY -> CurrenciesActivity.newInstanceForResult(this@SettingsFragment, SettingsFragment.REQUEST_CODE_CURRENCY) |
|
|
|
|
SettingRow.FOLLOW_US -> { |
|
|
|
|
when (position) { |
|
|
|
|
|