fix: bug fixes, new button for carousel preview
This commit is contained in:
parent
2073c4a569
commit
9b87902afe
|
@ -38,6 +38,7 @@ import javax.swing.plaf.basic.ComboPopup;
|
|||
|
||||
import org.jdesktop.swingx.JXSearchField;
|
||||
|
||||
import se.lantz.gui.carousel.CarouselPreviewDialog;
|
||||
import se.lantz.gui.gameview.GameViewManager;
|
||||
import se.lantz.model.GameListModel;
|
||||
import se.lantz.model.MainViewModel;
|
||||
|
@ -53,6 +54,7 @@ public class ListPanel extends JPanel
|
|||
private JComboBox<GameView> listViewComboBox;
|
||||
private JPanel viewInfoPanel;
|
||||
private JLabel viewInfoLabel;
|
||||
private JButton previewButton;
|
||||
private GameViewManager gameViewManager;
|
||||
private MainViewModel uiModel;
|
||||
private MainPanel mainPanel;
|
||||
|
@ -61,6 +63,8 @@ public class ListPanel extends JPanel
|
|||
private boolean delayDetailsUpdate = false;
|
||||
private boolean pageButtonPressed = false;
|
||||
|
||||
private CarouselPreviewDialog carouselPreviewDialog;
|
||||
|
||||
private boolean filterEnabled = true;
|
||||
|
||||
private boolean isFiltering = false;
|
||||
|
@ -179,6 +183,11 @@ public class ListPanel extends JPanel
|
|||
gbc_viewInfoPanel.gridx = 0;
|
||||
gbc_viewInfoPanel.gridy = 3;
|
||||
add(getViewInfoPanel(), gbc_viewInfoPanel);
|
||||
|
||||
uiModel.addSaveChangeListener(e -> {
|
||||
|
||||
previewButton.setEnabled(!uiModel.isNewGameSelected());
|
||||
});
|
||||
}
|
||||
|
||||
private JPanel getListViewPanel()
|
||||
|
@ -429,6 +438,14 @@ public class ListPanel extends JPanel
|
|||
gbc_viewInfoLabel.gridx = 1;
|
||||
gbc_viewInfoLabel.gridy = 0;
|
||||
viewInfoPanel.add(getViewInfoLabel(), gbc_viewInfoLabel);
|
||||
|
||||
GridBagConstraints gbc_carouselPreviewButton = new GridBagConstraints();
|
||||
gbc_carouselPreviewButton.weightx = 0.0;
|
||||
gbc_carouselPreviewButton.insets = new Insets(3, 5, 5, 5);
|
||||
gbc_carouselPreviewButton.anchor = GridBagConstraints.WEST;
|
||||
gbc_carouselPreviewButton.gridx = 0;
|
||||
gbc_carouselPreviewButton.gridy = 0;
|
||||
viewInfoPanel.add(getPreviewButton(), gbc_carouselPreviewButton);
|
||||
}
|
||||
return viewInfoPanel;
|
||||
}
|
||||
|
@ -441,6 +458,16 @@ public class ListPanel extends JPanel
|
|||
}
|
||||
return viewInfoLabel;
|
||||
}
|
||||
|
||||
private JButton getPreviewButton()
|
||||
{
|
||||
if (previewButton == null)
|
||||
{
|
||||
previewButton = new JButton("Carousel preview");
|
||||
previewButton.addActionListener(e -> showCarouselPreview());
|
||||
}
|
||||
return previewButton;
|
||||
}
|
||||
|
||||
private JScrollPane getListScrollPane()
|
||||
{
|
||||
|
@ -687,14 +714,8 @@ public class ListPanel extends JPanel
|
|||
public void toggleFavorite()
|
||||
{
|
||||
if (!uiModel.isDataChanged())
|
||||
{
|
||||
for (GameListData glData : list.getSelectedValuesList())
|
||||
{
|
||||
if (!glData.isInfoSlot())
|
||||
{
|
||||
uiModel.toggleFavorite(glData);
|
||||
}
|
||||
}
|
||||
{
|
||||
uiModel.toggleFavorite(list.getSelectedValuesList());
|
||||
mainPanel.repaintAfterModifications();
|
||||
}
|
||||
}
|
||||
|
@ -703,13 +724,7 @@ public class ListPanel extends JPanel
|
|||
{
|
||||
if (!uiModel.isDataChanged())
|
||||
{
|
||||
for (GameListData glData : list.getSelectedValuesList())
|
||||
{
|
||||
if (!glData.isInfoSlot())
|
||||
{
|
||||
uiModel.toggleFavorite2(glData);
|
||||
}
|
||||
}
|
||||
uiModel.toggleFavorite2(list.getSelectedValuesList());
|
||||
mainPanel.repaintAfterModifications();
|
||||
}
|
||||
}
|
||||
|
@ -718,13 +733,7 @@ public class ListPanel extends JPanel
|
|||
{
|
||||
if (!uiModel.isDataChanged())
|
||||
{
|
||||
for (GameListData glData : list.getSelectedValuesList())
|
||||
{
|
||||
if (!glData.isInfoSlot())
|
||||
{
|
||||
uiModel.toggleFavorite3(glData);
|
||||
}
|
||||
}
|
||||
uiModel.toggleFavorite3(list.getSelectedValuesList());
|
||||
mainPanel.repaintAfterModifications();
|
||||
}
|
||||
}
|
||||
|
@ -733,13 +742,7 @@ public class ListPanel extends JPanel
|
|||
{
|
||||
if (!uiModel.isDataChanged())
|
||||
{
|
||||
for (GameListData glData : list.getSelectedValuesList())
|
||||
{
|
||||
if (!glData.isInfoSlot())
|
||||
{
|
||||
uiModel.toggleFavorite4(glData);
|
||||
}
|
||||
}
|
||||
uiModel.toggleFavorite4(list.getSelectedValuesList());
|
||||
mainPanel.repaintAfterModifications();
|
||||
}
|
||||
}
|
||||
|
@ -748,13 +751,7 @@ public class ListPanel extends JPanel
|
|||
{
|
||||
if (!uiModel.isDataChanged())
|
||||
{
|
||||
for (GameListData glData : list.getSelectedValuesList())
|
||||
{
|
||||
if (!glData.isInfoSlot())
|
||||
{
|
||||
uiModel.toggleFavorite5(glData);
|
||||
}
|
||||
}
|
||||
uiModel.toggleFavorite5(list.getSelectedValuesList());
|
||||
mainPanel.repaintAfterModifications();
|
||||
}
|
||||
}
|
||||
|
@ -763,13 +760,7 @@ public class ListPanel extends JPanel
|
|||
{
|
||||
if (!uiModel.isDataChanged())
|
||||
{
|
||||
for (GameListData glData : list.getSelectedValuesList())
|
||||
{
|
||||
if (!glData.isInfoSlot())
|
||||
{
|
||||
uiModel.toggleFavorite6(glData);
|
||||
}
|
||||
}
|
||||
uiModel.toggleFavorite6(list.getSelectedValuesList());
|
||||
mainPanel.repaintAfterModifications();
|
||||
}
|
||||
}
|
||||
|
@ -778,13 +769,7 @@ public class ListPanel extends JPanel
|
|||
{
|
||||
if (!uiModel.isDataChanged())
|
||||
{
|
||||
for (GameListData glData : list.getSelectedValuesList())
|
||||
{
|
||||
if (!glData.isInfoSlot())
|
||||
{
|
||||
uiModel.toggleFavorite7(glData);
|
||||
}
|
||||
}
|
||||
uiModel.toggleFavorite7(list.getSelectedValuesList());
|
||||
mainPanel.repaintAfterModifications();
|
||||
}
|
||||
}
|
||||
|
@ -793,13 +778,7 @@ public class ListPanel extends JPanel
|
|||
{
|
||||
if (!uiModel.isDataChanged())
|
||||
{
|
||||
for (GameListData glData : list.getSelectedValuesList())
|
||||
{
|
||||
if (!glData.isInfoSlot())
|
||||
{
|
||||
uiModel.toggleFavorite8(glData);
|
||||
}
|
||||
}
|
||||
uiModel.toggleFavorite8(list.getSelectedValuesList());
|
||||
mainPanel.repaintAfterModifications();
|
||||
}
|
||||
}
|
||||
|
@ -808,13 +787,7 @@ public class ListPanel extends JPanel
|
|||
{
|
||||
if (!uiModel.isDataChanged())
|
||||
{
|
||||
for (GameListData glData : list.getSelectedValuesList())
|
||||
{
|
||||
if (!glData.isInfoSlot())
|
||||
{
|
||||
uiModel.toggleFavorite9(glData);
|
||||
}
|
||||
}
|
||||
uiModel.toggleFavorite9(list.getSelectedValuesList());
|
||||
mainPanel.repaintAfterModifications();
|
||||
}
|
||||
}
|
||||
|
@ -823,13 +796,7 @@ public class ListPanel extends JPanel
|
|||
{
|
||||
if (!uiModel.isDataChanged())
|
||||
{
|
||||
for (GameListData glData : list.getSelectedValuesList())
|
||||
{
|
||||
if (!glData.isInfoSlot())
|
||||
{
|
||||
uiModel.toggleFavorite10(glData);
|
||||
}
|
||||
}
|
||||
uiModel.toggleFavorite10(list.getSelectedValuesList());
|
||||
mainPanel.repaintAfterModifications();
|
||||
}
|
||||
}
|
||||
|
@ -862,4 +829,27 @@ public class ListPanel extends JPanel
|
|||
getList().setSelectedValue(selectedData, true);
|
||||
});
|
||||
}
|
||||
|
||||
public void showCarouselPreview()
|
||||
{
|
||||
if (this.uiModel.getCurrentGameViewGameCount() < 10)
|
||||
{
|
||||
String message = "You can only preview the Carousel for gamelists that contain a minimum of 10 games.";
|
||||
JOptionPane.showMessageDialog(MainWindow.getInstance(), message, "Carousel preview", JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (carouselPreviewDialog == null || !carouselPreviewDialog.isShowing())
|
||||
{
|
||||
carouselPreviewDialog = new CarouselPreviewDialog(MainWindow.getInstance(), this.uiModel);
|
||||
carouselPreviewDialog.pack();
|
||||
carouselPreviewDialog.setLocationRelativeTo(MainWindow.getInstance());
|
||||
carouselPreviewDialog.showDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
carouselPreviewDialog.requestFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -162,7 +162,6 @@ public class MenuManager
|
|||
private ScummVMModeInstallManager installScummVMManager;
|
||||
private MainWindow mainWindow;
|
||||
private int currentFavoritesCount = 10;
|
||||
private CarouselPreviewDialog carouselPreviewDialog;
|
||||
|
||||
public MenuManager(final MainViewModel uiModel, MainWindow mainWindow)
|
||||
{
|
||||
|
@ -451,7 +450,7 @@ public class MenuManager
|
|||
KeyStroke keyStrokeCarouselPreview = KeyStroke.getKeyStroke(KeyEvent.VK_W, InputEvent.CTRL_DOWN_MASK);
|
||||
carouselPreviewItem.setAccelerator(keyStrokeCarouselPreview);
|
||||
carouselPreviewItem.setMnemonic('W');
|
||||
carouselPreviewItem.addActionListener(e -> showCarouselPreview());
|
||||
carouselPreviewItem.addActionListener(e -> mainWindow.getMainPanel().getListPanel().showCarouselPreview());
|
||||
return carouselPreviewItem;
|
||||
}
|
||||
|
||||
|
@ -1725,27 +1724,4 @@ public class MenuManager
|
|||
{
|
||||
installPCUAEManager.checkForNewVersionAtStartup();
|
||||
}
|
||||
|
||||
private void showCarouselPreview()
|
||||
{
|
||||
if (this.uiModel.getCurrentGameViewGameCount() < 10)
|
||||
{
|
||||
String message = "You can only preview the Carousel for gamelists that contain a minimum of 10 games.";
|
||||
JOptionPane.showMessageDialog(this.mainWindow, message, "Carousel preview", JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (carouselPreviewDialog == null || !carouselPreviewDialog.isShowing())
|
||||
{
|
||||
carouselPreviewDialog = new CarouselPreviewDialog(this.mainWindow, this.uiModel);
|
||||
carouselPreviewDialog.pack();
|
||||
carouselPreviewDialog.setLocationRelativeTo(MainWindow.getInstance());
|
||||
carouselPreviewDialog.showDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
carouselPreviewDialog.requestFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public class CarouselPreviewDialog extends BaseDialog
|
|||
if (!Beans.isDesignTime())
|
||||
{
|
||||
uiModel.addPropertyChangeListener("selectedGamelistView", e -> modelChanged());
|
||||
model.addPropertyChangeListener(CarouselPreviewModel.CLOSE_PREVIEW, e -> getOkButton().doClick());
|
||||
model.addPropertyChangeListener(CarouselPreviewModel.CLOSE_PREVIEW, e -> dispose());
|
||||
//trigger once at startup
|
||||
modelChanged();
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import java.beans.PropertyChangeEvent;
|
|||
import java.beans.PropertyChangeListener;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -349,7 +350,7 @@ public class MainViewModel extends AbstractModel
|
|||
List<GameListData> gamesList = dbConnector.fetchGamesByView(gameView);
|
||||
return readGameDetailsForExport(worker, gamesList);
|
||||
}
|
||||
|
||||
|
||||
public int getCurrentGameViewGameCount()
|
||||
{
|
||||
return dbConnector.fetchGamesByView(getSelectedGameView()).size();
|
||||
|
@ -361,25 +362,25 @@ public class MainViewModel extends AbstractModel
|
|||
GameListData current = this.selectedData;
|
||||
List<GameListData> gamesInView = dbConnector.fetchGamesByView(getSelectedGameView());
|
||||
int selectedGameIndex = gamesInView.indexOf(current);
|
||||
|
||||
|
||||
if (selectedGameIndex < 0)
|
||||
{
|
||||
return returnList;
|
||||
}
|
||||
|
||||
|
||||
int start = selectedGameIndex - 4;
|
||||
int end = selectedGameIndex + 6;
|
||||
|
||||
List<GameListData> subList = new ArrayList<>(
|
||||
gamesInView.subList(start < 0 ? 0 : start, end > (gamesInView.size() - 1) ? gamesInView.size() : end));
|
||||
List<GameListData> subList = new ArrayList<>(gamesInView
|
||||
.subList(start < 0 ? 0 : start, end > (gamesInView.size() - 1) ? gamesInView.size() : end));
|
||||
|
||||
//Add to beginning if negative
|
||||
for (int i = 0; i < -start; i++)
|
||||
{
|
||||
int listIndex = gamesInView.size()- 1 - i;
|
||||
int listIndex = gamesInView.size() - 1 - i;
|
||||
subList.add(0, gamesInView.get(listIndex));
|
||||
}
|
||||
|
||||
|
||||
//Add at end if larger than list size
|
||||
for (int i = 0; i < (end - gamesInView.size()); i++)
|
||||
{
|
||||
|
@ -393,7 +394,7 @@ public class MainViewModel extends AbstractModel
|
|||
}
|
||||
return returnList;
|
||||
}
|
||||
|
||||
|
||||
public GameDetails getNextGameDetailsWhenScrolling(boolean scrollingRight)
|
||||
{
|
||||
GameListData current = this.selectedData;
|
||||
|
@ -403,7 +404,7 @@ public class MainViewModel extends AbstractModel
|
|||
if (scrollingRight)
|
||||
{
|
||||
indexToAdd = selectedGameIndex + 5;
|
||||
if (indexToAdd > gamesInView.size()-1)
|
||||
if (indexToAdd > gamesInView.size() - 1)
|
||||
{
|
||||
indexToAdd = indexToAdd - gamesInView.size();
|
||||
}
|
||||
|
@ -413,7 +414,7 @@ public class MainViewModel extends AbstractModel
|
|||
indexToAdd = selectedGameIndex - 4;
|
||||
if (indexToAdd < 0)
|
||||
{
|
||||
indexToAdd = gamesInView.size()-1 + indexToAdd;
|
||||
indexToAdd = gamesInView.size() - 1 + indexToAdd;
|
||||
}
|
||||
}
|
||||
return dbConnector.getGameDetails(gamesInView.get(indexToAdd).getGameId());
|
||||
|
@ -727,43 +728,43 @@ public class MainViewModel extends AbstractModel
|
|||
selectedData.setGameId(currentGameId);
|
||||
if (getSelectedGameView().getGameViewId() == GameView.FAVORITES_ID)
|
||||
{
|
||||
toggleFavorite(selectedData);
|
||||
toggleFavorite(Arrays.asList(selectedData));
|
||||
}
|
||||
else if (getSelectedGameView().getGameViewId() == GameView.FAVORITES_2_ID)
|
||||
{
|
||||
toggleFavorite2(selectedData);
|
||||
toggleFavorite2(Arrays.asList(selectedData));
|
||||
}
|
||||
else if (getSelectedGameView().getGameViewId() == GameView.FAVORITES_3_ID)
|
||||
{
|
||||
toggleFavorite3(selectedData);
|
||||
toggleFavorite3(Arrays.asList(selectedData));
|
||||
}
|
||||
else if (getSelectedGameView().getGameViewId() == GameView.FAVORITES_4_ID)
|
||||
{
|
||||
toggleFavorite4(selectedData);
|
||||
toggleFavorite4(Arrays.asList(selectedData));
|
||||
}
|
||||
else if (getSelectedGameView().getGameViewId() == GameView.FAVORITES_5_ID)
|
||||
{
|
||||
toggleFavorite5(selectedData);
|
||||
toggleFavorite5(Arrays.asList(selectedData));
|
||||
}
|
||||
else if (getSelectedGameView().getGameViewId() == GameView.FAVORITES_6_ID)
|
||||
{
|
||||
toggleFavorite6(selectedData);
|
||||
toggleFavorite6(Arrays.asList(selectedData));
|
||||
}
|
||||
else if (getSelectedGameView().getGameViewId() == GameView.FAVORITES_7_ID)
|
||||
{
|
||||
toggleFavorite7(selectedData);
|
||||
toggleFavorite7(Arrays.asList(selectedData));
|
||||
}
|
||||
else if (getSelectedGameView().getGameViewId() == GameView.FAVORITES_8_ID)
|
||||
{
|
||||
toggleFavorite8(selectedData);
|
||||
toggleFavorite8(Arrays.asList(selectedData));
|
||||
}
|
||||
else if (getSelectedGameView().getGameViewId() == GameView.FAVORITES_9_ID)
|
||||
{
|
||||
toggleFavorite9(selectedData);
|
||||
toggleFavorite9(Arrays.asList(selectedData));
|
||||
}
|
||||
else if (getSelectedGameView().getGameViewId() == GameView.FAVORITES_10_ID)
|
||||
{
|
||||
toggleFavorite10(selectedData);
|
||||
toggleFavorite10(Arrays.asList(selectedData));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -792,7 +793,7 @@ public class MainViewModel extends AbstractModel
|
|||
//Update currentGameDetails
|
||||
this.currentGameDetails = dbConnector.getGameDetails(selectedData.getGameId());
|
||||
//Update data in list model
|
||||
// this.gameListModel.updateSavedGame(selectedData);
|
||||
// this.gameListModel.updateSavedGame(selectedData);
|
||||
this.notifyChange("gameSaved");
|
||||
return true;
|
||||
}
|
||||
|
@ -1008,52 +1009,52 @@ public class MainViewModel extends AbstractModel
|
|||
}
|
||||
}
|
||||
|
||||
public void toggleFavorite(GameListData data)
|
||||
public void toggleFavorite(List<GameListData> data)
|
||||
{
|
||||
favorites1Count = toggleFavorite(data, 1, favorites1Count, favorites1View);
|
||||
}
|
||||
|
||||
public void toggleFavorite2(GameListData data)
|
||||
public void toggleFavorite2(List<GameListData> data)
|
||||
{
|
||||
favorites2Count = toggleFavorite(data, 2, favorites2Count, favorites2View);
|
||||
}
|
||||
|
||||
public void toggleFavorite3(GameListData data)
|
||||
public void toggleFavorite3(List<GameListData> data)
|
||||
{
|
||||
favorites3Count = toggleFavorite(data, 3, favorites3Count, favorites3View);
|
||||
}
|
||||
|
||||
public void toggleFavorite4(GameListData data)
|
||||
public void toggleFavorite4(List<GameListData> data)
|
||||
{
|
||||
favorites4Count = toggleFavorite(data, 4, favorites4Count, favorites4View);
|
||||
}
|
||||
|
||||
public void toggleFavorite5(GameListData data)
|
||||
public void toggleFavorite5(List<GameListData> data)
|
||||
{
|
||||
favorites5Count = toggleFavorite(data, 5, favorites5Count, favorites5View);
|
||||
}
|
||||
|
||||
public void toggleFavorite6(GameListData data)
|
||||
public void toggleFavorite6(List<GameListData> data)
|
||||
{
|
||||
favorites6Count = toggleFavorite(data, 6, favorites6Count, favorites6View);
|
||||
}
|
||||
|
||||
public void toggleFavorite7(GameListData data)
|
||||
public void toggleFavorite7(List<GameListData> data)
|
||||
{
|
||||
favorites7Count = toggleFavorite(data, 7, favorites7Count, favorites7View);
|
||||
}
|
||||
|
||||
public void toggleFavorite8(GameListData data)
|
||||
public void toggleFavorite8(List<GameListData> data)
|
||||
{
|
||||
favorites8Count = toggleFavorite(data, 8, favorites8Count, favorites8View);
|
||||
}
|
||||
|
||||
public void toggleFavorite9(GameListData data)
|
||||
public void toggleFavorite9(List<GameListData> data)
|
||||
{
|
||||
favorites9Count = toggleFavorite(data, 9, favorites9Count, favorites9View);
|
||||
}
|
||||
|
||||
public void toggleFavorite10(GameListData data)
|
||||
public void toggleFavorite10(List<GameListData> data)
|
||||
{
|
||||
favorites10Count = toggleFavorite(data, 10, favorites10Count, favorites10View);
|
||||
}
|
||||
|
@ -1075,25 +1076,33 @@ public class MainViewModel extends AbstractModel
|
|||
saveData();
|
||||
}
|
||||
|
||||
private int toggleFavorite(GameListData data, int favoritesNumber, int favoritesCount, GameView favoritesView)
|
||||
private int toggleFavorite(List<GameListData> data, int favoritesNumber, int favoritesCount, GameView favoritesView)
|
||||
{
|
||||
if (data != null && !data.getGameId().isEmpty())
|
||||
for (GameListData gameListData : data)
|
||||
{
|
||||
int previousFavorite = data.getFavorite();
|
||||
dbConnector.toggleFavorite(data.getGameId(), previousFavorite, favoritesNumber);
|
||||
data.toggleFavorite(favoritesNumber);
|
||||
if (data.isFavorite())
|
||||
if (!gameListData.isInfoSlot() && !gameListData.getGameId().isEmpty())
|
||||
{
|
||||
favoritesView.setGameCount(++favoritesCount);
|
||||
reduceFavoriteCount(previousFavorite);
|
||||
}
|
||||
else
|
||||
{
|
||||
favoritesView.setGameCount(--favoritesCount);
|
||||
int previousFavorite = gameListData.getFavorite();
|
||||
dbConnector.toggleFavorite(gameListData.getGameId(), previousFavorite, favoritesNumber);
|
||||
gameListData.toggleFavorite(favoritesNumber);
|
||||
if (gameListData.isFavorite())
|
||||
{
|
||||
favoritesView.setGameCount(++favoritesCount);
|
||||
reduceFavoriteCount(previousFavorite);
|
||||
}
|
||||
else
|
||||
{
|
||||
favoritesView.setGameCount(--favoritesCount);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (!data.isEmpty())
|
||||
{
|
||||
gameListModel.notifyChange();
|
||||
|
||||
if (gameViewModel.getSelectedItem().equals(favoritesView)) {
|
||||
|
||||
if (((GameView) gameViewModel.getSelectedItem()).isFavorite())
|
||||
{
|
||||
this.reloadCurrentGameView();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -306,6 +306,11 @@ public class GameView implements Comparable
|
|||
{
|
||||
return data.replaceAll("'", "''");
|
||||
}
|
||||
|
||||
public boolean isFavorite()
|
||||
{
|
||||
return gameViewId < -1;
|
||||
}
|
||||
|
||||
public int getGameViewId()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue