-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from jtouzy/feature/breaking_bad_ios
Refacto iOS app to Breaking Bad API
- Loading branch information
Showing
10 changed files
with
115 additions
and
76 deletions.
There are no files selected for viewing
This file contains 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
27 changes: 27 additions & 0 deletions
27
Examples/DemoApp/iosApp/DemoApp/Components/ActivityIndicator.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// ActivityIndicator.swift | ||
// DemoApp | ||
// | ||
// Created by Jérémy TOUZY on 27/01/2020. | ||
// Copyright © 2020 jtouzy. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
// | ||
// MARK: Component ActivityIndicator | ||
// | ||
struct ActivityIndicator: UIViewRepresentable { | ||
let style: UIActivityIndicatorView.Style | ||
|
||
func makeUIView(context: UIViewRepresentableContext<ActivityIndicator>) -> UIActivityIndicatorView { | ||
return UIActivityIndicatorView(style: style) | ||
} | ||
|
||
func updateUIView(_ uiView: UIActivityIndicatorView, | ||
context: UIViewRepresentableContext<ActivityIndicator>) { | ||
if (!uiView.isAnimating) { | ||
uiView.startAnimating() | ||
} | ||
} | ||
} |
8 changes: 5 additions & 3 deletions
8
...DemoApp/Extensions/String+extension.swift → ...oApp/Extensions/Character+extension.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
// | ||
// String+extension.swift | ||
// Character+extension.swift | ||
// DemoApp | ||
// | ||
// Created by Jérémy TOUZY on 24/01/2020. | ||
// Copyright © 2020 jtouzy. All rights reserved. | ||
// | ||
|
||
extension String: Identifiable { | ||
import shared | ||
|
||
extension Character: Identifiable { | ||
public var id: String { | ||
return self | ||
return name | ||
} | ||
} |
13 changes: 0 additions & 13 deletions
13
Examples/DemoApp/iosApp/DemoApp/Modules/CharacterProfile/CharacterProfileAssembler.swift
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
Examples/DemoApp/iosApp/DemoApp/Modules/CharacterQuotes/CharacterQuotesAssembler.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// CharacterQuotesAssembler.swift | ||
// DemoApp | ||
// | ||
// Created by Jérémy TOUZY on 24/01/2020. | ||
// Copyright © 2020 jtouzy. All rights reserved. | ||
// | ||
|
||
class CharacterQuotesAssembler { | ||
static func assemble() -> CharacterQuotesView { | ||
return CharacterQuotesView() | ||
} | ||
} |
This file contains 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
17 changes: 17 additions & 0 deletions
17
Examples/DemoApp/iosApp/DemoApp/Modules/Characters/CharactersAssembler.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// | ||
// CharactersAssembler.swift | ||
// DemoApp | ||
// | ||
// Created by Jérémy TOUZY on 22/01/2020. | ||
// Copyright © 2020 jtouzy. All rights reserved. | ||
// | ||
|
||
import shared | ||
|
||
class CharactersAssembler { | ||
static func assemble() -> CharactersView { | ||
let store = ObservableStore<CharactersViewState>(baseState: Loading()) | ||
let presenter = CharactersPresenterImpl(store: store, api: BreakingBadApi()) | ||
return CharactersView(presenter: presenter, store: store) | ||
} | ||
} |
This file contains 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
17 changes: 0 additions & 17 deletions
17
Examples/DemoApp/iosApp/DemoApp/Modules/MarvelCharacters/MarvelCharactersAssembler.swift
This file was deleted.
Oops, something went wrong.
This file contains 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