Code refactoring

master
Dmitry Isaenko 2019-12-07 10:02:40 +03:00
parent 2735c8bfa7
commit 2fbdbc805f
2 changed files with 7 additions and 18 deletions

View File

@ -33,33 +33,25 @@ public class AboutController implements Initializable {
private void gitHubUrl(){
try {
hostServices.showDocument("https://github.com/developersu/mplayer4anime");
} catch (Exception e){
e.printStackTrace();
}
} catch (Exception ignored){ }
}
@FXML
private void bloggerUrl(){
try {
hostServices.showDocument("https://developersu.blogspot.com/search/label/mplayer4anime");
} catch (Exception e){
e.printStackTrace();
}
} catch (Exception ignored){ }
}
@FXML
private void libGSON(){
try {
hostServices.showDocument("https://github.com/google/gson");
} catch (Exception e){
e.printStackTrace();
}
} catch (Exception ignored){ }
}
@FXML
private void iconsMaterial(){
try {
hostServices.showDocument("https://materialdesignicons.com/");
} catch (Exception e){
e.printStackTrace();
}
} catch (Exception ignored){ }
}
//TODO note icons meaterial design

View File

@ -329,12 +329,9 @@ public class Controller implements Initializable {
menuItem.setText(fileNameOnly);
menuItem.setUserData(playlistPath);
menuItem.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent actionEvent) {
JsonStorage jsonStorage = Playlists.ReadByPath(resourceBundle, new File(playlistPath));
setAllLists(jsonStorage);
}
menuItem.setOnAction(actionEvent -> {
JsonStorage jsonStorage = Playlists.ReadByPath(resourceBundle, new File(playlistPath));
setAllLists(jsonStorage);
});
// Limit list to 13 elements (2 in the end are separator and clear button)
if (recentlyOpenedMenu.getItems().size() >= 11)