mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Everywhere: Replace Model::update() with Model::invalidate()
Most of the models were just calling did_update anyway, which is pointless since it can be unified to the base Model class. Instead, code calling update() will now call invalidate(), which functions identically and is more obvious in what it does. Additionally, a default implementation is provided, which removes the need to add empty implementations of update() for each model subclass. Co-Authored-By: Ali Mohammad Pur <ali.mpfard@gmail.com>
This commit is contained in:
@@ -360,7 +360,7 @@ void DirectoryView::open(String const& path)
|
||||
auto real_path = Core::File::real_path_for(path);
|
||||
|
||||
if (model().root_path() == real_path) {
|
||||
model().update();
|
||||
model().invalidate();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -382,7 +382,7 @@ void DirectoryView::open_parent_directory()
|
||||
|
||||
void DirectoryView::refresh()
|
||||
{
|
||||
model().update();
|
||||
model().invalidate();
|
||||
}
|
||||
|
||||
void DirectoryView::open_previous_directory()
|
||||
|
||||
Reference in New Issue
Block a user