nfc_scene_file_select.c 937 B

12345678910111213141516171819202122232425262728
  1. #include "../nfc_i.h"
  2. #include "nfc/nfc_device.h"
  3. void nfc_scene_file_select_on_enter(void* context) {
  4. Nfc* nfc = context;
  5. // Process file_select return
  6. nfc_device_set_loading_callback(nfc->dev, nfc_show_loading_popup, nfc);
  7. if(!furi_string_size(nfc->dev->load_path)) {
  8. furi_string_set_str(nfc->dev->load_path, NFC_APP_FOLDER);
  9. }
  10. if(nfc_file_select(nfc->dev)) {
  11. scene_manager_set_scene_state(nfc->scene_manager, NfcSceneSavedMenu, 0);
  12. scene_manager_next_scene(nfc->scene_manager, NfcSceneSavedMenu);
  13. } else {
  14. scene_manager_search_and_switch_to_previous_scene(nfc->scene_manager, NfcSceneStart);
  15. }
  16. nfc_device_set_loading_callback(nfc->dev, NULL, nfc);
  17. }
  18. bool nfc_scene_file_select_on_event(void* context, SceneManagerEvent event) {
  19. UNUSED(context);
  20. UNUSED(event);
  21. return false;
  22. }
  23. void nfc_scene_file_select_on_exit(void* context) {
  24. UNUSED(context);
  25. }