mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-17 03:16: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() {
|
private void showRateDialog() {
|
||||||
alertDialogShower.show(new KiwixDialog.ShowRate(getIconResId()),
|
alertDialogShower.show(new KiwixDialog.ShowRate(getIconResId(), requireActivity()),
|
||||||
() -> {
|
() -> {
|
||||||
visitCounterPref.setNoThanksState(true);
|
visitCounterPref.setNoThanksState(true);
|
||||||
goToRateApp();
|
goToRateApp();
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package org.kiwix.kiwixmobile.core.utils
|
package org.kiwix.kiwixmobile.core.utils
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
import android.net.wifi.WifiConfiguration
|
import android.net.wifi.WifiConfiguration
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import org.kiwix.kiwixmobile.core.R
|
import org.kiwix.kiwixmobile.core.R
|
||||||
@ -127,17 +128,22 @@ sealed class KiwixDialog(
|
|||||||
neutralMessage = R.string.do_not_ask_anymore
|
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?) :
|
||||||
R.string.rate_dialog_title,
|
KiwixDialog(
|
||||||
R.string.triple_arg_format_string,
|
R.string.rate_dialog_title,
|
||||||
R.string.rate_dialog_positive,
|
R.string.triple_arg_format_string,
|
||||||
R.string.no_thanks,
|
R.string.rate_dialog_positive,
|
||||||
icon = customIcon,
|
R.string.no_thanks,
|
||||||
neutralMessage = R.string.rate_dialog_neutral
|
icon = customIcon,
|
||||||
),
|
neutralMessage = R.string.rate_dialog_neutral
|
||||||
|
),
|
||||||
HasBodyFormatArgs {
|
HasBodyFormatArgs {
|
||||||
constructor(icon: Int?) : this(
|
constructor(icon: Int?, activity: Activity) : this(
|
||||||
listOf(R.string.rate_dialog_msg_1, R.string.app_name, R.string.rate_dialog_msg_2),
|
listOf(
|
||||||
|
activity.getString(R.string.rate_dialog_msg_1),
|
||||||
|
activity.getString(R.string.app_name),
|
||||||
|
activity.getString(R.string.rate_dialog_msg_2)
|
||||||
|
),
|
||||||
icon
|
icon
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user