Commit Graph

143 Commits

Author SHA1 Message Date
Arkadiusz Fal
be4e1adb9b Fix all SwiftLint violations across codebase
Resolves 130+ violations including deployment target checks, code style issues, and formatting inconsistencies. Adds SwiftLint disable comments for compiler-required availability checks while maintaining deployment target compliance.

🤖 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
Toni Förster
35534bcbb1 Improved thumbnail handling
- ThumbnailsModel optionally returns the quality
- Have constants for 4:3 and 16:9 aspect ratio
- Add high quality options for thumbnails
- Rename Highest quality to Best quality
- make 4:3 thumbnails fill the VideoCell
- use .maxes instead of .maxresdefault (the latter sometimes returns white images)

Signed-off-by: Toni Förster <toni.foerster@gmail.com>
2024-08-19 16:35:29 +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
Arkadiusz Fal
94915b0496 Revert "Drop iOS 14 and macOS 11 support"
This reverts commit dcef7f47ff.
2023-10-15 13:35:23 +02:00
Arkadiusz Fal
12a8582e89 Fix style issues, remove unused code 2023-09-23 17:14:21 +02:00
Arkadiusz Fal
3c9e04d243 Channels performance improvements
Add settings:
Show channel avatars in channels lists
Show channel avatars in videos lists

Fix #508
2023-07-24 19:45:30 +02:00
Arkadiusz Fal
dcef7f47ff Drop iOS 14 and macOS 11 support 2023-07-24 19:45:30 +02:00
Arkadiusz Fal
e827b97cd5 Fix lint issues 2023-07-24 19:45:30 +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
c6cff4dee4 Add loading status to vertical cells 2023-05-29 16:42:19 +02:00
Arkadiusz Fal
eaeaa45422 Fix #479 2023-05-29 16:42:19 +02:00
Arkadiusz Fal
0061bd8c20 Home Settings 2023-05-25 18:36:03 +02:00
Arkadiusz Fal
eed9330c0c Add buttons for hiding watched videos
Fix #448
2023-05-25 18:36:02 +02:00
Arkadiusz Fal
ac7dad2ab8 Fix #450 2023-05-25 18:36:02 +02:00
Arkadiusz Fal
0dee8310ce Fix #468 2023-05-25 18:36:02 +02:00
Arkadiusz Fal
d5f8e35430 Fix channel videos horizontal layout 2023-05-21 19:13:42 +02:00
Arkadiusz Fal
5c0cf7452c Remove unused code 2023-04-22 23:39:43 +02:00
Arkadiusz Fal
83dfdd6c0e tvOS filters for all views
Vertical list for trending, popular, playlists, search

Fix #413, #415
2023-04-22 23:39:43 +02:00
Arkadiusz Fal
2fe211edb4 Add setting for toggle video watch status 2023-04-22 23:39:43 +02:00
Arkadiusz Fal
8ef016d792 Minor performance improvement 2023-04-22 23:10:27 +02:00
Arkadiusz Fal
48d14c623c Fix build issue 2023-02-19 14:19:37 +01:00
Arkadiusz Fal
71a3d54201 Always use WebImage with Piped 2023-02-05 14:24:17 +01:00
Arkadiusz Fal
5de52e55f6 Fix banner content shape 2023-02-05 14:24:16 +01:00
Arkadiusz Fal
52f96c3837 Fix thumnbnail placeholders 2023-02-05 14:24:16 +01:00
Arkadiusz Fal
18cbbd3c90 Fix crashes 2023-02-05 14:24:16 +01:00
Arkadiusz Fal
c432aa3b9a Minor fixes 2023-02-05 14:24:15 +01:00
Arkadiusz Fal
bdb1f032a9 Home queue 2023-02-05 14:24:14 +01:00
Arkadiusz Fal
b90c856e21 Fix banner indicator position 2023-02-05 14:24:14 +01:00
Arkadiusz Fal
9f3a94137c Fix thumbnail view 2023-02-05 14:24:13 +01:00
Arkadiusz Fal
adc32d5ae1 Add playing indicator 2023-02-05 14:24:13 +01:00
Arkadiusz Fal
5054f828de Use CachedAsyncImage if possible 2023-02-05 14:24:13 +01:00
Arkadiusz Fal
4acf9284f4 Revert "Feed calculation logic change"
This reverts commit 2624b7dd0e07674f3639fb18618a5e11b3e9f53f.
2023-02-05 14:24:13 +01:00
Arkadiusz Fal
4c0fae19ee Feed calculation logic change 2023-02-05 14:24:13 +01:00
Arkadiusz Fal
f1551141e3 Fix cells on tvOS 2023-02-05 14:24:12 +01:00
Arkadiusz Fal
4a7d6ace24 Add button for toggling watch status 2023-02-05 14:24:12 +01:00
Arkadiusz Fal
afe7d72352 Playlist submenu and play buttons 2023-02-05 14:24:12 +01:00
Arkadiusz Fal
a7b489d081 Remove progress view from video banner 2023-02-05 14:24:11 +01:00
Arkadiusz Fal
404e2e6768 Fix updating watch history 2023-02-05 14:24:11 +01:00
Arkadiusz Fal
71c666ebfe Fix placeholders 2023-02-05 14:24:11 +01:00
Arkadiusz Fal
037d3a0481 Add channels thumbnails to cells and list 2023-02-05 14:24:11 +01:00
Arkadiusz Fal
3b31f21c81 Channels caching 2023-02-05 14:24:11 +01:00
Arkadiusz Fal
1a1ef7e76c Video listing improvement 2023-02-05 14:24:10 +01:00
Arkadiusz Fal
e390bbcf09 Hide channel on list item if inside channel view 2023-02-05 14:24:10 +01:00
Arkadiusz Fal
d5626b877c Don't observe thumbnails model in thumbnails view 2023-02-05 14:24:10 +01:00
Arkadiusz Fal
d38a507be5 Video banner layout fixes 2023-02-05 14:24:09 +01:00
Arkadiusz Fal
57b2276f36 Improve video lists 2023-02-05 14:24:09 +01:00
Arkadiusz Fal
b351b31e05 UI improvements 2023-02-05 14:24:09 +01:00
Arkadiusz Fal
25da312966 Listing styles 2023-02-05 14:24:09 +01:00