This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typealias SomeContent = String | |
indirect enum Step { | |
case step1(SomeContent, Step?) | |
case step2(SomeContent, Step?) | |
case step3(SomeContent, Step?) | |
} | |
let step1 = Step.step1("Step 1 data", nil) | |
let step2 = Step.step2("Step 2 data", step1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// works fine, but receiveValue may return on different threads | |
viewModel.$snapshot | |
.sink { [weak self] snapshot in | |
guard let self = self else { return } | |
var animateDifferences = false | |
switch self.viewModel.state { | |
case .idle, .empty, .loading, .searching: | |
animateDifferences = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"iso2": "AF", | |
"translations": { | |
"br": "Afeganistão", | |
"nl": "Afghanistan", | |
"hr": "Afganistan", | |
"ja": "アフガニスタン", | |
"fr": "Afghanistan", | |
"it": "Afghanistan", |
OlderNewer