| 93 | } |
| 94 | |
| 95 | fire_and_forget ColorPickerPage::OpenConfirmDialog() |
| 96 | { |
| 97 | const auto self_weak = get_weak(); |
| 98 | const auto result = co_await ConfirmCloseDialog().ShowAsync(); |
| 99 | |
| 100 | if (const auto self = self_weak.get()) |
| 101 | { |
| 102 | if (result != wuxc::ContentDialogResult::None) |
| 103 | { |
| 104 | if (result == wuxc::ContentDialogResult::Primary) |
| 105 | { |
| 106 | self->m_ChangesCommittedHandler(self->Picker().Color()); |
| 107 | } |
| 108 | |
| 109 | self->base_type::Close(); |
| 110 | } |
| 111 | } |
| 112 | } |
| 113 | } |