Skip to content

Commit

Permalink
Finished Rename feature
Browse files Browse the repository at this point in the history
  • Loading branch information
David Lee committed Jul 25, 2023
1 parent 5feacfb commit 42b7ba9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ App(
requires=["gui"],
stack_size=1 * 1024,
order=90,
fap_version=1.0,
fap_author="bigbrodude6119",
fap_description="Create an evil captive portal Wi-Fi access point",
fap_icon="icons/evil_portal_10px.png",
fap_category="GPIO",
)
11 changes: 10 additions & 1 deletion helpers/evil_portal_storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,16 @@ void evil_portal_read_ap_name(void *context) {

void evil_portal_write_ap_name(void *context) {
Evil_PortalApp *app = context;
UNUSED(app);
Storage *storage = evil_portal_open_storage();

File *ap_name = storage_file_alloc(storage);
if (storage_file_open(ap_name, EVIL_PORTAL_AP_SAVE_PATH, FSAM_WRITE,
FSOM_CREATE_ALWAYS)) {
storage_file_write(ap_name, app->text_store[0], strlen(app->text_store[0]));
}
storage_file_close(ap_name);
storage_file_free(ap_name);
evil_portal_close_storage();
}

char *sequential_file_resolve_path(Storage *storage, const char *dir,
Expand Down
1 change: 0 additions & 1 deletion scenes/evil_portal_scene_rename.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ void evil_portal_scene_rename_on_enter(void *context) {
evil_portal_text_input_callback,
context,
app->text_store[0],
//(char *)app->ap_name,
enter_name_length,
false);
view_dispatcher_switch_to_view(app->view_dispatcher, Evil_PortalAppViewTextInput);
Expand Down

0 comments on commit 42b7ba9

Please sign in to comment.