flip_social.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #include "flip_social.h"
  2. FlipSocialModel *flip_social_friends = NULL; // Store the friends
  3. FlipSocialModel2 *flip_social_message_users = NULL; // Store the users that have sent messages to the logged in user
  4. FlipSocialModel *flip_social_explore = NULL; // Store the users to explore
  5. FlipSocialMessage *flip_social_messages = NULL; // Store the messages between the logged in user and the selected user
  6. FlipSocialFeedMini *flip_feed_info = NULL; // Store the feed info
  7. FlipSocialFeedItem *flip_feed_item = NULL; // Store a feed item
  8. FlipSocialApp *app_instance = NULL;
  9. bool flip_social_sent_login_request = false;
  10. bool flip_social_sent_register_request = false;
  11. bool flip_social_login_success = false;
  12. bool flip_social_register_success = false;
  13. bool flip_social_dialog_shown = false;
  14. bool flip_social_dialog_stop = false;
  15. bool flip_social_send_message = false;
  16. char *selected_message = NULL;
  17. char auth_headers[256] = {0};
  18. char *flip_social_feed_type[] = {"Global", "Friends"};
  19. uint8_t flip_social_feed_type_index = 0;
  20. char *flip_social_notification_type[] = {"OFF", "ON"};
  21. uint8_t flip_social_notification_type_index = 1;
  22. bool went_to_friends = false;
  23. Loading *loading_global = NULL;
  24. bool flip_social_subfolder_mkdir(char *folder_name)
  25. {
  26. if (!folder_name || strlen(folder_name) == 0)
  27. {
  28. FURI_LOG_E(TAG, "Folder name is NULL/empty.");
  29. return false;
  30. }
  31. Storage *storage = furi_record_open(RECORD_STORAGE);
  32. char directory[128];
  33. snprintf(directory, sizeof(directory), STORAGE_EXT_PATH_PREFIX "/apps_data/flip_social");
  34. storage_common_mkdir(storage, directory);
  35. snprintf(directory, sizeof(directory), STORAGE_EXT_PATH_PREFIX "/apps_data/flip_social/%s", folder_name);
  36. storage_common_mkdir(storage, directory);
  37. furi_record_close(RECORD_STORAGE);
  38. return true;
  39. }