Skip to content
Snippets Groups Projects
Commit 4e540a61 authored by Alexis Durgnat's avatar Alexis Durgnat :milky_way:
Browse files

Meeting subscription

parent 215d97bf
Branches
No related tags found
1 merge request!21*poof* final version
......@@ -88,6 +88,7 @@ public class MessageManager extends MessageQueue {
public void conditionalSubscribeMeeting(Consumer<Meeting> eventHandler, Predicate<Meeting> condition) {
this.conditionalSubscribe(Message.Type.Meeting, eventHandler, condition);
}
/**
* Subscribe to LeftJourney events validating the condition
* @param eventHandler LeftJourney consumer
......
......@@ -459,6 +459,11 @@ public class MainWindowController implements Initializable {
drawMessage(message, leftJourney.getWeatherToDestination(), AppConfig.COLOR_BLUE_10_OPACITY);
}
}), userFilter::test);
app.getMessageManager().conditionalSubscribeMeeting(meeting -> Platform.runLater(() -> {
//Consumer code
}), userFilter::test);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment