nfc_scene_file_select.c 816 B

12345678910111213141516171819202122232425
  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(nfc_file_select(nfc->dev)) {
  8. scene_manager_set_scene_state(nfc->scene_manager, NfcSceneSavedMenu, 0);
  9. scene_manager_next_scene(nfc->scene_manager, NfcSceneSavedMenu);
  10. } else {
  11. scene_manager_search_and_switch_to_previous_scene(nfc->scene_manager, NfcSceneStart);
  12. }
  13. nfc_device_set_loading_callback(nfc->dev, NULL, nfc);
  14. }
  15. bool nfc_scene_file_select_on_event(void* context, SceneManagerEvent event) {
  16. UNUSED(context);
  17. UNUSED(event);
  18. return false;
  19. }
  20. void nfc_scene_file_select_on_exit(void* context) {
  21. UNUSED(context);
  22. }