refactor options
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
|
||||
package itdelatrisu.opsu.beatmap;
|
||||
|
||||
import itdelatrisu.opsu.Options;
|
||||
import itdelatrisu.opsu.Utils;
|
||||
import itdelatrisu.opsu.audio.MusicController;
|
||||
import itdelatrisu.opsu.db.BeatmapDB;
|
||||
@@ -210,7 +209,7 @@ public class BeatmapSetList {
|
||||
BeatmapDB.delete(dir.getName());
|
||||
|
||||
// delete the associated directory
|
||||
BeatmapWatchService ws = (Options.isWatchServiceEnabled()) ? BeatmapWatchService.get() : null;
|
||||
BeatmapWatchService ws = BeatmapWatchService.get();
|
||||
if (ws != null)
|
||||
ws.pause();
|
||||
try {
|
||||
@@ -265,9 +264,10 @@ public class BeatmapSetList {
|
||||
BeatmapDB.delete(file.getParentFile().getName(), file.getName());
|
||||
|
||||
// delete the associated file
|
||||
BeatmapWatchService ws = (Options.isWatchServiceEnabled()) ? BeatmapWatchService.get() : null;
|
||||
if (ws != null)
|
||||
BeatmapWatchService ws = BeatmapWatchService.get();
|
||||
if (ws != null) {
|
||||
ws.pause();
|
||||
}
|
||||
try {
|
||||
Utils.deleteToTrash(file);
|
||||
} catch (IOException e) {
|
||||
|
||||
Reference in New Issue
Block a user