jblanked 9 месяцев назад
Родитель
Сommit
5c26375bb6

+ 1 - 1
alloc/alloc.c

@@ -1,6 +1,6 @@
 #include <alloc/alloc.h>
 #include <alloc/alloc.h>
 #include <flip_storage/flip_social_storage.h>
 #include <flip_storage/flip_social_storage.h>
-bool went_to_friends = false;
+#include <feed/flip_social_feed.h>
 
 
 FlipSocialApp *flip_social_app_alloc()
 FlipSocialApp *flip_social_app_alloc()
 {
 {

+ 1 - 2
alloc/alloc.h

@@ -15,5 +15,4 @@ char *updated_user_message(const char *user_message);
 bool alloc_text_input(uint32_t view_id);
 bool alloc_text_input(uint32_t view_id);
 bool about_widget_alloc(bool is_logged_in);
 bool about_widget_alloc(bool is_logged_in);
 bool alloc_variable_item_list(uint32_t view_id);
 bool alloc_variable_item_list(uint32_t view_id);
-bool alloc_submenu(uint32_t view_id);
-extern bool went_to_friends;
+bool alloc_submenu(uint32_t view_id);

+ 3 - 3
app.c

@@ -1,6 +1,6 @@
-// app.c
-#include <flip_social.h> // Include the FlipSocialApp structure
-#include <alloc/alloc.h> // Include the allocation functions
+#include <flip_social.h>
+#include <alloc/alloc.h>
+#include <flip_storage/flip_social_storage.h>
 
 
 /**
 /**
  * @brief Entry point for the Hello World application.
  * @brief Entry point for the Hello World application.

+ 7 - 0
callback/callback.c

@@ -1,5 +1,12 @@
 #include <callback/callback.h>
 #include <callback/callback.h>
 #include <callback/loader.h>
 #include <callback/loader.h>
+#include <messages/flip_social_messages.h>
+#include <friends/flip_social_friends.h>
+#include <explore/flip_social_explore.h>
+#include <feed/flip_social_feed.h>
+#include <flip_storage/flip_social_storage.h>
+#include <free/free.h>
+#include <alloc/alloc.h>
 
 
 static bool flip_social_login_fetch(DataLoaderModel *model)
 static bool flip_social_login_fetch(DataLoaderModel *model)
 {
 {

+ 0 - 23
callback/callback.h

@@ -2,13 +2,6 @@
 #define FLIP_SOCIAL_CALLBACK_H
 #define FLIP_SOCIAL_CALLBACK_H
 
 
 #include <flip_social.h>
 #include <flip_social.h>
-#include <messages/flip_social_messages.h>
-#include <friends/flip_social_friends.h>
-#include <explore/flip_social_explore.h>
-#include <feed/flip_social_feed.h>
-#include <flip_storage/flip_social_storage.h>
-#include <free/free.h>
-#include <alloc/alloc.h>
 
 
 /**
 /**
  * @brief Navigation callback to go back to the submenu Logged out.
  * @brief Navigation callback to go back to the submenu Logged out.
@@ -226,14 +219,6 @@ void flip_social_logged_in_profile_change_password_updated(void *context);
 void flip_social_logged_in_profile_change_bio_updated(void *context);
 void flip_social_logged_in_profile_change_bio_updated(void *context);
 void flip_social_text_input_logged_in_profile_item_selected(void *context, uint32_t index);
 void flip_social_text_input_logged_in_profile_item_selected(void *context, uint32_t index);
 
 
-/**
- * @brief Callback when a user selects a menu item in the settings (logged in) screen.
- * @param context The context - FlipSocialApp object.
- * @param index The index of the selected item.
- * @return void
- */
-void flip_social_text_input_logged_in_settings_item_selected(void *context, uint32_t index);
-
 /**
 /**
  * @brief Text input callback for when the user finishes entering their message to send to the selected user choice (user choice messages view)
  * @brief Text input callback for when the user finishes entering their message to send to the selected user choice (user choice messages view)
  * @param context The context - FlipSocialApp object.
  * @param context The context - FlipSocialApp object.
@@ -258,15 +243,7 @@ void flip_social_logged_in_user_settings_item_selected(void *context, uint32_t i
 void flip_social_logged_in_explore_updated(void *context);
 void flip_social_logged_in_explore_updated(void *context);
 void flip_social_logged_in_message_users_updated(void *context);
 void flip_social_logged_in_message_users_updated(void *context);
 
 
-// Add edits by Derek Jamison
-typedef enum FlipSocialCustomEvent FlipSocialCustomEvent;
-enum FlipSocialCustomEvent
-{
-    FlipSocialCustomEventProcess,
-};
-
 void messages_dialog_callback(DialogExResult result, void *context);
 void messages_dialog_callback(DialogExResult result, void *context);
-void feed_dialog_callback(DialogExResult result, void *context);
 //
 //
 bool flip_social_home_notification();
 bool flip_social_home_notification();
 #endif
 #endif

+ 6 - 0
callback/utils.h

@@ -10,3 +10,9 @@
 #define FURI_LOG_DEV(tag, format, ...)
 #define FURI_LOG_DEV(tag, format, ...)
 #define DEV_CRASH()
 #define DEV_CRASH()
 #endif
 #endif
+
+typedef enum FlipSocialCustomEvent FlipSocialCustomEvent;
+enum FlipSocialCustomEvent
+{
+    FlipSocialCustomEventProcess,
+};

+ 1 - 0
explore/flip_social_explore.c

@@ -1,4 +1,5 @@
 #include "flip_social_explore.h"
 #include "flip_social_explore.h"
+#include <alloc/alloc.h>
 
 
 // for now we're just listing the current users
 // for now we're just listing the current users
 // as the feed is upgraded, then we can port more to the explore view
 // as the feed is upgraded, then we can port more to the explore view

+ 0 - 1
explore/flip_social_explore.h

@@ -1,7 +1,6 @@
 #ifndef FLIP_SOCIAL_EXPLORE_H
 #ifndef FLIP_SOCIAL_EXPLORE_H
 #define FLIP_SOCIAL_EXPLORE_H
 #define FLIP_SOCIAL_EXPLORE_H
 #include "flip_social.h"
 #include "flip_social.h"
-#include <callback/callback.h>
 bool flip_social_get_explore(FlipperHTTP *fhttp);
 bool flip_social_get_explore(FlipperHTTP *fhttp);
 bool flip_social_get_explore_2(FlipperHTTP *fhttp);
 bool flip_social_get_explore_2(FlipperHTTP *fhttp);
 bool flip_social_parse_json_explore(FlipperHTTP *fhttp);
 bool flip_social_parse_json_explore(FlipperHTTP *fhttp);

+ 2 - 0
feed/flip_social_feed.c

@@ -1,4 +1,6 @@
 #include "flip_social_feed.h"
 #include "flip_social_feed.h"
+#include <flip_storage/flip_social_storage.h>
+#include <alloc/alloc.h>
 
 
 bool flip_social_get_feed(FlipperHTTP *fhttp, int series_index)
 bool flip_social_get_feed(FlipperHTTP *fhttp, int series_index)
 {
 {

+ 0 - 2
feed/flip_social_feed.h

@@ -1,8 +1,6 @@
 #ifndef FLIP_SOCIAL_FEED_H
 #ifndef FLIP_SOCIAL_FEED_H
 #define FLIP_SOCIAL_FEED_H
 #define FLIP_SOCIAL_FEED_H
 #include "flip_social.h"
 #include "flip_social.h"
-#include <callback/callback.h>
-#include <flip_storage/flip_social_storage.h>
 
 
 bool flip_social_get_feed(FlipperHTTP *fhttp, int series_index);
 bool flip_social_get_feed(FlipperHTTP *fhttp, int series_index);
 FlipSocialFeedMini *flip_social_parse_json_feed(FlipperHTTP *fhttp);
 FlipSocialFeedMini *flip_social_parse_json_feed(FlipperHTTP *fhttp);

+ 2 - 0
flip_social.c

@@ -23,6 +23,8 @@ uint8_t flip_social_feed_type_index = 0;
 char *flip_social_notification_type[] = {"OFF", "ON"};
 char *flip_social_notification_type[] = {"OFF", "ON"};
 uint8_t flip_social_notification_type_index = 0;
 uint8_t flip_social_notification_type_index = 0;
 
 
+bool went_to_friends = false;
+
 /**
 /**
  * @brief Function to free the resources used by FlipSocialApp.
  * @brief Function to free the resources used by FlipSocialApp.
  * @details Cleans up all allocated resources before exiting the application.
  * @details Cleans up all allocated resources before exiting the application.

+ 2 - 0
flip_social.h

@@ -327,4 +327,6 @@ extern uint8_t flip_social_feed_type_index;
 //
 //
 extern char *flip_social_notification_type[];
 extern char *flip_social_notification_type[];
 extern uint8_t flip_social_notification_type_index;
 extern uint8_t flip_social_notification_type_index;
+//
+extern bool went_to_friends;
 #endif
 #endif

+ 0 - 1
free/free.h

@@ -1,6 +1,5 @@
 #pragma once
 #pragma once
 #include <flip_social.h>
 #include <flip_social.h>
-#include <callback/callback.h>
 void free_all(bool should_free_variable_item_list, bool should_free_submenu, void *context);
 void free_all(bool should_free_variable_item_list, bool should_free_submenu, void *context);
 void free_text_input();
 void free_text_input();
 void free_explore_dialog();
 void free_explore_dialog();

+ 1 - 0
friends/flip_social_friends.c

@@ -1,4 +1,5 @@
 #include "flip_social_friends.h"
 #include "flip_social_friends.h"
+#include <alloc/alloc.h>
 
 
 // for now we're just listing the current users
 // for now we're just listing the current users
 // as the feed is upgraded, then we can port more to the friends view
 // as the feed is upgraded, then we can port more to the friends view

+ 0 - 2
friends/flip_social_friends.h

@@ -1,8 +1,6 @@
 #ifndef FLIP_SOCIAL_FRIENDS_H
 #ifndef FLIP_SOCIAL_FRIENDS_H
 #define FLIP_SOCIAL_FRIENDS_H
 #define FLIP_SOCIAL_FRIENDS_H
 #include "flip_social.h"
 #include "flip_social.h"
-#include <callback/callback.h>
-
 bool flip_social_get_friends(FlipperHTTP *fhttp);
 bool flip_social_get_friends(FlipperHTTP *fhttp);
 bool flip_social_update_friends();
 bool flip_social_update_friends();
 bool flip_social_parse_json_friends(FlipperHTTP *fhttp);
 bool flip_social_parse_json_friends(FlipperHTTP *fhttp);

+ 1 - 0
messages/flip_social_messages.c

@@ -1,4 +1,5 @@
 #include "flip_social_messages.h"
 #include "flip_social_messages.h"
+#include <alloc/alloc.h>
 
 
 bool flip_social_update_messages_submenu()
 bool flip_social_update_messages_submenu()
 {
 {

+ 0 - 2
messages/flip_social_messages.h

@@ -2,8 +2,6 @@
 #define FLIP_SOCIAL_MESSAGES_H
 #define FLIP_SOCIAL_MESSAGES_H
 
 
 #include "flip_social.h"
 #include "flip_social.h"
-#include <callback/callback.h>
-#include <explore/flip_social_explore.h>
 
 
 bool flip_social_update_messages_submenu();
 bool flip_social_update_messages_submenu();
 bool flip_social_update_submenu_user_choices();
 bool flip_social_update_submenu_user_choices();