bidluo / Lemur

WIP Lemmy Client for iOS. Built for iOS 17
GNU General Public License v3.0
7 stars 0 forks source link

SwiftData #6

Open bidluo opened 1 year ago

bidluo commented 1 year ago

Objective

Provide a seamless user experience in both online and offline situations. Users should be able to read posts and their associated comments even in the absence of internet connectivity. Additionally, provide users the ability to define the duration of offline data retention for each post.

User Stories

As a user, I want to:

  1. Be able to read posts and associated comments in offline mode which I have previously accessed.
  2. Define the duration for which a post and its comments should be stored offline (options: 5m, 30m, 1h, 12h, 1w, always).
  3. Manually refresh data if I wish.

Acceptance Criteria

  1. When a user accesses a post and its comments while online, the data should be stored locally for offline access.
  2. If a user specifies the offline retention period for a post, the app should respect this setting.
  3. The app should automatically delete posts and their associated comments that are past their defined offline retention period.
  4. If the user opens a post while offline, the app should display the locally stored version if available.
  5. A user should be able to manually refresh the data of a post.

Out of Scope

  1. Offline creation of new posts or comments.
  2. Offline updates or edits to existing posts or comments.
  3. Conflict resolution for outdated local data.
  4. Offline liking or other interactive activities.
  5. Storing comments that haven’t been loaded yet (no preload)
bidluo commented 1 year ago

Initial implementation completed, needs more refinement as there’s a a bit of instability currently. Mainly around objects seemingly created on different contexts. Currently relationships are made in the init of the parent object which probably isn’t correct and relationships need to be made before creating the parent. On top of that, there’s UI issues that need solving as going from local to remote causes a flicker