Merge branch 'master' into dev

This commit is contained in:
2021-05-09 17:24:50 -05:00
37 changed files with 44 additions and 73 deletions

View File

@@ -45,10 +45,24 @@ android {
testInstrumentationRunner("androidx.test.runner.AndroidJUnitRunner")
}
signingConfigs {
if (System.getenv("LOOP_KEY_ALIAS") != null) {
create("release") {
keyAlias = System.getenv("LOOP_KEY_ALIAS")
keyPassword = System.getenv("LOOP_KEY_PASSWORD")
storeFile = file(System.getenv("LOOP_KEY_STORE"))
storePassword = System.getenv("LOOP_STORE_PASSWORD")
}
}
}
buildTypes {
getByName("release") {
minifyEnabled(true)
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.txt")
if (signingConfigs.findByName("release") != null) {
signingConfig = signingConfigs.getByName("release")
}
}
getByName("debug") {

View File

@@ -37,6 +37,7 @@ import org.isoron.uhabits.inject.HabitsApplicationComponent
import org.isoron.uhabits.utils.InterfaceUtils.getDimension
import org.isoron.uhabits.utils.PaletteUtils.getAndroidTestColor
import org.isoron.uhabits.utils.StyledResources
import kotlin.math.max
import kotlin.math.min
class CheckmarkWidgetView : HabitWidgetView {
@@ -95,7 +96,7 @@ class CheckmarkWidgetView : HabitWidgetView {
private val text: String
get() = if (isNumerical) {
(entryValue / 1000.0).toShortString()
(max(0, entryValue) / 1000.0).toShortString()
} else when (entryState) {
YES_MANUAL, YES_AUTO -> resources.getString(R.string.fa_check)
SKIP -> resources.getString(R.string.fa_skipped)
@@ -130,7 +131,11 @@ class CheckmarkWidgetView : HabitWidgetView {
val maxTextSize = getDimension(context, R.dimen.smallerTextSize)
textSize = min(textSize, maxTextSize)
label.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize)
ring.setTextSize(textSize)
if (isNumerical) {
ring.setTextSize(textSize * 0.75f)
} else {
ring.setTextSize(textSize)
}
ring.setThickness(0.15f * textSize)
super.onMeasure(newWidthMeasureSpec, newHeightMeasureSpec)
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

@@ -1,3 +1,10 @@
1.8.12:
* Fix bug that caused incorrect check marks to show after scrolling
* Fix issue preventing widgets from updating at midnight
2.0:
* Track numeric habits (e.g. how many pages did you read?)
* Skip days without breaking your streak
* Show question marks for days with missing data
* Extend day a few hours past midnight
* Show multiple habits in a single widget
* Export daily backups automatically
* Sort habits by status and in reverse
* Add notes to habits
* Improve theme and accessibility