diff --git a/app/src/main/kotlin/com/simplemobiletools/calculator/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calculator/activities/MainActivity.kt index c5f168e5..098bf613 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calculator/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calculator/activities/MainActivity.kt @@ -18,6 +18,7 @@ import com.simplemobiletools.commons.helpers.LICENSE_ESPRESSO import com.simplemobiletools.commons.helpers.LICENSE_KOTLIN import com.simplemobiletools.commons.helpers.LICENSE_ROBOLECTRIC import com.simplemobiletools.commons.models.FAQItem +import com.simplemobiletools.commons.models.Release import kotlinx.android.synthetic.main.activity_main.* import me.grantland.widget.AutofitHelper @@ -58,6 +59,7 @@ class MainActivity : SimpleActivity(), Calculator { AutofitHelper.create(formula) storeStateVariables() updateViewColors(calculator_holder, config.textColor) + checkWhatsNewDialog() } override fun onResume() { @@ -147,6 +149,13 @@ class MainActivity : SimpleActivity(), Calculator { result.text = value } + private fun checkWhatsNewDialog() { + arrayListOf().apply { + add(Release(18, R.string.release_18)) + checkWhatsNew(this, BuildConfig.VERSION_CODE) + } + } + // used only by Robolectric override fun setValueDouble(d: Double) { calc.setValue(Formatter.doubleToString(d)) diff --git a/app/src/main/res/values/donottranslate.xml b/app/src/main/res/values/donottranslate.xml new file mode 100644 index 00000000..17078ecb --- /dev/null +++ b/app/src/main/res/values/donottranslate.xml @@ -0,0 +1,7 @@ + + + + + Added a toggle for preventing the phone from sleeping, enabled by default + +