Code cleanup
This commit is contained in:
parent
e14296bc1b
commit
41e2e5ce54
|
@ -91,10 +91,7 @@ public class ThumbCell extends StackPane {
|
|||
private boolean mouseHovering = false;
|
||||
private boolean recording = false;
|
||||
private static ExecutorService imageLoadingThreadPool = Executors.newFixedThreadPool(30);
|
||||
private static Cache<String, int[]> resolutionCache = CacheBuilder.newBuilder()
|
||||
.expireAfterAccess(4, TimeUnit.HOURS)
|
||||
.maximumSize(1000)
|
||||
.build();
|
||||
private static Cache<String, int[]> resolutionCache = CacheBuilder.newBuilder().expireAfterAccess(4, TimeUnit.HOURS).maximumSize(1000).build();
|
||||
private ThumbOverviewTab parent;
|
||||
|
||||
public ThumbCell(ThumbOverviewTab parent, Model model, Recorder recorder) {
|
||||
|
@ -223,11 +220,7 @@ public class ThumbCell extends StackPane {
|
|||
previewTrigger.setOpacity(.8);
|
||||
previewTrigger.setMaxSize(s, s);
|
||||
|
||||
Polygon play = new Polygon(
|
||||
16, 8,
|
||||
26, 15,
|
||||
16, 22
|
||||
);
|
||||
Polygon play = new Polygon(16, 8, 26, 15, 16, 22);
|
||||
StackPane.setMargin(play, new Insets(0, 0, 0, 3));
|
||||
play.setStyle("-fx-background-color: black;");
|
||||
previewTrigger.getChildren().add(play);
|
||||
|
@ -357,10 +350,7 @@ public class ThumbCell extends StackPane {
|
|||
boolean updateThumbs = Config.getInstance().getSettings().updateThumbnails;
|
||||
if (updateThumbs || iv.getImage() == null) {
|
||||
imageLoadingThreadPool.submit(() -> {
|
||||
Request req = new Request.Builder()
|
||||
.url(url)
|
||||
.header(USER_AGENT, Config.getInstance().getSettings().httpUserAgent)
|
||||
.build();
|
||||
Request req = new Request.Builder().url(url).header(USER_AGENT, Config.getInstance().getSettings().httpUserAgent).build();
|
||||
try (Response resp = CamrecApplication.httpClient.execute(req)) {
|
||||
if (resp.isSuccessful()) {
|
||||
Image img = new Image(resp.body().byteStream(), 0, 360, true, true);
|
||||
|
|
Loading…
Reference in New Issue