Skip to content

Commit

Permalink
Fix initial schedule scroll position
Browse files Browse the repository at this point in the history
  • Loading branch information
asiliuk committed Sep 26, 2020
1 parent 3aa5d56 commit 897dd29
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion BsuirScheduleApp/Views/Schedule/ScheduleGridView.swift
Expand Up @@ -17,7 +17,11 @@ struct ScheduleGridView<DayModel: Identifiable, DayView: View>: View {
.onAppear(perform: load)
}
}
.onAppear { proxy.scrollTo(MostRelevantDayViewID()) }
.onAppear {
DispatchQueue.main.async {
proxy.scrollTo(MostRelevantDayViewID(), anchor: .top)
}
}
.padding()
}
}
Expand Down

0 comments on commit 897dd29

Please sign in to comment.