Commit Graph
18 Commits
Author SHA1 Message Date
Jacek Krasiukianis 82b05a7d40 Move MailUserSessionStub to InboxTesting 2025-07-30 11:54:53 +02:00
Jacek Krasiukianis 0a3eb40bf1 ET-630 Print message action 2025-07-21 11:33:01 +00:00
Maciej Gomółka b5f86ccaf2 Refactor after the CR 2025-07-18 12:38:33 +02:00
Mateusz Szklarek f1213eaeb6 Remove no longer needed helper for legacy XCTest's tests 2025-07-17 12:02:02 +01:00
Mateusz Szklarek 37333bf240 Rename fixedCurrentDate to currentDate and simplify traits naming
Add missing docs
2025-07-17 12:01:21 +01:00
Mateusz Szklarek c8c0398844 Fix last failing snapshot tests - use traits with hardcoded calendar/date 2025-07-17 11:56:24 +01:00
Mateusz Szklarek db4d2d1ade Add inline documentation for FixedCalendarTrait helper extension 2025-07-17 11:28:45 +01:00
Mateusz Szklarek c267d76399 Fix snapshot tests that was using system calendar instead of hardcoded one 2025-07-17 11:27:28 +01:00
Mateusz Szklarek e2426ce525 Fix failing tests in MessageDetailsDateFormatterTests 2025-07-16 18:02:18 +02:00
Mateusz Szklarek 38c46c165d Refactor: Replace nonisolated(unsafe) Calendar with @TaskLocal
The `DateEnvironment.calendar` property was previously marked with `nonisolated(unsafe)`,
which disables crucial compiler safety checks for a mutable global variable.
This pattern is unsafe and can lead to data races and unpredictable behavior in
concurrent environments.

This commit replaces `nonisolated(unsafe)` with the modern `@TaskLocal`
property wrapper available in Swift 6.1. This provides a much safer API
for managing context-specific data.

The key benefits of this change are:
- **Thread Safety:** `@TaskLocal` is inherently safe. The property is read-only by default, and modifications are confined to the specific task's scope.
- **Scoped Modifications:** Changes to the calendar are made via the `withValue` function, which guarantees that the modification only applies within a local scope and does not leak, preventing global state pollution.
- **Improved Clarity:** The API now clearly expresses its intent. Consumers must explicitly create a local scope to use a different calendar, making the code more predictable and easier to reason about.
2025-07-16 16:35:40 +02:00
Xavi Gil e7ad40c69e SDK bump 0.99.0 + changes in BackgroundTaskExecutor 2025-07-07 10:17:27 +02:00
Jacek Krasiukianis 2622a6a43f ET-638 Reusable lock screen 2025-07-02 15:48:02 +02:00
Mateusz Szklarek 00265b6cf5 Implement openURL action in ContactDetailsStateStore 2025-06-12 08:47:54 +00:00
Maciej Gomółka 99cd15fce7 Display lock screen over the app 2025-04-10 15:24:21 +00:00
Maciej Gomółka b2f1fe26f8 Precache emails 2025-01-31 16:13:04 +01:00
Jacek Krasiukianis c7fa96056f CR: reduce duplication, add XCTAssertAsyncThrowsError 2025-01-09 14:20:23 +00:00
Mateusz Szklarek 016265dfd6 Add failing test for dismiss action on contacts screen 2024-11-18 15:20:53 +00:00
Mateusz Szklarek 1d793acf5b Rename ProtonTesting module to InboxTesting 2024-10-29 12:42:21 +01:00