Skip to content

Commit

Permalink
Merge pull request #241 from APP-iOS5th/revert-237-Feature/DIProfileView
Browse files Browse the repository at this point in the history
Revert "Feature/di profile view"
  • Loading branch information
jinwoong16 authored Nov 2, 2024
2 parents c9743e7 + 6a5c513 commit 5a61007
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 328 deletions.
40 changes: 0 additions & 40 deletions Kabinett.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@
7FCAE2BC2C73157C00228FA7 /* LetterWritingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FCAE2BB2C73157C00228FA7 /* LetterWritingView.swift */; };
8314013F2C69C34500F601FB /* Letter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8314013E2C69C34500F601FB /* Letter.swift */; };
832C72672C71CF7B0071E8D0 /* SignUpUseCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 832C72662C71CF7B0071E8D0 /* SignUpUseCase.swift */; };
83358CAD2CB2621400D1DD00 /* Module.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83358CAC2CB2621400D1DD00 /* Module.swift */; };
83358CAF2CB2643400D1DD00 /* DIContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83358CAE2CB2643400D1DD00 /* DIContainer.swift */; };
83358CB12CB2644400D1DD00 /* Injected.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83358CB02CB2644400D1DD00 /* Injected.swift */; };
83358CB32CB2645300D1DD00 /* InjectionKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83358CB22CB2645300D1DD00 /* InjectionKey.swift */; };
83358CB82CB2673000D1DD00 /* ServiceKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83358CB72CB2673000D1DD00 /* ServiceKeys.swift */; };
83358CBC2CB2674900D1DD00 /* UseCaseKeys.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83358CBB2CB2674900D1DD00 /* UseCaseKeys.swift */; };
839CE0F72C644BEF003635F3 /* KabinettApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 839CE0F62C644BEF003635F3 /* KabinettApp.swift */; };
839CE0F92C644BEF003635F3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 839CE0F82C644BEF003635F3 /* ContentView.swift */; };
839CE0FE2C644BF0003635F3 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 839CE0FD2C644BF0003635F3 /* Preview Assets.xcassets */; };
Expand Down Expand Up @@ -228,12 +222,6 @@
7FCAE2BB2C73157C00228FA7 /* LetterWritingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LetterWritingView.swift; sourceTree = "<group>"; };
8314013E2C69C34500F601FB /* Letter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Letter.swift; sourceTree = "<group>"; };
832C72662C71CF7B0071E8D0 /* SignUpUseCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignUpUseCase.swift; sourceTree = "<group>"; };
83358CAC2CB2621400D1DD00 /* Module.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Module.swift; sourceTree = "<group>"; };
83358CAE2CB2643400D1DD00 /* DIContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DIContainer.swift; sourceTree = "<group>"; };
83358CB02CB2644400D1DD00 /* Injected.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Injected.swift; sourceTree = "<group>"; };
83358CB22CB2645300D1DD00 /* InjectionKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InjectionKey.swift; sourceTree = "<group>"; };
83358CB72CB2673000D1DD00 /* ServiceKeys.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServiceKeys.swift; sourceTree = "<group>"; };
83358CBB2CB2674900D1DD00 /* UseCaseKeys.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UseCaseKeys.swift; sourceTree = "<group>"; };
83949C892C71BC0F0080D72C /* DefaultProfileUseCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultProfileUseCase.swift; sourceTree = "<group>"; };
839CE0F32C644BEF003635F3 /* Kabinett.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Kabinett.app; sourceTree = BUILT_PRODUCTS_DIR; };
839CE0F62C644BEF003635F3 /* KabinettApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KabinettApp.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -461,27 +449,6 @@
path = SignUpUseCase;
sourceTree = "<group>";
};
83358CAB2CB2620600D1DD00 /* DIContainer */ = {
isa = PBXGroup;
children = (
83358CB42CB2652F00D1DD00 /* Keys */,
83358CAC2CB2621400D1DD00 /* Module.swift */,
83358CAE2CB2643400D1DD00 /* DIContainer.swift */,
83358CB02CB2644400D1DD00 /* Injected.swift */,
83358CB22CB2645300D1DD00 /* InjectionKey.swift */,
);
path = DIContainer;
sourceTree = "<group>";
};
83358CB42CB2652F00D1DD00 /* Keys */ = {
isa = PBXGroup;
children = (
83358CB72CB2673000D1DD00 /* ServiceKeys.swift */,
83358CBB2CB2674900D1DD00 /* UseCaseKeys.swift */,
);
path = Keys;
sourceTree = "<group>";
};
8366B6EF2C65ECC50021FAE0 /* Entity */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -650,7 +617,6 @@
838697C72C64B7FB00E76230 /* Application */ = {
isa = PBXGroup;
children = (
83358CAB2CB2620600D1DD00 /* DIContainer */,
839CE0F62C644BEF003635F3 /* KabinettApp.swift */,
);
path = Application;
Expand Down Expand Up @@ -943,7 +909,6 @@
AFCFDFC42C7C3F2A00BEFFDF /* FirestoreLetterManager.swift in Sources */,
577157052C75DD9900E21162 /* Writer.swift in Sources */,
04DEC0FE2C7EDB1100D289EA /* KabinettNumberFormatter.swift in Sources */,
83358CAD2CB2621400D1DD00 /* Module.swift in Sources */,
83F0D6872C7072DB001B8733 /* FirestoreWriterManager.swift in Sources */,
53FC6B842C90204D00E7D9A8 /* CloseButtonView.swift in Sources */,
577156FD2C7584E000E21162 /* NavigationBarView.swift in Sources */,
Expand All @@ -962,11 +927,7 @@
83CA92AB2C8160CB00DFB68B /* Publisher+.swift in Sources */,
7F6CE9C42C6B50050074568E /* ImagePickerViewModel.swift in Sources */,
534C67B72C7FF85700F0C175 /* LetterContentView.swift in Sources */,
83358CB12CB2644400D1DD00 /* Injected.swift in Sources */,
7FCAE2BA2C73102900228FA7 /* ImageDetailView.swift in Sources */,
83358CB82CB2673000D1DD00 /* ServiceKeys.swift in Sources */,
83358CBC2CB2674900D1DD00 /* UseCaseKeys.swift in Sources */,
83358CAF2CB2643400D1DD00 /* DIContainer.swift in Sources */,
04DEC0E72C6C6C7300D289EA /* ProfileView.swift in Sources */,
53A482DA2C6C6F2D00F00A9A /* LetterBoxCell.swift in Sources */,
53A482D42C6B4E8600F00A9A /* LetterBoxView.swift in Sources */,
Expand Down Expand Up @@ -1011,7 +972,6 @@
57966B9E2C7DB267008D650B /* Extension+TextField.swift in Sources */,
7F78684C2C78B41A0083D204 /* ImagePickerView.swift in Sources */,
7F23AD6C2C7432B8007E1F28 /* LetterCompletionView.swift in Sources */,
83358CB32CB2645300D1DD00 /* InjectionKey.swift in Sources */,
AFB88B592C89410600E79F90 /* DefaultWriteLetterUseCase.swift in Sources */,
53FC6B8A2C90221600E7D9A8 /* LetterHelper.swift in Sources */,
57ED94FA2C84AFAC00A6F187 /* LetterWriteModel.swift in Sources */,
Expand Down
57 changes: 0 additions & 57 deletions Kabinett/Application/DIContainer/DIContainer.swift

This file was deleted.

21 changes: 0 additions & 21 deletions Kabinett/Application/DIContainer/Injected.swift

This file was deleted.

18 changes: 0 additions & 18 deletions Kabinett/Application/DIContainer/InjectionKey.swift

This file was deleted.

33 changes: 0 additions & 33 deletions Kabinett/Application/DIContainer/Keys/ServiceKeys.swift

This file was deleted.

29 changes: 0 additions & 29 deletions Kabinett/Application/DIContainer/Keys/UseCaseKeys.swift

This file was deleted.

19 changes: 0 additions & 19 deletions Kabinett/Application/DIContainer/Module.swift

This file was deleted.

96 changes: 1 addition & 95 deletions Kabinett/Application/KabinettApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import FirebaseFirestore

@main
struct KabinettApp: App {

// MARK: - LetterBox Flow
@StateObject private var letterViewModel: LetterViewModel
@StateObject private var letterBoxViewModel: LetterBoxViewModel
Expand Down Expand Up @@ -55,10 +56,6 @@ struct KabinettApp: App {
Firestore.firestore().settings = settings
#endif

// MARK: Register Dependencies
KabinettApp.registerServices()
KabinettApp.registerUseCases()

// MARK: - Service Dependencies
let writerManager = FirestoreWriterManager()
let writerStorageManager = FirestorageWriterManager()
Expand Down Expand Up @@ -185,95 +182,4 @@ struct KabinettApp: App {
.environmentObject(previewLetterViewModel)
}
}

// MARK: Register Services
private static func registerServices() {
// MARK: Register Firestorage Services
DIContainer.shared.register {
Module(FirestorageWriterManagerKey.self) {
FirestorageWriterManager()
}
Module(FirestorageLetterManagerKey.self) {
FirestorageLetterManager()
}
}

// MARK: Register Firestore Services
DIContainer.shared.register {
Module(FirestoreWriterManagerKey.self) {
FirestoreWriterManager()
}
Module(FirestoreLetterManagerKey.self) {
@Injected(FirestorageLetterManagerKey.self)
var firestorageLetterManager: FirestorageLetterManager

return FirestoreLetterManager(storageManager: firestorageLetterManager)
}
}

// MARK: Register Firestore Authenticate Service
DIContainer.shared.register {
Module(AuthManagerKey.self) {
@Injected(FirestoreWriterManagerKey.self)
var firestoreWriterManager: FirestoreWriterManager

return AuthManager(writerManager: firestoreWriterManager)
}
}
}

// MARK: - Register UseCases
private static func registerUseCases() {
@Injected(AuthManagerKey.self) var authManager: AuthManager

@Injected(FirestoreWriterManagerKey.self)
var firestoreWriterManager: FirestoreWriterManager

@Injected(FirestoreLetterManagerKey.self)
var firestoreLetterManager: FirestoreLetterManager

@Injected(FirestorageWriterManagerKey.self)
var firestorageWriterManager: FirestorageWriterManager

@Injected(FirestorageLetterManagerKey.self)
var firestorageLetterManager: FirestorageLetterManager

DIContainer.shared.register {
Module(SignUpUseCaseKey.self) {
DefaultSignUpUseCase(
authManager: authManager,
writerManager: firestoreWriterManager
)
}
Module(ProfileUseCaseKey.self) {
DefaultProfileUseCase(
authManager: authManager,
writerManager: firestoreWriterManager,
writerStorageManager: firestorageWriterManager
)
}
Module(WriteLetterUseCaseKey.self) {
DefaultWriteLetterUseCase(
authManager: authManager,
writerManager: firestoreWriterManager,
letterManager: firestoreLetterManager,
letterStorageManager: firestorageLetterManager
)
}
Module(LetterBoxUseCaseKey.self) {
DefaultLetterBoxUseCase(
letterManager: firestoreLetterManager,
authManager: authManager
)
}
Module(ImportLetterUseCaseKey.self) {
DefaultImportLetterUseCase(
authManager: authManager,
writerManager: firestoreWriterManager,
letterManager: firestoreLetterManager,
letterStorageManager: firestorageLetterManager
)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import SwiftUI

struct AccountSettingsView: View {
@ObservedObject var viewModel: ProfileViewModel
@EnvironmentObject var viewModel: ProfileViewModel
@Environment(\.dismiss) var dismiss
@State private var showLogoutAlert = false
@State private var showAccountDeletionAlert = false
Expand Down
Loading

0 comments on commit 5a61007

Please sign in to comment.