Skip to content

Refactor — Extract TaskRepository #10

Open

Description

@andersabjorn

Move all Preferences logic out of MainPage.xaml.cs into a dedicated TaskRepository class. Also store the date a task was saved, laying the groundwork for daily reset (v1.2).

New file: TaskRepository.cs

  • GetTaskText(), GetTaskDate(), Save(string), Clear(), IsFromPreviousDay()

Update MainPage.xaml.cs:

  • Replace all Preferences.Get/Set/Remove calls with _repo calls

Verification: App behaviour is identical — add, complete, delete flow unchanged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions