manually reverted unneeded changes

pull/499/head
Thomas S 5 years ago
parent 20bb8c3024
commit 2f81825ae1

@ -18,8 +18,7 @@
~ with this program. If not, see <http://www.gnu.org/licenses/>. ~ with this program. If not, see <http://www.gnu.org/licenses/>.
--> -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.isoron.uhabits" package="org.isoron.uhabits">
>
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

@ -23,9 +23,7 @@ import android.content.*
class CheckmarkWidgetProvider : BaseWidgetProvider() { class CheckmarkWidgetProvider : BaseWidgetProvider() {
override fun getWidgetFromId(context: Context, id: Int): BaseWidget { override fun getWidgetFromId(context: Context, id: Int): BaseWidget {
val habits = getHabitsFromWidgetId(id) val habits = getHabitsFromWidgetId(id)
return if (habits.size == 1) { if (habits.size == 1) return CheckmarkWidget(context, id, habits[0])
CheckmarkWidget(context, id, habits[0]) else return StackWidget(context, id, StackWidgetType.CHECKMARK, habits)
}
else StackWidget(context, id, StackWidgetType.CHECKMARK, habits)
} }
} }

@ -61,7 +61,9 @@ public class ListHabitsMenuBehavior
updateAdapterFilter(); updateAdapterFilter();
} }
public void onCreateHabit() { screen.showSelectHabitTypeDialog(); } public void onCreateHabit() {
screen.showSelectHabitTypeDialog();
}
public void onViewFAQ() public void onViewFAQ()
{ {

@ -79,13 +79,13 @@ public class WidgetBehavior
private void performToggle(@NonNull Habit habit, Timestamp timestamp) private void performToggle(@NonNull Habit habit, Timestamp timestamp)
{ {
getCommandRunner().execute( commandRunner.execute(
new ToggleRepetitionCommand(getHabitList(), habit, timestamp), new ToggleRepetitionCommand(habitList, habit, timestamp),
habit.getId()); habit.getId());
} }
public void setNumericValue(@NonNull Habit habit, Timestamp timestamp, int newValue) { public void setNumericValue(@NonNull Habit habit, Timestamp timestamp, int newValue) {
getCommandRunner().execute( commandRunner.execute(
new CreateRepetitionCommand(habit, timestamp, newValue), new CreateRepetitionCommand(habit, timestamp, newValue),
habit.getId()); habit.getId());
} }

Loading…
Cancel
Save