Skip to content

Commit 448ff17

Browse files
authored
Merge pull request #18 from jblanked/dev_0.8
FlipSocial - v0.8
2 parents 98421a5 + 9bb3b3d commit 448ff17

21 files changed

+940
-611
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The highlight of this app is customizable pre-saves, which, as explained below,
66
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
77

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

1212

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

6262
**v0.8**
63-
- Improve User Profile (Bio, friend count, block)
63+
- Improve User Profile
6464
- Improve Explore Page
6565

6666
**v1.0**

alloc/flip_social_alloc.c

+49-5
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,16 @@ FlipSocialApp *flip_social_app_alloc()
4141
app->register_password_logged_out_temp_buffer_size = MAX_USER_LENGTH;
4242
app->register_password_2_logged_out_temp_buffer_size = MAX_USER_LENGTH;
4343
app->change_password_logged_in_temp_buffer_size = MAX_USER_LENGTH;
44+
app->change_bio_logged_in_temp_buffer_size = MAX_MESSAGE_LENGTH;
4445
app->compose_pre_save_logged_in_temp_buffer_size = MAX_MESSAGE_LENGTH;
4546
app->wifi_ssid_logged_in_temp_buffer_size = MAX_USER_LENGTH;
4647
app->wifi_password_logged_in_temp_buffer_size = MAX_USER_LENGTH;
4748
app->is_logged_in_size = 8;
4849
app->login_username_logged_in_temp_buffer_size = MAX_USER_LENGTH;
4950
app->messages_new_message_logged_in_temp_buffer_size = MAX_MESSAGE_LENGTH;
5051
app->message_user_choice_logged_in_temp_buffer_size = MAX_MESSAGE_LENGTH;
52+
app->explore_logged_in_temp_buffer_size = MAX_USER_LENGTH;
53+
app->message_users_logged_in_temp_buffer_size = MAX_USER_LENGTH;
5154
if (!easy_flipper_set_buffer(&app->wifi_ssid_logged_out_temp_buffer, app->wifi_ssid_logged_out_temp_buffer_size))
5255
{
5356
return NULL;
@@ -80,6 +83,10 @@ FlipSocialApp *flip_social_app_alloc()
8083
{
8184
return NULL;
8285
}
86+
if (!easy_flipper_set_buffer(&app->change_bio_logged_in_temp_buffer, app->change_bio_logged_in_temp_buffer_size))
87+
{
88+
return NULL;
89+
}
8390
if (!easy_flipper_set_buffer(&app->compose_pre_save_logged_in_temp_buffer, app->compose_pre_save_logged_in_temp_buffer_size))
8491
{
8592
return NULL;
@@ -133,6 +140,10 @@ FlipSocialApp *flip_social_app_alloc()
133140
{
134141
return NULL;
135142
}
143+
if (!easy_flipper_set_buffer(&app->change_bio_logged_in, app->change_bio_logged_in_temp_buffer_size))
144+
{
145+
return NULL;
146+
}
136147
if (!easy_flipper_set_buffer(&app->compose_pre_save_logged_in, app->compose_pre_save_logged_in_temp_buffer_size))
137148
{
138149
return NULL;
@@ -170,17 +181,29 @@ FlipSocialApp *flip_social_app_alloc()
170181
{
171182
return NULL;
172183
}
173-
if (!easy_flipper_set_buffer(&last_explore_response, app->message_user_choice_logged_in_temp_buffer_size))
184+
if (!easy_flipper_set_buffer(&app->explore_logged_in, app->explore_logged_in_temp_buffer_size))
185+
{
186+
return NULL;
187+
}
188+
if (!easy_flipper_set_buffer(&app->explore_logged_in_temp_buffer, app->explore_logged_in_temp_buffer_size))
189+
{
190+
return NULL;
191+
}
192+
if (!easy_flipper_set_buffer(&app->message_users_logged_in, app->message_users_logged_in_temp_buffer_size))
193+
{
194+
return NULL;
195+
}
196+
if (!easy_flipper_set_buffer(&app->message_users_logged_in_temp_buffer, app->message_users_logged_in_temp_buffer_size))
174197
{
175198
return NULL;
176199
}
177200

178201
// Allocate Submenu(s)
179-
if (!easy_flipper_set_submenu(&app->submenu_logged_out, FlipSocialViewLoggedOutSubmenu, "FlipSocial v0.7", flip_social_callback_exit_app, &app->view_dispatcher))
202+
if (!easy_flipper_set_submenu(&app->submenu_logged_out, FlipSocialViewLoggedOutSubmenu, "FlipSocial v0.8", flip_social_callback_exit_app, &app->view_dispatcher))
180203
{
181204
return NULL;
182205
}
183-
if (!easy_flipper_set_submenu(&app->submenu_logged_in, FlipSocialViewLoggedInSubmenu, "FlipSocial v0.7", flip_social_callback_exit_app, &app->view_dispatcher))
206+
if (!easy_flipper_set_submenu(&app->submenu_logged_in, FlipSocialViewLoggedInSubmenu, "FlipSocial v0.8", flip_social_callback_exit_app, &app->view_dispatcher))
184207
{
185208
return NULL;
186209
}
@@ -242,7 +265,8 @@ FlipSocialApp *flip_social_app_alloc()
242265
app->variable_item_logged_out_register_button = variable_item_list_add(app->variable_item_list_logged_out_register, "Register", 0, NULL, app);
243266
//
244267
app->variable_item_logged_in_profile_username = variable_item_list_add(app->variable_item_list_logged_in_profile, "Username", 1, NULL, app);
245-
app->variable_item_logged_in_profile_change_password = variable_item_list_add(app->variable_item_list_logged_in_profile, "Change Password", 1, NULL, app);
268+
app->variable_item_logged_in_profile_change_password = variable_item_list_add(app->variable_item_list_logged_in_profile, "Password", 1, NULL, app);
269+
app->variable_item_logged_in_profile_change_bio = variable_item_list_add(app->variable_item_list_logged_in_profile, "Bio", 1, NULL, app);
246270
app->variable_item_logged_in_profile_friends = variable_item_list_add(app->variable_item_list_logged_in_profile, "Friends", 0, NULL, app);
247271
//
248272
app->variable_item_logged_in_settings_about = variable_item_list_add(app->variable_item_list_logged_in_settings, "About", 0, NULL, app);
@@ -281,7 +305,11 @@ FlipSocialApp *flip_social_app_alloc()
281305
return NULL;
282306
}
283307
//
284-
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))
308+
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))
309+
{
310+
return NULL;
311+
}
312+
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))
285313
{
286314
return NULL;
287315
}
@@ -306,6 +334,14 @@ FlipSocialApp *flip_social_app_alloc()
306334
{
307335
return NULL;
308336
}
337+
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))
338+
{
339+
return NULL;
340+
}
341+
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))
342+
{
343+
return NULL;
344+
}
309345

310346
// Load the settings
311347
if (!load_settings(app->wifi_ssid_logged_out,
@@ -320,6 +356,8 @@ FlipSocialApp *flip_social_app_alloc()
320356
app->login_password_logged_out_temp_buffer_size,
321357
app->change_password_logged_in,
322358
app->change_password_logged_in_temp_buffer_size,
359+
app->change_bio_logged_in,
360+
app->change_bio_logged_in_temp_buffer_size,
323361
app->is_logged_in,
324362
app->is_logged_in_size))
325363

@@ -377,6 +415,11 @@ FlipSocialApp *flip_social_app_alloc()
377415
strncpy(app->change_password_logged_in_temp_buffer, app->change_password_logged_in, app->change_password_logged_in_temp_buffer_size - 1);
378416
app->change_password_logged_in_temp_buffer[app->change_password_logged_in_temp_buffer_size - 1] = '\0';
379417
}
418+
if (app->change_bio_logged_in && app->change_bio_logged_in_temp_buffer)
419+
{
420+
strncpy(app->change_bio_logged_in_temp_buffer, app->change_bio_logged_in, app->change_bio_logged_in_temp_buffer_size - 1);
421+
app->change_bio_logged_in_temp_buffer[app->change_bio_logged_in_temp_buffer_size - 1] = '\0';
422+
}
380423
if (app->compose_pre_save_logged_in && app->compose_pre_save_logged_in_temp_buffer)
381424
{
382425
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);
@@ -470,6 +513,7 @@ FlipSocialApp *flip_social_app_alloc()
470513
variable_item_set_current_value_text(app->variable_item_logged_out_wifi_settings_ssid, app->wifi_ssid_logged_out);
471514
variable_item_set_current_value_text(app->variable_item_logged_out_login_username, app->login_username_logged_out);
472515
variable_item_set_current_value_text(app->variable_item_logged_in_profile_username, app->login_username_logged_in);
516+
variable_item_set_current_value_text(app->variable_item_logged_in_profile_change_bio, app->change_bio_logged_in);
473517
//
474518

475519
if (app->is_logged_in != NULL && strcmp(app->is_logged_in, "true") == 0)

application.fam

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ App(
99
fap_icon_assets="assets",
1010
fap_author="jblanked",
1111
fap_weburl="https://github.com/jblanked/FlipSocial",
12-
fap_version="0.7",
12+
fap_version="0.8",
1313
fap_description="Social media platform for the Flipper Zero.",
1414
)

assets/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.8 - New Features
2+
- Added support for RPC_KEYBOARD (thanks to Derek Jamison).
3+
- Introduced a bio feature in the Profile section: View and update your bio.
4+
- Enhanced the Explore view: Clicking on a user now displays their bio and friend count. You can also search for users.
5+
- Improved the Messages view: Users can now search for a contact to send messages.
6+
17
## 0.7
28
- Improved memory allocation
39
- Increased the max explore users from 50 to 100

assets/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The highlight of this app is customizable pre-saves, which, as explained below,
66
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
77

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

1212

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

6262
**v0.8**
63-
- Improve User Profile (Bio, friend count, block)
63+
- Improve User Profile
6464
- Improve Explore Page
6565

6666
**v1.0**

0 commit comments

Comments
 (0)