Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Modules/RAM/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public class RAM: Module {

self.settingsView.callback = { [weak self] in
self?.usageReader?.read()
self?.processReader?.read()
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why open settings trigger process read?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intent there was to refresh the top process list immediately after toggling RAM-related settings, especially the combined processes option.

You're right though: settingsView.callback is too broad for that and can also be triggered when opening/settings refresh. I'll remove the process read from this callback and keep it scoped only to the setting that actually affects the process list.

}
self.settingsView.setInterval = { [weak self] value in
self?.processReader?.read()
Expand Down
Loading