Skip to content
Snippets Groups Projects
Verified Commit 0e392304 authored by Théo Pirkl's avatar Théo Pirkl :nail_care:
Browse files

When two people cross each other, they will know !

parent c65dbd72
No related branches found
No related tags found
1 merge request!21*poof* final version
......@@ -25,6 +25,8 @@ public final class AppConfig {
public static final String ERROR_API_MQ = "Une erreur s'est produite lors de la publication de cet évènement.";
public static final String DEFAULT_JOURNEY_TEXT = "Vous n'avez prévu aucun voyage pour le moment.";
public static final String COMMON_ITINERARY_TEXT = "Vous allez croiser %s à %s ! Pensez à vous saluer !";
public static List<String> CHAT_COMMANDS = List.of(
"help",
"block",
......@@ -46,6 +48,7 @@ public final class AppConfig {
public static final String WEATHER_ICON_SNOWY = "/img/snowy.png";
public static final String WEATHER_ICON_STORMY = "/img/stormy.png";
public static final String WEATHER_ICON_SUNNY = "/img/sunny.png";
public static final String JOURNEY_ICON_COMMON_ITINERARY = "/img/friends.png";
/**
* Style
......
......@@ -410,6 +410,22 @@ public class MainWindowController implements Initializable {
drawMessage(message, AppConfig.CHAT_TRAIN_ICON_SELF, AppConfig.COLOR_BLUE_10_OPACITY);
} else {
drawMessage(message, joinedJourney.getWeatherToDestination(), AppConfig.COLOR_BLUE_10_OPACITY);
try {
Section commonSection = joinedJourney.getConnection().getInCommonSection(currentJourney);
if (!(commonSection.equals(Section.empty()))){
drawMessage(
String.format(
AppConfig.COMMON_ITINERARY_TEXT,
sender.getName(),
commonSection.getDeparture().getLocation().getName()
),
AppConfig.JOURNEY_ICON_COMMON_ITINERARY,
AppConfig.COLOR_BLUE_50_OPACITY
);
}
} catch (ParseException e) {
e.printStackTrace();
}
}
}), userFilter::test);
......
src/main/resources/img/friends.png

1.7 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment