mirror of
https://github.com/clangen/musikcube.git
synced 2025-02-06 12:39:54 +00:00
Requery TrackSearchLayout on Indexer.Finished (#437)
Whenever library is updated search should be requeried. Co-authored-by: Maksymilian Jodlowski <5447436-ravensiris@users.noreply.gitlab.com>
This commit is contained in:
parent
f2590fc480
commit
ec842cfcb0
@ -77,6 +77,7 @@ TrackSearchLayout::TrackSearchLayout(
|
||||
, playback(playback)
|
||||
, library(library) {
|
||||
this->prefs = Preferences::ForComponent(components::Settings);
|
||||
this->library->Indexer()->Finished.connect(this, &TrackSearchLayout::OnIndexerFinished);
|
||||
this->InitializeWindows();
|
||||
}
|
||||
|
||||
@ -122,6 +123,10 @@ void TrackSearchLayout::OnLayout() {
|
||||
this->GetHeight() - kSearchHeight);
|
||||
}
|
||||
|
||||
void TrackSearchLayout::OnIndexerFinished(int totalUrisScanned){
|
||||
this->Requery();
|
||||
}
|
||||
|
||||
void TrackSearchLayout::InitializeWindows() {
|
||||
this->input = std::make_shared<TextInput>();
|
||||
this->input->TextChanged.connect(this, &TrackSearchLayout::OnInputChanged);
|
||||
|
@ -76,6 +76,7 @@ namespace musik {
|
||||
void SaveSession();
|
||||
void InitializeWindows();
|
||||
void Requery();
|
||||
void OnIndexerFinished(int);
|
||||
|
||||
void OnRequeried(musik::core::library::query::TrackListQueryBase* query);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user