From 5ad03f304349e686fa8bfeac214e119fdcff4dcc Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sat, 13 Mar 2021 11:57:40 +0100 Subject: [PATCH] Added the missing onFileChanged function to GridGameListView. --- es-app/src/views/gamelist/GridGameListView.cpp | 11 +++++++++++ es-app/src/views/gamelist/GridGameListView.h | 3 +++ 2 files changed, 14 insertions(+) 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;