Corrected some older comments and add the signature comment to the start of the Reset command

pull/592/head
pkorove 5 years ago
parent 6d676fcb78
commit 56282de6be

@ -33,7 +33,7 @@ import org.isoron.uhabits.core.ui.callbacks.*;
import butterknife.*;
/**
* Dialog that asks the user confirmation before executing a delete operation.
* Dialog that asks the user confirmation before executing a reset operation.
*/
@AutoFactory(allowSubclasses = true)
public class ConfirmResetDialog extends AlertDialog

@ -270,6 +270,18 @@ public class HabitCardListAdapter
for (Habit h : habits)
cache.remove(h.getId());
}
/**
* Resets a list of habits from the adapter.
* <p>
* Note that this only has effect on the adapter cache. The database is not
* modified, and the change is lost when the cache is refreshed. This method
* is useful for making the ListView more responsive: while we wait for the
* database operation to finish, the cache can be modified to reflect the
* changes immediately.
*
* @param habits list of habits to be reset
*/
@Override
public void performReset(List<Habit> habits)
{
@ -280,6 +292,7 @@ public class HabitCardListAdapter
h.getRepetitions().remove(rep);
}
}
/**
* Changes the order of habits on the adapter.
* <p>

@ -1,3 +1,22 @@
/*
* Copyright (C) 2016 Álinson Santos Xavier <isoron@gmail.com>
*
* This file is part of Loop Habit Tracker.
*
* Loop Habit Tracker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Loop Habit Tracker is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.isoron.uhabits.core.commands;
import androidx.annotation.NonNull;
@ -18,7 +37,7 @@ public class ResetHabitsCommand extends Command
@NonNull
final List<Habit> selected;
0
public ResetHabitsCommand(@NonNull HabitList habitList, @NonNull List<Habit> selected) {
this.habitList = habitList;
this.selected = new LinkedList<>(selected);

Loading…
Cancel
Save