Skip to content

Conversation

@lilacLunatic
Copy link
Contributor

@lilacLunatic lilacLunatic commented Nov 5, 2025

TODO:

  • Unfavorite cards/clear favorites
  • Include some way for the user to view their favorite editions (leaving that as a maybe)

Copy link
Member

@JayDi85 JayDi85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need logic change. Also don’t forget about PR detail descriptions (screenshots, related issues refs, what you done, what left todo, are you planning to improve that, etc).

MageFrame.getDesktop().setCursor(new Cursor(Cursor.WAIT_CURSOR));
try {
DeckImporter importer = DeckImporter.getDeckImporter(file.getPath());
importer.setPreferences(MageFrame.getPreferences());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must change the logic: import original cards, press right click to add/remove/apply favorite sets/cards versions. Do not modify import code with hidden features.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not modify import code with hidden features.
Could you clarify this? If this is about passing preferences as a field to the importer, I could not figure out a way to add favorite logic to the import process without doing that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Import feature must import original cards and do not modify it by hidden logic without user notification/interaction.

Deck editor has full access to deck and cards data, so you can modify it from a deck editor, no needs in import code. Look for code example in oldVersionDeck method.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UX logic for a user:

  • open/import/construct original deck;
  • press special button/menu like “Replace all cards by favorite versions”;
  • check and save final result;

}

private void markAsFavorite() {
Collection<CardView> toFave = dragCardList();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must have menu to add single card to favorite or whole set to favorite.


void duplicateCards(Collection<CardView> cards);

void markCardsAsFavorite(Collection<CardView> cards);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must be renamed to FavoriteImage here and other places, there are plans to add favorite cards list with fast access to it from deck editor. It’s not same as favorite images.

}

public static void setFavoriteCard(String cardName, String cardNumber, String setCode) {
prefs().put(prefixedKey(KEY_FAVORITE_CARD_PREFIX, cardName), setCode + "##" + cardNumber);
Copy link
Member

@JayDi85 JayDi85 Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t like to use a java prefs to store user defined data. There are popular bugs with settings/data lost, e.g. after system java update. Current logic with subfolder and one record per card is fine anyway.

p.s. Images folder with additional text files can be more useful in the future like favorite_image_sets.txt and favorite_image_cards.txt And it will allow easy review and edit for a users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants