Commit Graph

15 Commits

Author SHA1 Message Date
Davide De Rosa 278efaf347
Refactor domain errors (#310) 2023-07-02 12:51:50 +02:00
Davide De Rosa a78a7b18b5
Encapsulate *Persistence responsibilities (#305)
Do not leave the choice of a repository context up to the library
consumer. Instead, provide a specific factory (*Persistence) for each
module.
2023-05-27 12:32:53 +02:00
Davide De Rosa 7ccb10febc
Rethink library architecture (#301) 2023-05-24 18:19:47 +02:00
Davide De Rosa b4ad8dea0d Do some code clean up
- Use guard in validators

- Rename URL.openURL() to URL.open()

- Sort imports (SwiftLint)

- Drop unused VPNProtocolType.allTypes

- Drop unused imports
2023-05-21 11:48:03 +02:00
Davide De Rosa f06f097f27
Add SwiftLint phase (#262) 2023-03-17 21:55:47 +01:00
Davide De Rosa 37354d1b87 Update copyright 2023-03-17 16:56:19 +01:00
Davide De Rosa 1b704d7d4a
Decouple VPNManager from TunnelKit (#248)
* Drop VPNManager dependency on TunnelKit

* Hook .masksPrivateData to preferences updates
2022-11-10 07:42:08 +01:00
Davide De Rosa 54c53707e0
Add app log in Diagnostics screen (#234) 2022-10-16 08:33:32 +02:00
Davide De Rosa 5627e6c4a9
Address UI race conditions (#229)
* Make some managers concurrency-safe

- IntentsManager: @MainActor, non-shared, continuation

- SSIDReader: @MainActor, continuation

- Reviewer: main queue, non-shared

* Review wrong use of Concurrency framework

There were background thread calls e.g. in VPNToggle, because
ProfileManager was used inside a VPNManager async call.

Annotate @MainActor wherever a Task involves UI.

* Make main managers MainActor

* Apply MainActor to Mac menus

* [ci skip] Update CHANGELOG

* Set MainActor consistently on Mac menu view models
2022-10-13 08:53:50 +02:00
Davide De Rosa 54dc8a2556 Use MockVPN from TunnelKit
Rather than ad hoc strategy.
2022-10-12 22:37:40 +02:00
Davide De Rosa 4c4b3ee0c9 Revert to concrete-only managers
Abstraction was overcomplicated. Strategy pattern is enough.
2022-09-03 12:47:40 +02:00
Davide De Rosa ce280c0826 Fix old entity naming 2022-07-16 17:39:42 +02:00
Davide De Rosa 58e375ec41 Attach @MainActor where needed
Some methods were updating UI from non-main thread.
2022-07-16 17:39:42 +02:00
Davide De Rosa 9a8477225e Refactor library into domain + impl 2022-06-23 23:31:01 +02:00
Davide De Rosa 8504998bbb Reorganize app-specific shared code into AppShared 2022-06-19 14:41:26 +02:00