Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Willy-JL committed Nov 7, 2024
2 parents 00750bd + 6e8bf25 commit db25407
Show file tree
Hide file tree
Showing 31 changed files with 2,188 additions and 877 deletions.
Binary file removed flip_social/.DS_Store
Binary file not shown.
7 changes: 5 additions & 2 deletions flip_social/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ The first social media app for Flipper Zero. Connect with other users directly o

The highlight of this app is customizable pre-saves, which, as explained below, aim to address the challenges of typing with the directional pad.

FlipSocial uses the FlipperHTTP flash for the WiFi Devboard, first introduced in the WebCrawler app:https://github.com/jblanked/FlipperHTTP
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 Dev Board or Raspberry Pi Pico W for Flipper Zero with FlipperHTTP Flash: https://github.com/jblanked/FlipperHTTP
Expand Down Expand Up @@ -51,9 +51,12 @@ FlipSocial uses the FlipperHTTP flash for the WiFi Devboard, first introduced in
- Raspberry Pi Pico W Support

**v0.6**
- Improved User Profile (Bio, friend count, block)
- Improved memory allocation
- Fixed bugs in Direct Messaging View
- Fixed bugs in Pre-Save View

**v0.7**
- Improved User Profile (Bio, friend count, block)
- Improved Explore Page

**v0.8**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
// flip_social.i.h
#ifndef FLIP_SOCIAL_I
#define FLIP_SOCIAL_I
#include <alloc/flip_social_alloc.h>

/**
* @brief Function to allocate resources for the FlipSocialApp.
* @details Initializes all components and views of the application.
* @return Pointer to the initialized FlipSocialApp, or NULL on failure.
*/
static FlipSocialApp* flip_social_app_alloc() {
FlipSocialApp* flip_social_app_alloc() {
// Initiailize the app
FlipSocialApp* app = (FlipSocialApp*)malloc(sizeof(FlipSocialApp));

Expand All @@ -34,13 +27,13 @@ static 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->compose_pre_save_logged_in_temp_buffer_size = 100;
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 = 100;
app->message_user_choice_logged_in_temp_buffer_size = 100;
app->messages_new_message_logged_in_temp_buffer_size = MAX_MESSAGE_LENGTH;
app->message_user_choice_logged_in_temp_buffer_size = MAX_MESSAGE_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 @@ -175,20 +168,28 @@ static FlipSocialApp* flip_social_app_alloc() {
app->message_user_choice_logged_in_temp_buffer_size)) {
return NULL;
}
if(!easy_flipper_set_buffer(
&selected_message, app->message_user_choice_logged_in_temp_buffer_size)) {
return NULL;
}
if(!easy_flipper_set_buffer(
&last_explore_response, app->message_user_choice_logged_in_temp_buffer_size)) {
return NULL;
}

// Allocate Submenu(s)
if(!easy_flipper_set_submenu(
&app->submenu_logged_out,
FlipSocialViewLoggedOutSubmenu,
"FlipSocial v0.5",
"FlipSocial v0.6",
flip_social_callback_exit_app,
&app->view_dispatcher)) {
return NULL;
}
if(!easy_flipper_set_submenu(
&app->submenu_logged_in,
FlipSocialViewLoggedInSubmenu,
"FlipSocial v0.5",
"FlipSocial v0.6",
flip_social_callback_exit_app,
&app->view_dispatcher)) {
return NULL;
Expand Down Expand Up @@ -937,5 +938,3 @@ static FlipSocialApp* flip_social_app_alloc() {

return app;
}

#endif // FLIP_SOCIAL_I
14 changes: 14 additions & 0 deletions flip_social/alloc/flip_social_alloc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ifndef FLIP_SOCIAL_ALLOC_H
#define FLIP_SOCIAL_ALLOC_H
#include <flip_social.h>
#include <callback/flip_social_callback.h>
#include <flip_storage/flip_social_storage.h>
#include <draw/flip_social_draw.h>

/**
* @brief Function to allocate resources for the FlipSocialApp.
* @details Initializes all components and views of the application.
* @return Pointer to the initialized FlipSocialApp, or NULL on failure.
*/
FlipSocialApp* flip_social_app_alloc();
#endif
13 changes: 2 additions & 11 deletions flip_social/app.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
// app.c
#include <jsmn.h> // Include cJSON
#include <flip_social_e.h> // Include the FlipSocialApp structure
#include <flip_social_storage.h> // Include the storage functions
#include "flip_social_draw.h"
#include "flip_social_feed.h"
#include "flip_social_explore.h"
#include "flip_social_friends.h"
#include "flip_social_messages.h"
#include <flip_social_callback.h> // Include the callback functions
#include <flip_social_i.h> // Include the initialization functions
#include <flip_social_free.h> // Include the cleanup functions
#include <flip_social.h> // Include the FlipSocialApp structure
#include <alloc/flip_social_alloc.h> // Include the allocation functions

/**
* @brief Entry point for the Hello World application.
Expand Down
Binary file removed flip_social/app.png
Binary file not shown.
2 changes: 1 addition & 1 deletion flip_social/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.5",
fap_version="0.6",
fap_description="Social media platform for the Flipper Zero.",
)
5 changes: 5 additions & 0 deletions flip_social/assets/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.6
- Improved memory allocation
- Fixed bugs in Direct Messaging View
- Fixed bugs in Pre-Save View

## 0.5
- Improved memory allocation
- Improved Feed Page
Expand Down
10 changes: 7 additions & 3 deletions flip_social/assets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ The first social media app for Flipper Zero. Connect with other users directly o

The highlight of this app is customizable pre-saves, which, as explained below, aim to address the challenges of typing with the directional pad.

FlipSocial uses the FlipperHTTP flash for the WiFi Devboard, first introduced in the WebCrawler app: [WebCrawler](https://github.com/jblanked/WebCrawler-FlipperZero/tree/main/assets/FlipperHTTP)
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 Dev Board for Flipper Zero with FlipperHTTP Flash: [FlipperHTTP](https://github.com/jblanked/WebCrawler-FlipperZero/tree/main/assets/FlipperHTTP)
- WiFi Dev Board or Raspberry Pi Pico W for Flipper Zero with FlipperHTTP Flash: https://github.com/jblanked/FlipperHTTP
- WiFi Access Point


## Features
- Login/Logout
- Registration
Expand Down Expand Up @@ -50,9 +51,12 @@ FlipSocial uses the FlipperHTTP flash for the WiFi Devboard, first introduced in
- Raspberry Pi Pico W Support

**v0.6**
- Improved User Profile (Bio, friend count, block)
- Improved memory allocation
- Fixed bugs in Direct Messaging View
- Fixed bugs in Pre-Save View

**v0.7**
- Improved User Profile (Bio, friend count, block)
- Improved Explore Page

**v0.8**
Expand Down
Loading

0 comments on commit db25407

Please sign in to comment.