Просмотр исходного кода

possible fix wrong layout after start

Ivan Valkou 5 лет назад
Родитель
Сommit
bce3c73a2b
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

+ 1 - 1
FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

@@ -115,7 +115,7 @@ struct MainChartView: View {
                         }
                         .onAppear {
                             // add trigger to the end of main queue
-                            DispatchQueue.main.async {
+                            DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
                                 scroll.scrollTo(Config.endID, anchor: .trailing)
                                 didAppearTrigger = true
                             }