Commit Graph
61 Commits
Author SHA1 Message Date
Brent Simmons 2ce850441b Make AppDefaults an enum instead of singleton class. 2026-10-22 13:46:32 -07:00
Brent Simmons cb6a59f6d6 Switch from OSAllocatedUnfairLock to Mutex. 2026-10-21 19:15:05 -07:00
Brent Simmons a6dd4b2441 Write theme unzipping tests. 2026-08-31 20:56:01 -07:00
Brent Simmons dbf49b1717 Download themes from http and https URLs only. Use a download maximum size. 2026-08-31 17:35:58 -07:00
Brent Simmons 7809b713de Fix bug where decoding errors during syncing would display as theme import errors. Also: show account name and type in sync error messages. Fixes #3849. 2026-08-01 09:41:04 -07:00
Brent Simmons 75755af700 Use browser agent UA for image and theme downloads. Fixes #4868. 2026-07-29 10:17:31 -07:00
Brent Simmons 4a2c62cc6c Make app run on iOS 17 and up. 2026-03-29 21:31:02 -07:00
Stuart Breckenridge fd860b8cd5 🚑️ Fix #4938 - Theme persistence
When setting a new theme, these three functions need to run in sequence.

AppDefaults.shared.currentThemeName = newValue
updateThemeNames()
updateCurrentTheme()

Within updateThemeNames() there is a `Task { @MainActor in }` that allows  `updateCurrentTheme()` to complete before `updateThemeNames()`. In this scenario, when `updateCurrentTheme() is run the app hasnt got an itinerary of installed themes, so it sets the current them back to Default.

Removing the `Task` fixes the persistence issue.
2026-01-10 10:42:54 +08:00
Brent Simmons 0b429ae259 Fix various SwiftLint warnings. 2026-01-01 16:17:54 -08:00
Brent Simmons 6ba9940834 Fix various SwiftLint warnings. 2025-12-31 11:38:56 -08:00
Brent Simmons 20d363433d Fix various concurrency issues. 2025-11-18 19:58:48 -08:00
Brent Simmons 3c24f9139a Fix various concurrency issues. 2025-11-18 14:33:24 -08:00
Brent Simmons 8f57f914dd Fix various concurrency issues. 2025-11-18 13:25:47 -08:00
Brent Simmons 9efde554d4 Clean whitespace-only lines. 2025-11-05 11:22:10 -08:00
Brent Simmons 4d930dd5e4 Restore changes reverted in previous beta. 2025-05-09 20:30:04 -07:00
Brent Simmons 9aa93166b7 Revert more changes since 6193 in hopes of fixing the scrolling bug. 2025-05-09 09:22:34 -07:00
Brent Simmons b7d4041781 Simplify WebView loading on iOS. 2025-04-28 21:00:31 -07:00
Stuart Breckenridge ccd0bfb017 changes to checking for the prefix 2025-04-28 08:47:51 -07:00
Stuart Breckenridge 23af34b616 Ignores files in __MACOSX folder 2025-04-28 08:47:44 -07:00
Stuart Breckenridge a9f33643f6 🩹 Fixes memory leaks caused by NSString usage 2025-04-27 12:19:51 -07:00
Brent Simmons b0b5ad018c Fix theme-importing — use startAccessingSecurityScopedResource and stopAccessingSecurityScopedResource, which appear to be required now. 2024-12-31 21:15:51 -08:00
Maurice Parker 0c183f4bdf Prevent app themes from attempting to be deleted 2022-02-07 16:49:28 -08:00
Maurice Parker a1bfa4afdc Make sure that the theme names are always up to date before setting the current theme 2022-02-07 16:27:10 -08:00
Maurice Parker ea6e5b8434 Change to no longer copy app distributed themes to the Themes folder. Fixes #3447 2022-02-07 16:23:08 -08:00
Dimitris Apostolou 94ae4d348c Fix typos 2022-01-05 00:25:20 +02:00
Maurice Parker 37cb93ed1a Merge pull request #3301 from stuartbreckenridge/theme-tweaks
Theme tweaks
2021-09-23 20:33:54 -05:00
Maurice Parker 71b0a8d476 Rename the InstalledStyleSheets file to InstalledThemes 2021-09-23 10:00:53 -05:00
Stuart Breckenridge e9b84d9219 Theme Import/Opening Changes
Mac:
- Better error messages
- The alert displayed contains an additional button to open the theme's folder (when clicked it will not dismiss the alert).
2021-09-23 20:12:35 +08:00
Stuart Breckenridge 94ed186b8c Perfoms search of directory for theme file. 2021-09-22 09:17:48 +08:00
Stuart Breckenridge 82a62712ce Better error messages for decoding issues 2021-09-21 10:43:12 +08:00
Stuart Breckenridge c29afd2677 try? changed to try with error handling 2021-09-21 09:22:45 +08:00
Stuart Breckenridge 78e0595708 Various ThemeDownloader Updates
- `try` added where applicable to ArticleTheme inits
- `ArticleThemePlist` has fixed spelling of theme identifier and conforms to Equatable
- `ArticleTheme` now uses `ArticleThemePlist`
-  `ArticleThemeDownloader` is now a class
- `ArticleThemeDownloader` will now download themes to Application Support/NetNewsWire/Downloads on macOS and iOS.
- `ArticleThemeDownloader` will remove downloaded themes from the Download folder when the application is closed.
- macOS app delegate now observes for theme download fails
- Error display code moved from SceneDelegate to SceneCoordinator so that it can use existing presentError on rootVC.
2021-09-21 09:10:56 +08:00
Stuart Breckenridge 7986e1caee Adds optional theme description 2021-09-21 06:18:15 +08:00
Stuart Breckenridge 1e5fd6499e Corrects identifier spelling 2021-09-21 06:16:38 +08:00
Stuart Breckenridge a1b01384d3 refactors downloader code for macOS & iOS
More consistent code across platforms.
2021-09-20 19:34:25 +08:00
Stuart Breckenridge afd952fbc2 refactors iOS theme downloads 2021-09-20 09:36:09 +08:00
Stuart Breckenridge 4fab4ffa7c download themes using url scheme
this build enables iOS functionality only.
2021-09-19 20:31:45 +08:00
Maurice Parker 35b913f4a0 Add the ability to delete a theme on iOS 2021-09-12 16:40:59 -05:00
Maurice Parker 9851629ec9 Implement a way to distribute themes with NetNewsWire 2021-09-12 11:53:34 -05:00
Maurice Parker 020c1f6141 Use a file presenter so that we don't have to switch back to NNW to observe theme edits. 2021-09-12 09:59:03 -05:00
Maurice Parker baad458138 Add Open Themes button 2021-09-11 20:32:15 -05:00
Maurice Parker d8098ab2e9 Split stylesheet.css into two different stylesheets to separate things that should be customized from those that should. 2021-09-11 17:49:56 -05:00
Maurice Parker b4d9423ff2 Add alert to verify overlaying an existing theme 2021-09-09 06:03:28 -05:00
Maurice Parker 622c3b0240 Sort the theme names 2021-09-08 20:02:38 -05:00
Maurice Parker e68e7420b8 Update the theme popup when the themes change 2021-09-08 17:36:52 -05:00
Maurice Parker 9db72e50e8 Add article theme pop up to General Prefs 2021-09-08 16:38:05 -05:00
Maurice Parker a645ac9458 Change how Notification names were defined to match our current convention 2021-09-08 14:19:56 -05:00
Maurice Parker e66344694e Copy the theme if the user requests it to be installed 2021-09-08 05:47:57 -05:00
Maurice Parker b568f03edc Unify the stylesheets into a single one to make building themes easier 2021-09-08 04:58:26 -05:00
Maurice Parker 98b9080b1f Implement initial alert dialog when importing a theme 2021-09-08 00:28:13 -05:00