diff --git a/es-app/src/views/gamelist/GridGameListView.cpp b/es-app/src/views/gamelist/GridGameListView.cpp index 9e8316249..c6992285f 100644 --- a/es-app/src/views/gamelist/GridGameListView.cpp +++ b/es-app/src/views/gamelist/GridGameListView.cpp @@ -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(); diff --git a/es-app/src/views/gamelist/GridGameListView.h b/es-app/src/views/gamelist/GridGameListView.h index a5981d4b4..058b85d7b 100644 --- a/es-app/src/views/gamelist/GridGameListView.h +++ b/es-app/src/views/gamelist/GridGameListView.h @@ -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& theme) override;