From 3c6850b5308c4ddba3fde0c15c10029e80b12320 Mon Sep 17 00:00:00 2001 From: scorpion-26 <58082714+scorpion-26@users.noreply.github.com> Date: Sun, 29 Jan 2023 12:36:29 +0100 Subject: [PATCH] Fix regressions caused by immediate dispatch --- src/AudioFlyin.cpp | 3 ++- src/BluetoothDevices.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/AudioFlyin.cpp b/src/AudioFlyin.cpp index 65758a8..5a8c523 100644 --- a/src/AudioFlyin.cpp +++ b/src/AudioFlyin.cpp @@ -87,7 +87,6 @@ namespace AudioFlyin mainWidget->SetSpacing({8, false}); mainWidget->SetVerticalTransform({16, true, Alignment::Fill}); mainWidget->SetClass("bar"); - mainWidget->AddTimer(DynCtx::Main, 1); auto padding = Widget::Create(); padding->SetHorizontalTransform({8, true, Alignment::Fill}); @@ -98,6 +97,8 @@ namespace AudioFlyin padding = Widget::Create(); mainWidget->AddChild(std::move(padding)); + mainWidget->AddTimer(DynCtx::Main, 1); + window = Window(std::move(mainWidget), monitor); window.SetExclusive(false); window.SetAnchor(Anchor::Bottom); diff --git a/src/BluetoothDevices.cpp b/src/BluetoothDevices.cpp index 8778f92..449ff8e 100644 --- a/src/BluetoothDevices.cpp +++ b/src/BluetoothDevices.cpp @@ -277,10 +277,10 @@ namespace BluetoothDevices void WidgetBody(Widget& parentWidget) { auto bodyBox = Widget::Create(); + DynCtx::deviceListBox = bodyBox.get(); bodyBox->SetOrientation(Orientation::Vertical); bodyBox->SetClass("bt-body-box"); bodyBox->AddTimer(DynCtx::OnUpdate, 100); - DynCtx::deviceListBox = bodyBox.get(); parentWidget.AddChild(std::move(bodyBox)); }