Skip to content

Commit

Permalink
FAForever#936 Don't show 'join game' toast for ladder games
Browse files Browse the repository at this point in the history
  • Loading branch information
reweeden authored and Askaholic committed Jun 20, 2020
1 parent 0d2328a commit 7c6ea52
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/com/faforever/client/player/PlayerService.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.faforever.client.game.GameAddedEvent;
import com.faforever.client.game.GameRemovedEvent;
import com.faforever.client.game.GameUpdatedEvent;
import com.faforever.client.game.KnownFeaturedMod;
import com.faforever.client.player.event.CurrentPlayerInfo;
import com.faforever.client.player.event.FriendJoinedGameEvent;
import com.faforever.client.remote.FafService;
Expand Down Expand Up @@ -192,7 +193,9 @@ private void updateGameDataForPlayer(Game game, Player player) {
if (!playersByGame.get(game.getId()).contains(player)) {
player.setGame(game);
playersByGame.get(game.getId()).add(player);
if (player.getSocialStatus() == FRIEND && game.getStatus() == GameStatus.OPEN) {
if (player.getSocialStatus() == FRIEND
&& game.getStatus() == GameStatus.OPEN
&& !game.getFeaturedMod().equals(KnownFeaturedMod.LADDER_1V1.getTechnicalName())) {
eventBus.post(new FriendJoinedGameEvent(player, game));
}
}
Expand Down

0 comments on commit 7c6ea52

Please sign in to comment.