-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Implement Drag & Drop Support for TEXT/CSV Files in DeckPicker #17865
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, cheers!
Is this feasible to test, or could a @NeedsTest
be added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to re-request approval if only minor changes are made, still good to go :)
@@ -99,6 +100,11 @@ object ImportUtils { | |||
fun isFileAValidDeck(fileName: String): Boolean = | |||
FileImporter.hasExtension(fileName, "apkg") || FileImporter.hasExtension(fileName, "colpkg") | |||
|
|||
fun isValidTextOrDataFile(fileName: String): Boolean = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we use mime types for that? They aren't used for apkg
and colpkg
because they don't have a mime type that is consistently recognized by Android, but that isn't the case for CSV files
Unit tests deferred for a faster merge; will be added later. |
Purpose / Description
Implement Drag&Drop TEXT file in DeckPicker
Fixes
Approach
Modify the drag-and-drop handler to check for
.txt
and.csv
files. If valid, call theonSelectedCsvForImport
function to handle the import process.How Has This Been Tested?
Physical Device ( Redmi Note 11 )
WhatsApp.Video.2025-01-25.at.1.46.32.AM.mp4
Checklist
Please, go through these checks before submitting the PR.