Skip to content

Commit

Permalink
Merge pull request #18 from jblanked/dev_0.8
Browse files Browse the repository at this point in the history
FlipSocial - v0.8
  • Loading branch information
jblanked authored Dec 5, 2024
2 parents 98421a5 + 9bb3b3d commit 448ff17
Show file tree
Hide file tree
Showing 21 changed files with 940 additions and 611 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The highlight of this app is customizable pre-saves, which, as explained below,
FlipSocial uses the FlipperHTTP flash for the WiFi Devboard, first introduced in the WebCrawler app: https://github.com/jblanked/WebCrawler-FlipperZero/tree/main/assets/FlipperHTTP

## Requirements
- WiFi Developer Board or Raspberry Pi Pico W with FlipperHTTP Flash: https://github.com/jblanked/FlipperHTTP
- WiFi Developer Board, Raspberry Pi, or ESP32 Device with FlipperHTTP Flash: https://github.com/jblanked/FlipperHTTP
- WiFi Access Point


Expand Down Expand Up @@ -60,7 +60,7 @@ FlipSocial uses the FlipperHTTP flash for the WiFi Devboard, first introduced in
- Loading screens.

**v0.8**
- Improve User Profile (Bio, friend count, block)
- Improve User Profile
- Improve Explore Page

**v1.0**
Expand Down
54 changes: 49 additions & 5 deletions alloc/flip_social_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,16 @@ FlipSocialApp *flip_social_app_alloc()
app->register_password_logged_out_temp_buffer_size = MAX_USER_LENGTH;
app->register_password_2_logged_out_temp_buffer_size = MAX_USER_LENGTH;
app->change_password_logged_in_temp_buffer_size = MAX_USER_LENGTH;
app->change_bio_logged_in_temp_buffer_size = MAX_MESSAGE_LENGTH;
app->compose_pre_save_logged_in_temp_buffer_size = MAX_MESSAGE_LENGTH;
app->wifi_ssid_logged_in_temp_buffer_size = MAX_USER_LENGTH;
app->wifi_password_logged_in_temp_buffer_size = MAX_USER_LENGTH;
app->is_logged_in_size = 8;
app->login_username_logged_in_temp_buffer_size = MAX_USER_LENGTH;
app->messages_new_message_logged_in_temp_buffer_size = MAX_MESSAGE_LENGTH;
app->message_user_choice_logged_in_temp_buffer_size = MAX_MESSAGE_LENGTH;
app->explore_logged_in_temp_buffer_size = MAX_USER_LENGTH;
app->message_users_logged_in_temp_buffer_size = MAX_USER_LENGTH;
if (!easy_flipper_set_buffer(&app->wifi_ssid_logged_out_temp_buffer, app->wifi_ssid_logged_out_temp_buffer_size))
{
return NULL;
Expand Down Expand Up @@ -80,6 +83,10 @@ FlipSocialApp *flip_social_app_alloc()
{
return NULL;
}
if (!easy_flipper_set_buffer(&app->change_bio_logged_in_temp_buffer, app->change_bio_logged_in_temp_buffer_size))
{
return NULL;
}
if (!easy_flipper_set_buffer(&app->compose_pre_save_logged_in_temp_buffer, app->compose_pre_save_logged_in_temp_buffer_size))
{
return NULL;
Expand Down Expand Up @@ -133,6 +140,10 @@ FlipSocialApp *flip_social_app_alloc()
{
return NULL;
}
if (!easy_flipper_set_buffer(&app->change_bio_logged_in, app->change_bio_logged_in_temp_buffer_size))
{
return NULL;
}
if (!easy_flipper_set_buffer(&app->compose_pre_save_logged_in, app->compose_pre_save_logged_in_temp_buffer_size))
{
return NULL;
Expand Down Expand Up @@ -170,17 +181,29 @@ FlipSocialApp *flip_social_app_alloc()
{
return NULL;
}
if (!easy_flipper_set_buffer(&last_explore_response, app->message_user_choice_logged_in_temp_buffer_size))
if (!easy_flipper_set_buffer(&app->explore_logged_in, app->explore_logged_in_temp_buffer_size))
{
return NULL;
}
if (!easy_flipper_set_buffer(&app->explore_logged_in_temp_buffer, app->explore_logged_in_temp_buffer_size))
{
return NULL;
}
if (!easy_flipper_set_buffer(&app->message_users_logged_in, app->message_users_logged_in_temp_buffer_size))
{
return NULL;
}
if (!easy_flipper_set_buffer(&app->message_users_logged_in_temp_buffer, app->message_users_logged_in_temp_buffer_size))
{
return NULL;
}

// Allocate Submenu(s)
if (!easy_flipper_set_submenu(&app->submenu_logged_out, FlipSocialViewLoggedOutSubmenu, "FlipSocial v0.7", flip_social_callback_exit_app, &app->view_dispatcher))
if (!easy_flipper_set_submenu(&app->submenu_logged_out, FlipSocialViewLoggedOutSubmenu, "FlipSocial v0.8", flip_social_callback_exit_app, &app->view_dispatcher))
{
return NULL;
}
if (!easy_flipper_set_submenu(&app->submenu_logged_in, FlipSocialViewLoggedInSubmenu, "FlipSocial v0.7", flip_social_callback_exit_app, &app->view_dispatcher))
if (!easy_flipper_set_submenu(&app->submenu_logged_in, FlipSocialViewLoggedInSubmenu, "FlipSocial v0.8", flip_social_callback_exit_app, &app->view_dispatcher))
{
return NULL;
}
Expand Down Expand Up @@ -242,7 +265,8 @@ FlipSocialApp *flip_social_app_alloc()
app->variable_item_logged_out_register_button = variable_item_list_add(app->variable_item_list_logged_out_register, "Register", 0, NULL, app);
//
app->variable_item_logged_in_profile_username = variable_item_list_add(app->variable_item_list_logged_in_profile, "Username", 1, NULL, app);
app->variable_item_logged_in_profile_change_password = variable_item_list_add(app->variable_item_list_logged_in_profile, "Change Password", 1, NULL, app);
app->variable_item_logged_in_profile_change_password = variable_item_list_add(app->variable_item_list_logged_in_profile, "Password", 1, NULL, app);
app->variable_item_logged_in_profile_change_bio = variable_item_list_add(app->variable_item_list_logged_in_profile, "Bio", 1, NULL, app);
app->variable_item_logged_in_profile_friends = variable_item_list_add(app->variable_item_list_logged_in_profile, "Friends", 0, NULL, app);
//
app->variable_item_logged_in_settings_about = variable_item_list_add(app->variable_item_list_logged_in_settings, "About", 0, NULL, app);
Expand Down Expand Up @@ -281,7 +305,11 @@ FlipSocialApp *flip_social_app_alloc()
return NULL;
}
//
if (!easy_flipper_set_uart_text_input(&app->text_input_logged_in_change_password, FlipSocialViewLoggedInChangePasswordInput, "Enter New Password", app->change_password_logged_in_temp_buffer, app->change_password_logged_in_temp_buffer_size, flip_social_logged_in_profile_change_password_updated, flip_social_callback_to_profile_logged_in, &app->view_dispatcher, app))
if (!easy_flipper_set_uart_text_input(&app->text_input_logged_in_change_password, FlipSocialViewLoggedInChangePasswordInput, "Password", app->change_password_logged_in_temp_buffer, app->change_password_logged_in_temp_buffer_size, flip_social_logged_in_profile_change_password_updated, flip_social_callback_to_profile_logged_in, &app->view_dispatcher, app))
{
return NULL;
}
if (!easy_flipper_set_uart_text_input(&app->text_input_logged_in_change_bio, FlipSocialViewLoggedInChangeBioInput, "Bio", app->change_bio_logged_in_temp_buffer, app->change_bio_logged_in_temp_buffer_size, flip_social_logged_in_profile_change_bio_updated, flip_social_callback_to_profile_logged_in, &app->view_dispatcher, app))
{
return NULL;
}
Expand All @@ -306,6 +334,14 @@ FlipSocialApp *flip_social_app_alloc()
{
return NULL;
}
if (!easy_flipper_set_uart_text_input(&app->text_input_logged_in_explore, FlipSocialViewLoggedInExploreInput, "Enter Username or Keyword", app->explore_logged_in_temp_buffer, app->explore_logged_in_temp_buffer_size, flip_social_logged_in_explore_updated, flip_social_callback_to_submenu_logged_in, &app->view_dispatcher, app))
{
return NULL;
}
if (!easy_flipper_set_uart_text_input(&app->text_input_logged_in_message_users, FlipSocialViewLoggedInMessageUsersInput, "Enter Username or Keyword", app->message_users_logged_in_temp_buffer, app->message_users_logged_in_temp_buffer_size, flip_social_logged_in_message_users_updated, flip_social_callback_to_submenu_logged_in, &app->view_dispatcher, app))
{
return NULL;
}

// Load the settings
if (!load_settings(app->wifi_ssid_logged_out,
Expand All @@ -320,6 +356,8 @@ FlipSocialApp *flip_social_app_alloc()
app->login_password_logged_out_temp_buffer_size,
app->change_password_logged_in,
app->change_password_logged_in_temp_buffer_size,
app->change_bio_logged_in,
app->change_bio_logged_in_temp_buffer_size,
app->is_logged_in,
app->is_logged_in_size))

Expand Down Expand Up @@ -377,6 +415,11 @@ FlipSocialApp *flip_social_app_alloc()
strncpy(app->change_password_logged_in_temp_buffer, app->change_password_logged_in, app->change_password_logged_in_temp_buffer_size - 1);
app->change_password_logged_in_temp_buffer[app->change_password_logged_in_temp_buffer_size - 1] = '\0';
}
if (app->change_bio_logged_in && app->change_bio_logged_in_temp_buffer)
{
strncpy(app->change_bio_logged_in_temp_buffer, app->change_bio_logged_in, app->change_bio_logged_in_temp_buffer_size - 1);
app->change_bio_logged_in_temp_buffer[app->change_bio_logged_in_temp_buffer_size - 1] = '\0';
}
if (app->compose_pre_save_logged_in && app->compose_pre_save_logged_in_temp_buffer)
{
strncpy(app->compose_pre_save_logged_in_temp_buffer, app->compose_pre_save_logged_in, app->compose_pre_save_logged_in_temp_buffer_size - 1);
Expand Down Expand Up @@ -470,6 +513,7 @@ FlipSocialApp *flip_social_app_alloc()
variable_item_set_current_value_text(app->variable_item_logged_out_wifi_settings_ssid, app->wifi_ssid_logged_out);
variable_item_set_current_value_text(app->variable_item_logged_out_login_username, app->login_username_logged_out);
variable_item_set_current_value_text(app->variable_item_logged_in_profile_username, app->login_username_logged_in);
variable_item_set_current_value_text(app->variable_item_logged_in_profile_change_bio, app->change_bio_logged_in);
//

if (app->is_logged_in != NULL && strcmp(app->is_logged_in, "true") == 0)
Expand Down
2 changes: 1 addition & 1 deletion application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ App(
fap_icon_assets="assets",
fap_author="jblanked",
fap_weburl="https://github.com/jblanked/FlipSocial",
fap_version="0.7",
fap_version="0.8",
fap_description="Social media platform for the Flipper Zero.",
)
6 changes: 6 additions & 0 deletions assets/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.8 - New Features
- Added support for RPC_KEYBOARD (thanks to Derek Jamison).
- Introduced a bio feature in the Profile section: View and update your bio.
- Enhanced the Explore view: Clicking on a user now displays their bio and friend count. You can also search for users.
- Improved the Messages view: Users can now search for a contact to send messages.

## 0.7
- Improved memory allocation
- Increased the max explore users from 50 to 100
Expand Down
4 changes: 2 additions & 2 deletions assets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The highlight of this app is customizable pre-saves, which, as explained below,
FlipSocial uses the FlipperHTTP flash for the WiFi Devboard, first introduced in the WebCrawler app: https://github.com/jblanked/WebCrawler-FlipperZero/tree/main/assets/FlipperHTTP

## Requirements
- WiFi Developer Board or Raspberry Pi Pico W with FlipperHTTP Flash: https://github.com/jblanked/FlipperHTTP
- WiFi Developer Board, Raspberry Pi, or ESP32 Device with FlipperHTTP Flash: https://github.com/jblanked/FlipperHTTP
- WiFi Access Point


Expand Down Expand Up @@ -60,7 +60,7 @@ FlipSocial uses the FlipperHTTP flash for the WiFi Devboard, first introduced in
- Loading screens.

**v0.8**
- Improve User Profile (Bio, friend count, block)
- Improve User Profile
- Improve Explore Page

**v1.0**
Expand Down
Loading

0 comments on commit 448ff17

Please sign in to comment.