Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Purge undo, cleanup #90

Merged
merged 7 commits into from
Oct 27, 2021

Conversation

koh-jx
Copy link

@koh-jx koh-jx commented Oct 26, 2021

undo Purge

  • Restores all tasks in their correct order there were in, as well as set filters back to previously selected filters.

Noted bugs

Tasks with the same name were not added due to the equality of tasks affecting indexOf(). This is fixed with Jeff's merged PR bug fix.

Refactor Purge

As previously mentioned in the purge PR, the Model#deleteFilteredTasks method has been refactored to not take in an arbitrary List<Task> and assume that it is the Filtered task list. This is because PurgeTaskCommand no longer provides its own list but just calls this method.

Cleanup undo

  • Removed now unnecessary code in various commands.
  • Add that filter does not count as a command that can be undone in the undo UG,

@koh-jx koh-jx requested a review from yeppog October 26, 2021 15:48
@koh-jx koh-jx added priority.Medium type.Enhancement An enhancement to an existing story labels Oct 26, 2021
@codecov-commenter
Copy link

codecov-commenter commented Oct 26, 2021

Codecov Report

Merging #90 (907fff1) into master (e753d27) will decrease coverage by 0.37%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #90      +/-   ##
============================================
- Coverage     61.98%   61.60%   -0.38%     
  Complexity      535      535              
============================================
  Files           107      107              
  Lines          2057     2068      +11     
  Branches        198      201       +3     
============================================
- Hits           1275     1274       -1     
- Misses          713      725      +12     
  Partials         69       69              
Impacted Files Coverage Δ
...ava/seedu/address/logic/commands/ClearCommand.java 54.54% <0.00%> (+8.39%) ⬆️
...java/seedu/address/logic/commands/FindCommand.java 73.33% <ø> (+2.74%) ⬆️
...address/logic/commands/task/DeleteTaskCommand.java 63.15% <ø> (+3.15%) ⬆️
...u/address/logic/commands/task/DoneTaskCommand.java 80.95% <ø> (+3.67%) ⬆️
...u/address/logic/commands/task/EditTaskCommand.java 79.74% <ø> (+0.99%) ⬆️
.../address/logic/commands/task/PurgeTaskCommand.java 0.00% <0.00%> (ø)
src/main/java/seedu/address/model/Model.java 100.00% <ø> (ø)
...rc/main/java/seedu/address/model/ModelManager.java 84.29% <0.00%> (-2.15%) ⬇️
src/main/java/seedu/address/model/TaskList.java 72.00% <0.00%> (-3.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e753d27...907fff1. Read the comment docs.

Copy link

@wlren wlren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wlren wlren merged commit efbbdba into AY2122S1-CS2103-F09-2:master Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority.Medium type.Enhancement An enhancement to an existing story
Projects
None yet
3 participants