forked from ankidroid/Anki-Android
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
8602 - Finished fully migrating DeckPicker over to using registerForA…
…ctivityResults API instead of the deprecated startActivityForResult (ankidroid#14818) * - finished fully migrating DeckPicker over to using registerForActivityResult API instead of the deprecated startActivityForResult -- removed the last remaining request code dependencies in DeckPicker (PICK_APKG_FILE, PICK_CSV_FILE), and replaced with their equivalent ActivityResultLaunchers -- removed deprecated onActivityResult function from DeckPicker -- ImportFileSelectionFragment.openImportFilePicker needed a way to grab the ActivityResultLauncher from the activity, so I created 2 interfaces fetch the launcher, one for APKG imports and one for CSV imports. -- Created ImportFileType enum to signal to ImportFileSelectionFragment.openImportFilePicker which launcher it should look for * PR Review Updates: ImportFileSelectionFragment - changed multiple parameters flag back to false by default - changed interface names for more concision and clarity - added error logging if activity can't handle a particular import - removed aggregate interface, FileImportResultLauncherHolder DatabaseErrorDialog - removed redundant type check - fixed safe cast syntax typo DeckPicker - Aggregate interface FileImportResultLauncherHolder was removed, instead implementing ApkgImportResultLauncherProvider and CsvImportResultLauncherProvider separately
- Loading branch information
1 parent
c315448
commit bb439de
Showing
3 changed files
with
63 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters