Commit Graph

70 Commits

Author SHA1 Message Date
Arkadiusz Fal
e0ca48fd44 Improve tvOS settings UI styling and navigation
- Add TVOSPlainToggleStyle for cleaner toggle appearance on tvOS
- Remove focus overlays from settings navigation links and buttons
- Apply plain button and list styles across all settings screens
- Implement custom system controls picker for tvOS to avoid focus overlay
- Update SettingsPickerModifier with platform-specific styling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 18:14:35 +01:00
Arkadiusz Fal
f4d4daccd0 Optimize SwiftUI performance throughout the app
This commit addresses multiple SwiftUI performance bottlenecks identified
through code analysis, focusing on view rendering efficiency, list
performance, and memory usage optimization.

Key improvements:

- HomeView: Optimize async task management using structured concurrency
  with async let to handle multiple Defaults updates in a single task

- VideoCell: Remove GeometryReader from VideoCellThumbnail to eliminate
  layout thrashing; change @ObservedObject to computed property for shared
  ThumbnailsModel

- ThumbnailView: Cache URL extension computation in init() instead of
  recalculating on every body evaluation

- FavoriteItemView: Replace filter().prefix() with early-exit loop and
  capacity reservation for significant performance gain on large lists

- ContentItemView: Optimize FetchRequest creation with direct predicate
  construction only for video items, empty predicate for others

- VideoPlayerView: Fix playerSize didSet trigger by moving
  updateSidebarQueue() calls to explicit onChange/onAppear handlers

- FeedView: Replace .unique() with Set-based deduplication for O(n)
  performance and reduced allocations

- VerticalCells: Remove expensive sorting on every redraw; items should
  be pre-sorted from source

These optimizations follow SwiftUI best practices by minimizing expensive
computations in view bodies, caching computed values, using efficient data
structures, and avoiding unnecessary redraws and layout passes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 18:14:35 +01:00
Toni Förster
4663aab3da refactor Search
- have a separate body view for each os
- macOS: set navigation title for search
- macOS: set min width to 835 for main content
- macOS: set main window min height to 600
- macOS: don’t have text behind the cancel button
- split SearchTextField into macOS and iOS/tvOS
- iOS: move search menu to the right
- iOS: unified search field
- make min width a constant
- add option to disable search suggestions

Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-09-10 09:38:14 +02:00
Arkadiusz Fal
89dfbdb5c7 Fix swiftformat offenses 2024-07-06 11:48:49 +02:00
Toni Förster
94f19d55c8 more responsive UI when Favorites are used.
- The reloading of items in the favorite widgets is now done async, so it does not block the UI when opening Home.
- Tasks that check for changes of the widget and favorites are now terminated when another view e.g. Subscriptions is opened.
- We only update the Favourites when the player is not in the foreground, to avoid unresponsiveness.
2024-05-24 19:46:42 +02:00
Arkadiusz Fal
f28cec79ba Merge pull request #672 from stonerl/favorites-view-tweaks
HomeView: Changes to Favourites and History Widget
2024-05-18 11:41:57 +02:00
Toni Förster
38c4ddbe43 HomeView: Changes to Favourites and History Widget
The History Widget in the Home View was hard-coded to 10 items. Now it uses the limit set in the settings.

The items weren't immediate updated when the limit was changed.

List Views had a hard-coded limit of 10 items. Now they use the limit supplied in the parameter.
2024-05-18 00:36:40 +02:00
Toni Förster
e35f8b7892 Snappy UI - Offloading non UI task to background threads
This gives a huge increase in perceived performance. The UI is now much more responsive since some tasks are run in the background and don't block the UI anymore.
2024-05-17 21:36:02 +02:00
Arkadiusz Fal
7741e531f4 Swiftformat fixes 2024-05-16 19:01:02 +02:00
Arkadiusz Fal
2be6f04e37 Import export settings 2024-02-02 11:16:27 +01:00
Toni Förster
36ecf63b6c defaults move from .observe() to .updates()
https://github.com/sindresorhus/Defaults/releases/tag/v7.0.0
2023-12-27 17:27:24 +01:00
Arkadiusz Fal
44045b9e19 Don't observe favorites settings change 2023-07-24 19:45:31 +02:00
Arkadiusz Fal
91290d4736 Fix #486 2023-06-07 23:37:28 +02:00
Arkadiusz Fal
2c5eb18bc9 Fix crash 2023-06-07 23:37:27 +02:00
Arkadiusz Fal
56c2e552f7 Revert "Add loading status to vertical cells"
This reverts commit c6cff4dee4.
2023-06-07 23:37:27 +02:00
Arkadiusz Fal
5ee869c02c Fix lists padding in favorites 2023-06-07 23:37:27 +02:00
Arkadiusz Fal
c6cff4dee4 Add loading status to vertical cells 2023-05-29 16:42:19 +02:00
Arkadiusz Fal
713570dfd6 Fix navigatable in favorite item view 2023-05-29 16:13:13 +02:00
Arkadiusz Fal
b1637c5ef1 Fix buttons on tvOS 2023-05-29 16:13:12 +02:00
Arkadiusz Fal
0061bd8c20 Home Settings 2023-05-25 18:36:03 +02:00
Arkadiusz Fal
35867ba14a Home changes 2023-05-25 18:36:03 +02:00
Arkadiusz Fal
1e23809359 Improve history view performance 2023-05-25 18:36:03 +02:00
Arkadiusz Fal
d7a2564617 Localization fix 2023-05-21 19:13:42 +02:00
Arkadiusz Fal
1f0a2d25e9 Localization fix 2023-05-18 11:32:45 +02:00
Arkadiusz Fal
5c0cf7452c Remove unused code 2023-04-22 23:39:43 +02:00
Arkadiusz Fal
4851db4879 Fix loading channels data in Favorites 2023-03-12 22:52:54 +01:00
Arkadiusz Fal
f1e132a909 Add channel tabs and pagination
Fix #135
2023-02-28 21:04:42 +01:00
Arkadiusz Fal
cfd85a018e Fix Invidious channel videos 2023-02-06 21:42:16 +01:00
Arkadiusz Fal
a763e1d097 Fix Favorites performance 2023-02-05 14:24:17 +01:00
Arkadiusz Fal
c01ff56854 Watch next improvements, clear queue buttons 2023-02-05 14:24:16 +01:00
Arkadiusz Fal
a73ea78edf Fix button 2023-02-05 14:24:16 +01:00
Arkadiusz Fal
2ce903b6c3 Settings for new features 2023-02-05 14:24:14 +01:00
Arkadiusz Fal
bdb1f032a9 Home queue 2023-02-05 14:24:14 +01:00
Arkadiusz Fal
eca685ae29 Watch next view 2023-02-05 14:24:14 +01:00
Arkadiusz Fal
fcf527fa87 Player bar visibility modes and settings 2023-02-05 14:24:13 +01:00
Arkadiusz Fal
8e5bafba58 Documents navigation 2023-02-05 14:24:13 +01:00
Arkadiusz Fal
894b9bdcd7 Fix favorite subscriptions visibility 2023-02-05 14:24:13 +01:00
Arkadiusz Fal
f39b440b21 Refactor 2023-02-05 14:24:13 +01:00
Arkadiusz Fal
b8f693e213 Caching for favorites 2023-02-05 14:24:12 +01:00
Arkadiusz Fal
a9c8053474 Rename button 2023-02-05 14:24:12 +01:00
Arkadiusz Fal
cb6eaa180e Fix history view 2023-02-05 14:24:11 +01:00
Arkadiusz Fal
3b31f21c81 Channels caching 2023-02-05 14:24:11 +01:00
Arkadiusz Fal
1c746bc8e0 Use cache for loading player queue and history 2023-02-05 14:24:09 +01:00
Arkadiusz Fal
09ff16d464 Favorited playlists belong to account 2023-02-05 14:24:09 +01:00
Arkadiusz Fal
115f9fea67 Fix playlists in favorites 2023-02-05 14:24:09 +01:00
Arkadiusz Fal
d02bb23e57 New account selection menu 2023-02-05 14:24:09 +01:00
Arkadiusz Fal
899e66b204 Channel view and other small improvements 2023-02-05 14:24:08 +01:00
Arkadiusz Fal
f6a261662c Favorites improvements 2023-02-05 14:24:08 +01:00
Arkadiusz Fal
74d65f6ab8 Browser player bar as overlay 2023-02-05 14:24:07 +01:00
Arkadiusz Fal
971beddc8d Feed cache 2023-02-05 14:24:07 +01:00