Skip to content

refactor services and improve logging and friends display - #11

Merged
bretth18 merged 4 commits into
mainfrom
b/cleanup-dead
Jul 16, 2026
Merged

refactor services and improve logging and friends display#11
bretth18 merged 4 commits into
mainfrom
b/cleanup-dead

Conversation

@bretth18

@bretth18 bretth18 commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Description

This PR makes several significant changes to the project structure and the Friends filtering feature. The most impactful updates are the removal of the unused Custom Scrobbler (Bluesky) service, the introduction of a grouped Services folder in the Xcode project, and the implementation of a more flexible and efficient Friends filter. Additionally, some legacy or unused code and preferences have been cleaned up for maintainability.

Project structure and service cleanup:

  • Removed all references to CustomScrobblingService.swift and BlueskyOAuthManager.swift from the project, including source files, build phases, and file groups, reflecting the discontinuation of the Bluesky/Custom Scrobbler integration. [1] [2] [3] [4] [5]
  • Introduced a new Services group in the Xcode project to organize related service files such as Scrobbler.swift, ScrobblingService.swift, LastFmManager.swift, LastFmManagerDesktop.swift, and NowPlayingFetcher.swift. [1] [2]

Friends filter improvements:

  • Refactored the Friends model to always fetch a full page of friends (up to 50) and introduced an allFriends property to back the filter picker, allowing for efficient filtering and display updates without additional network requests. [1] [2]
  • Added logic to filter the displayed friends based on user selection or a default count, and optimized recent track loading to only fetch data for friends that are newly displayed.

Preferences and legacy code cleanup:

  • Removed obsolete user preferences and properties related to the discontinued Custom Scrobbler/Bluesky integration, and ensured these keys are cleaned from UserDefaults during initialization. [1] [2]
  • Added a new selectedFriends property in PreferencesManager to persist the user's filter selection for friends.

Other codebase improvements:

  • Removed the unused password property from both PreferencesManager and LastFmDesktopManager, simplifying their interfaces and constructors. [1] [2] [3]

These changes improve the maintainability of the codebase, streamline the project structure, and enhance the user experience when filtering friends.

How to test

  • ensure all checks pass

Author checklist

This PR:

  • Satisfies a goal that is specific & clearly motivated
  • Adds value in isolation (whether user-facing or sustainability-related)
  • Contains a concise & easy-to-understand title + description
  • Adheres to SRP by default
  • Presents the best possible implementation to meet its goal, given constraints at hand

@bretth18 bretth18 self-assigned this Jul 16, 2026
@bretth18
bretth18 merged commit f1c7a88 into main Jul 16, 2026
2 checks passed
@bretth18
bretth18 deleted the b/cleanup-dead branch July 16, 2026 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant