Add dependency management, AvatarViewModel and placeholder rendering now in AvatarImage.

This commit is contained in:
David Langley
2021-08-17 10:19:41 +01:00
parent 31b4da8502
commit e09138b572
17 changed files with 103 additions and 72 deletions
@@ -18,10 +18,12 @@ import Foundation
import Combine
import DesignKit
/**
Simple ViewModel that supports loading an avatar image of a particular size
as specified in DesignKit and delivering the UIImage to the UI if possible.
*/
@available(iOS 14.0, *)
class AvatarViewModel: ObservableObject, Injectable {
var dependencies: DependencyContainer!
class AvatarViewModel: InjectableObject, ObservableObject {
@Inject var avatarService: AvatarServiceType