mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:47:45 +00:00
LibCore: Simplify Core::Notifier by only allowing one event type
Not a single client of this API actually used the event mask feature to listen for readability AND writability. Let's simplify the API and have only one hook: on_activation.
This commit is contained in:
parent
1587caef84
commit
411d36719e
24 changed files with 80 additions and 99 deletions
|
@ -747,9 +747,9 @@ auto Editor::get_line(DeprecatedString const& prompt) -> Result<DeprecatedString
|
|||
|
||||
Core::EventLoop loop;
|
||||
|
||||
m_notifier = Core::Notifier::construct(STDIN_FILENO, Core::Notifier::Read);
|
||||
m_notifier = Core::Notifier::construct(STDIN_FILENO, Core::Notifier::Type::Read);
|
||||
|
||||
m_notifier->on_ready_to_read = [&] {
|
||||
m_notifier->on_activation = [&] {
|
||||
if (try_update_once().is_error())
|
||||
loop.quit(Exit);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue