This commit is contained in:
Vladimir Dubovik
2025-03-13 12:26:41 +03:00
parent 5946cd3ec0
commit 8bc7425e2a
10 changed files with 126 additions and 104 deletions

View File

@ -16,9 +16,6 @@ struct ScheduleView: View {
@State private var isShowingMyPairs = false
@Binding var isScrolling: Bool
var provider = ClassProvider.shared
var hasVPK: Bool {
return vm.vpks.indices.contains(vm.selectedIndex) && vm.vpks[vm.selectedIndex].dropFirst().contains { !$0.isEmpty }
}
var body: some View {
if vm.isLoading {
LoadingScheduleView()

View File

@ -29,8 +29,10 @@ struct SearchBarView: View {
.onSubmit {
self.isFocused = false
if (!text.isEmpty) {
vm.nameToHtml[vm.searchingGroup] = nil
vm.removeFromSchedule(group: vm.searchingGroup)
vm.searchingGroup = text
vm.updateArrayOfGroups()
vm.nameToHtml[text] = ""
vm.fetchWeekSchedule()
}
self.text = ""