mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-02 01:13:19 +00:00
Fix wrong source when creating new task or event
This commit is contained in:
parent
893fcc11e3
commit
ab2200ecc1
3 changed files with 18 additions and 1 deletions
|
@ -93,6 +93,11 @@ std::optional<ui::Date> stringToDate(const std::string &dateStr)
|
|||
|
||||
void AppWindow::setupCallbacks()
|
||||
{
|
||||
models().on_get_source_id_from_name([&](slint::SharedString name) {
|
||||
auto source = miraiInstance_->getSourceByName(std::string(name));
|
||||
assert(source);
|
||||
return source->id;
|
||||
});
|
||||
miraiInstance_->onSourceAdded([&](mirai::Source *source) {
|
||||
refreshModels();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue