Skip to content

Commit

Permalink
Merge pull request #221 from chrisjohntan/fix-cattag-ui
Browse files Browse the repository at this point in the history
Fix cattag not updating person list in the UI
  • Loading branch information
yooplo authored Nov 4, 2024
2 parents 8f1b646 + cc7832b commit 638fb7f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public CommandResult execute(Model model) throws CommandException {
throw new CommandException(String.format(MESSAGE_DUPLICATE_CATEGORY, targetTag, updatedCategory));
}
model.setTagsCategory(targetTag, updatedCategory);
model.refreshCampusConnect();
return new CommandResult(String.format(MESSAGE_CAT_TAG_SUCCESS, targetTag));
}

Expand Down
5 changes: 5 additions & 0 deletions src/main/java/seedu/address/model/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public interface Model {
/** Returns the CampusConnect */
ReadOnlyCampusConnect getCampusConnect();

/**
* Refreshes the current data in CampusConnect.
*/
void refreshCampusConnect();

/**
* Returns true if a person with the same identity as {@code person} exists in the address book.
*/
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/seedu/address/model/ModelManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ public ReadOnlyCampusConnect getCampusConnect() {
return campusConnect;
}

@Override
public void refreshCampusConnect() {
this.setCampusConnect(campusConnect);
}

@Override
public boolean hasPerson(Person person) {
requireNonNull(person);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ public ReadOnlyCampusConnect getCampusConnect() {
throw new AssertionError("This method should not be called.");
}

@Override
public void refreshCampusConnect() {
throw new AssertionError("This method should not be called.");
}

@Override
public boolean hasPerson(Person person) {
throw new AssertionError("This method should not be called.");
Expand Down

0 comments on commit 638fb7f

Please sign in to comment.