add the toggle for sleep preventing in release notes

This commit is contained in:
tibbi 2018-02-27 20:49:08 +01:00
parent 8e221da298
commit 060f966f07
2 changed files with 16 additions and 0 deletions

View File

@ -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<Release>().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))

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Release notes -->
<string name="release_18">Added a toggle for preventing the phone from sleeping, enabled by default</string>
</resources>