more code cleanup

pull/499/head
thomas 6 years ago
parent 216dfd9024
commit 645a74a8a3

@ -175,9 +175,7 @@
<receiver android:name=".receivers.WidgetReceiver">
<intent-filter>
<category android:name="android.intent.category.DEFAULT"/>
<action android:name="org.isoron.uhabits.ACTION_SET_NUMERICAL_VALUE"/>
<data
android:host="org.isoron.uhabits"
android:scheme="content"/>

@ -36,8 +36,6 @@ class NumberPickerFactory
@Inject constructor(
@ActivityContext private val context: Context
) {
fun create(value: Double,
unit: String,
callback: ListHabitsBehavior.NumberPickerCallback): AlertDialog {

@ -46,7 +46,6 @@ class ListHabitsMenu @Inject constructor(
hideArchivedItem.isChecked = !preferences.showArchived
hideCompletedItem.isChecked = !preferences.showCompleted
topBarMenu = menu
//the habit creation menu should be disabled when numeric habits are also disabled
if (!preferences.isNumericalHabitsFeatureEnabled) {

@ -83,9 +83,6 @@ class WidgetReceiver : BroadcastReceiver() {
}
@ReceiverScope
@Component(dependencies = [HabitsApplicationComponent::class])
internal interface WidgetComponent {

@ -36,7 +36,6 @@ open class CheckmarkWidget(
return pendingIntentFactory.toggleCheckmark(habit, null)
}
override fun refreshData(v: View) {
(v as CheckmarkWidgetView).apply {
setPercentage(habit.scores.todayValue.toFloat())
@ -45,11 +44,8 @@ open class CheckmarkWidget(
setCheckmarkValue(habit.checkmarks.todayValue)
refresh()
}
}
override fun buildView(): View = CheckmarkWidgetView(context)
override fun getDefaultHeight() = 125
override fun getDefaultWidth() = 125

@ -16,7 +16,6 @@ import org.isoron.uhabits.intents.IntentParser
import org.isoron.uhabits.intents.PendingIntentFactory
import org.isoron.uhabits.widgets.WidgetUpdater
class NumericalCheckmarkWidgetActivity : Activity() {
private lateinit var behavior : NumericalCheckmarkWidgetBehavior
@ -36,7 +35,6 @@ class NumericalCheckmarkWidgetActivity : Activity() {
showNumberSelector(this)
}
class CallBackReceiver : ListHabitsBehavior.NumberPickerCallback{
private val activity : NumericalCheckmarkWidgetActivity
@ -68,5 +66,4 @@ class NumericalCheckmarkWidgetActivity : Activity() {
companion object{
const val ACTION_SHOW_NUMERICAL_VALUE_ACTIVITY = "org.isoron.uhabits.ACTION_SHOW_NUMERICAL_VALUE_ACTIVITY"
}
}

@ -62,7 +62,6 @@ public class CreateRepetitionCommand extends Command
reps.add(newRep);
habit.invalidateNewerThan(timestamp);
}
@NonNull

@ -206,7 +206,7 @@ public class Preferences
public boolean isDeveloper()
{
return true;//return storage.getBoolean("pref_developer", false);
return storage.getBoolean("pref_developer", false);
}
public void setDeveloper(boolean isDeveloper)

Loading…
Cancel
Save