Skip to content

Commit

Permalink
Renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
sulikdan committed Jan 11, 2025
1 parent fee15ce commit b3c993e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;

Expand All @@ -56,7 +55,7 @@ public class ReplayCardController extends VaultEntityCardController<Replay> {

private final UiService uiService;
private final ReplayService replayService;
private final ReplayWatchingService replayWatchingService;
private final ReplayWatchedService replayWatchedService;
private final TimeService timeService;
private final MapService mapService;
private final RatingService ratingService;
Expand Down Expand Up @@ -142,7 +141,7 @@ protected void onInitialize() {

replayWatchedLabel.visibleProperty().bind(replayWatchedLabel.textProperty().isNotEmpty());
replayWatchedLabel.textProperty().bind( entity.map(Replay::id).when(showing).map(
replayWatchingService::getReplayWatchedDateTime).map(timeService::asDate).map(date -> {
replayWatchedService::getReplayWatchedDateTime).map(timeService::asDate).map(date -> {
if( date != null ) {
replayTileRoot.setStyle("-fx-border-color: -card-watched-color;");
replayTileRoot.setStyle("-fx-border-width: 7;");
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/com/faforever/client/replay/ReplayService.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.faforever.client.notification.NotificationService;
import com.faforever.client.notification.PersistentNotification;
import com.faforever.client.preferences.DataPrefs;
import com.faforever.client.preferences.Preferences;
import com.faforever.client.task.TaskService;
import com.faforever.client.user.LoginService;
import com.faforever.client.util.FileSizeReader;
Expand Down Expand Up @@ -103,7 +102,7 @@ public class ReplayService {
private final ReplayMapper replayMapper;
private final DataPrefs dataPrefs;
private final ObjectFactory<ReplayDownloadTask> replayDownloadTaskFactory;
private final ReplayWatchingService replayWatchingService;
private final ReplayWatchedService replayWatchedService;

@VisibleForTesting
static Integer parseSupComVersion(ReplayDataParser parser) {
Expand Down Expand Up @@ -261,7 +260,7 @@ public void runReplay(Replay item) {
if (item.replayFile() != null) {
try {
runReplayFile(item.replayFile());
this.replayWatchingService.updateReplayWatchHistory(item.id());
this.replayWatchedService.updateReplayWatchHistory(item.id());
} catch (Exception e) {
log.error("Could not read replay file `{}`", item.replayFile(), e);
notificationService.addImmediateErrorNotification(e, "replay.couldNotParse");
Expand Down Expand Up @@ -336,7 +335,7 @@ private void runOnlineReplay(int replayId) {
downloadReplay(replayId).thenAccept((path) -> {
try {
runReplayFile(path);
this.replayWatchingService.updateReplayWatchHistory(replayId);
this.replayWatchedService.updateReplayWatchHistory(replayId);
} catch (IOException | CompressorException e) {
throw new RuntimeException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@Service
@Slf4j
@RequiredArgsConstructor
public class ReplayWatchingService {
public class ReplayWatchedService {

private final Preferences preferences;

Expand All @@ -22,7 +22,7 @@ boolean wasReplayWatched(Integer replayId) {

OffsetDateTime getReplayWatchedDateTime(Integer replayId) {
if (wasReplayWatched(replayId)) {
return preferences.getReplayHistory().getWatchedReplayMap().get(replayId);
return preferences.getReplayHistory().getWatchedReplayMap().get(replayId);
} else {
return null;
}
Expand Down

0 comments on commit b3c993e

Please sign in to comment.