Added the missing onFileChanged function to GridGameListView.

This commit is contained in:
Leon Styhre 2021-03-13 11:57:40 +01:00
parent b12a68603d
commit 5ad03f3043
2 changed files with 14 additions and 0 deletions

View file

@ -155,6 +155,17 @@ GridGameListView::~GridGameListView()
delete mVideo;
}
void GridGameListView::onFileChanged(FileData* file, bool reloadGameList)
{
if (reloadGameList) {
// Might switch to a detailed view.
ViewController::get()->reloadGameListView(this);
return;
}
ISimpleGameListView::onFileChanged(file, reloadGameList);
}
FileData* GridGameListView::getCursor()
{
return mGrid.getSelected();

View file

@ -22,6 +22,9 @@ public:
GridGameListView(Window* window, FileData* root);
virtual ~GridGameListView();
// Called when a FileData* is added, has its metadata changed, or is removed.
virtual void onFileChanged(FileData* file, bool reloadGameList) override;
virtual void onShow() override;
virtual void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override;