Skip to content

Commit 245ce42

Browse files
committed
style: reload standard cache
1 parent 6631c8e commit 245ce42

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

src/ruis/style/style_provider.cpp

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,22 @@ void style_provider::set(utki::shared_ref<style_sheet> ss)
3535
{
3636
this->cur_style_sheet = std::move(ss);
3737

38-
std::vector<std::string_view> keys_to_remove;
38+
// ==== reload standard cache ====
39+
for (auto [v, id] : this->standard_cache.zip_with_enum()) {
40+
auto sv = v.lock();
41+
if (!sv) {
42+
continue;
43+
}
44+
45+
sv->reload(
46+
this->cur_style_sheet.get().get(id), //
47+
this->res_loader.get()
48+
);
49+
}
3950

40-
// TODO: reload standard cache
51+
// ==== reload user cache ====
52+
std::vector<std::string_view> keys_to_remove;
4153

42-
// reload cache
4354
for (auto& pair : this->user_cache) {
4455
auto sv = pair.second.lock();
4556
if (!sv) {

0 commit comments

Comments
 (0)