* fixed dismiss action sending when navigating back
* Revert "fixed dismiss action sending when navigating back"
This reverts commit 52f7340406.
* added integration ui test
* fixed id for presentation with `isPresented` parameter
* fixed integration tests
* Added an internal initialiser for ViewStoreTask
This is done to allow returning a ViewStoreTask from Store.send(_:animation:)
* Added Store.send methods that allow specifying an animation or transaction
* Added StoreTask
* Made StoreTask.rawValue internal
This is to allow ViewStore to access the rawValue as it does currently
* Made ViewStoreTask a deprecated typealias of StoreTask
* Store.send methods now return a StoreTask instead of a ViewStoreTask
* Update ViewStore.swift
* Update Sources/ComposableArchitecture/Store.swift
---------
Co-authored-by: Stephen Celis <stephen.celis@gmail.com>
Co-authored-by: Stephen Celis <stephen@stephencelis.com>
Fixes#2182.
The `id` used for comparison appears to sometimes be `nil`, for example
on macOS when drilling out of a `navigationDestination`. This PR adds a
little nuance to the dismissal logic of `presentationModifier`:
* It explicitly checks that something is presented
* It always sends `dismiss` if the cached `id` was `nil`
We should maybe have some integration tests for macOS for this...
* Fix cancellation ID existentials in iOS 14
Fixes#2233.
On iOS 14, `DismissEffect` is broken because effect cancellation uses
`AnyHashable` throughout, which can lead to nested
`AnyHashable(AnyHashable(...))` IDs, which can hash differently
depending on the level of nesting. By preserving the hashable ID up to
being stored in the internal cancellation token type, we can avoid a
hash lookup failure that prevents a dismissal from happening.
* wip
Currently, `ViewStoreTask.cancel` works like `TestStoreTask`, where
it'll cancel _and_ await cancellation to complete. This is needlessly
limiting, and probably not what you want when interacting with
cancellation.
* Fixed BindingAction.set(keyPath:value:) causes equality test on value to fail
* clean up
---------
Co-authored-by: Bharath Booshan <bbooshan@atlassian.com>
Co-authored-by: Brandon Williams <mbrandonw@hey.com>
This API has been more problematic than not, especially when folks
accidentally type `.cancel(id:)` and pass a hashable array when they
expect to be passing multiple tokens along to each cancel. Let's avoid
the confusion by deprecating the functionality.
Cancelling multiple tokens at once should also be less common these days
now that navigation tools bakes cancellation into dismissal.