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

Merge branch 'devel' of ssh://ssh.hesge.ch:10572/pirkl-poo-2018/tp-4 into devel

parents 9282ae10 0e392304
Branches
No related tags found
1 merge request!21*poof* final version
......@@ -27,6 +27,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",
......@@ -48,6 +50,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
......
......@@ -430,6 +430,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