mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Update tests and fix formatting.
This commit is contained in:
@@ -119,7 +119,7 @@ class NumberButtonViewTest : BaseViewTest() {
|
||||
fun testClick_shortToggleDisabled() {
|
||||
prefs.isShortToggleEnabled = false
|
||||
view.performClick()
|
||||
assertFalse(edited)
|
||||
assertTrue(edited)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -61,7 +61,7 @@ class PerformanceTest : BaseAndroidTest() {
|
||||
val habit = fixtures.createEmptyHabit()
|
||||
for (i in 0..4999) {
|
||||
val timestamp: Timestamp = Timestamp(i * DAY_LENGTH)
|
||||
CreateRepetitionCommand(habitList, habit, timestamp, 1).run()
|
||||
CreateRepetitionCommand(habitList, habit, timestamp, 1, "").run()
|
||||
}
|
||||
db.setTransactionSuccessful()
|
||||
db.endTransaction()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package org.isoron.uhabits.activities.common.dialogs
|
||||
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE
|
||||
import android.widget.EditText
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import org.isoron.uhabits.R
|
||||
import org.isoron.uhabits.core.ui.screens.habits.list.ListHabitsBehavior
|
||||
import org.isoron.uhabits.inject.ActivityContext
|
||||
@@ -47,4 +47,4 @@ class CheckmarkDialog
|
||||
|
||||
return dialog
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@ import org.isoron.uhabits.inject.ActivityContext
|
||||
import org.isoron.uhabits.utils.InterfaceUtils.getDimension
|
||||
import org.isoron.uhabits.utils.dim
|
||||
import org.isoron.uhabits.utils.getFontAwesome
|
||||
import org.isoron.uhabits.utils.showMessage
|
||||
import org.isoron.uhabits.utils.sres
|
||||
import java.lang.Double.max
|
||||
import java.text.DecimalFormat
|
||||
@@ -219,7 +218,7 @@ class NumberButtonView(
|
||||
canvas.drawText(units, rect.centerX(), rect.centerY(), pUnit)
|
||||
}
|
||||
|
||||
if (hasNotes) {
|
||||
if (hasNotes) {
|
||||
val cy = 0.8f * em
|
||||
canvas.drawCircle(width.toFloat() - cy, cy, 8f, pNotesIndicator)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user