mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-17 09:06:26 +00:00
Automatically create the async query when converting to a TableView
This commit is contained in:
parent
8f668fdf09
commit
934263f76a
@ -177,9 +177,14 @@ void Results::update_tableview()
|
||||
m_mode = Mode::TableView;
|
||||
break;
|
||||
case Mode::TableView:
|
||||
if (m_live) {
|
||||
m_table_view.sync_if_needed();
|
||||
if (!m_live) {
|
||||
return;
|
||||
}
|
||||
if (!m_realm->config().read_only && !m_realm->is_in_transaction() && !m_background_query) {
|
||||
m_background_query = std::make_shared<_impl::AsyncQuery>(*this);
|
||||
_impl::RealmCoordinator::register_query(m_background_query);
|
||||
}
|
||||
m_table_view.sync_if_needed();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user