mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-16 19:05:27 -04:00
#2301 rate dialog now shows text instead of numbers
This commit is contained in:
parent
85b0facb54
commit
f82da5e62d
@ -659,7 +659,7 @@ public abstract class CoreReaderFragment extends BaseFragment
|
||||
}
|
||||
|
||||
private void showRateDialog() {
|
||||
alertDialogShower.show(new KiwixDialog.ShowRate(getIconResId()),
|
||||
alertDialogShower.show(new KiwixDialog.ShowRate(getIconResId(), requireActivity()),
|
||||
() -> {
|
||||
visitCounterPref.setNoThanksState(true);
|
||||
goToRateApp();
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
package org.kiwix.kiwixmobile.core.utils
|
||||
|
||||
import android.app.Activity
|
||||
import android.net.wifi.WifiConfiguration
|
||||
import android.view.View
|
||||
import org.kiwix.kiwixmobile.core.R
|
||||
@ -127,7 +128,8 @@ sealed class KiwixDialog(
|
||||
neutralMessage = R.string.do_not_ask_anymore
|
||||
)
|
||||
|
||||
data class ShowRate(override val args: List<Any>, val customIcon: Int?) : KiwixDialog(
|
||||
data class ShowRate(override val args: List<Any>, val customIcon: Int?) :
|
||||
KiwixDialog(
|
||||
R.string.rate_dialog_title,
|
||||
R.string.triple_arg_format_string,
|
||||
R.string.rate_dialog_positive,
|
||||
@ -136,8 +138,12 @@ sealed class KiwixDialog(
|
||||
neutralMessage = R.string.rate_dialog_neutral
|
||||
),
|
||||
HasBodyFormatArgs {
|
||||
constructor(icon: Int?) : this(
|
||||
listOf(R.string.rate_dialog_msg_1, R.string.app_name, R.string.rate_dialog_msg_2),
|
||||
constructor(icon: Int?, activity: Activity) : this(
|
||||
listOf(
|
||||
activity.getString(R.string.rate_dialog_msg_1),
|
||||
activity.getString(R.string.app_name),
|
||||
activity.getString(R.string.rate_dialog_msg_2)
|
||||
),
|
||||
icon
|
||||
)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user