Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move/Copy Cards Between Lists #513

Open
AEFeinstein opened this issue Apr 11, 2020 · 3 comments
Open

Move/Copy Cards Between Lists #513

AEFeinstein opened this issue Apr 11, 2020 · 3 comments

Comments

@AEFeinstein
Copy link
Owner

Familiar has a number of lists of cards which can each be represented as a List<MtgCard>:

  • Wishlist
  • Each deck
  • Each trade, both left and right sides

Cards should be able to be moved between two arbitrary lists. The UI for this will appear when long-pressing one or multiple cards. This UI is currently defined in action_mode_menu.xml and decklist_select_menu.xml, and currently allows deletion of cards. These two files should be unified with buttons for "move to" and "copy to" other lists.

When clicked, the buttons should display a dialog list of other lists (all decks, all trades, and the wishlist). If a trade is selected as the destination, it should display another dialog asking if the destination is the left or the right of the trade. Once a destination is selected, the cards should be moved or copied.

This kind of already exists with deck_import_selected, so that should be removed. Look there for where to put the button logic.

Lists of decks and trades can be gotten with the following. There is only one wishlist.

  • final String[] tradeNames = getFiles(TradeFragment.TRADE_EXTENSION);
  • final String[] deckNames = getFiles(DecklistFragment.DECK_EXTENSION);

For modification, decklists and wishlists can be read with the following. There is currently no helper to read trades, it's all done in loadTrade().

  • DecklistHelpers.ReadDecklist()
  • WishlistHelpers.ReadWishlist()
@TeamLinux01
Copy link

I don't know if this would be under scope or not for this feature, but being able to export/import cards into these lists from a text file would also be nice.

The other day I wanted to import a deck into the Wishlist to see the price of the deck, but found out you can only "Share Wishlist".

Thank you for all your hard work.

@AEFeinstein
Copy link
Owner Author

Android has made working with actual files so difficult recently, that I have no desire to do file based import/export. Look up Scoped Storage and be sad. "Share Wishlist" can be copied to a text file, or email, or note, or whatever, so that's good enough I think. For import, if anything it would be a big EditText where you could paste in a list and have it parsed. That's out of scope for this ticket, but potentially doable.

@TeamLinux01
Copy link

Android has made working with actual files so difficult recently, that I have no desire to do file based import/export. Look up Scoped Storage and be sad. "Share Wishlist" can be copied to a text file, or email, or note, or whatever, so that's good enough I think. For import, if anything it would be a big EditText where you could paste in a list and have it parsed. That's out of scope for this ticket, but potentially doable.

Thank you for the quick reply.
I can see how Scoped Storage could be a problem; getting the extra permissions for the text file or having the user put the file in a special folder would be annoying with UX in mind.

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

No branches or pull requests

2 participants