-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98faed9
commit 2306663
Showing
5 changed files
with
62 additions
and
9 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
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
26 changes: 26 additions & 0 deletions
26
Graduating-iOS/Graduating/Feature/EditSchool/EditSchoolViewModel.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,26 @@ | ||
// Author: hhhello0507 | ||
// Created: 10/7/24 | ||
|
||
|
||
import Foundation | ||
import Data | ||
import Model | ||
import Combine | ||
import Shared | ||
|
||
final class EditSchoolViewModel: ObservableObject { | ||
var subscription = Set<AnyCancellable>() | ||
|
||
@Published var editSchoolFlow = Flow.idle | ||
} | ||
|
||
extension EditSchoolViewModel { | ||
func editSchool(schoolId: Int) { | ||
UserService.shared.editUser( | ||
.init(schoolId: schoolId) | ||
) | ||
.flow(\.editSchoolFlow, on: self) | ||
.silentSink() | ||
.store(in: &subscription) | ||
} | ||
} |
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 |
---|---|---|
|
@@ -59,6 +59,7 @@ extension MainView: View { | |
} | ||
} | ||
.onAppear { | ||
print("MEAL") | ||
fetchMeals() | ||
} | ||
// .onAppear { | ||
|
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