Zettelkasten-Team / Zettelkasten

Zettelkasten-Developer-Builds
http://zettelkasten.danielluedecke.de
GNU General Public License v3.0
737 stars 94 forks source link

Prevent History Addition when Main Data is Not Loaded and Ensure Proper Display Interaction #528

Closed RalfBarkow closed 4 months ago

RalfBarkow commented 5 months ago

We need to update the History class to ensure that entries are not added to the history unless the main data is loaded and a Zettel is displayed. Additionally, the History class should interact with the Display class instead of directly with ZettelkastenView.

Tasks:

  1. Update the History class to:
    • Check if main data is loaded and a Zettel is displayed before adding to history.
    • Interact with the Display class for these checks.
  2. Ensure the Display class provides the necessary methods (isMainDataLoaded and getDisplayedZettel).
  3. Update CRC cards to reflect these changes.
  4. Write TestNG test cases to cover the new behavior:
    • Test adding to history when main data is not loaded.
    • Test adding to history when main data is loaded but no Zettel is displayed.
    • Test adding to history when both conditions are met.
    • Test avoiding duplicates in history.

Acceptance Criteria:

github-actions[bot] commented 4 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 4 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.