Add delete_all_remote_backups and some refactoring.

This commit is contained in:
J-D-K
2025-08-01 13:53:57 -04:00
parent 73af5ffe7e
commit 8172e59ccf
73 changed files with 1450 additions and 833 deletions

View File

@@ -15,7 +15,7 @@
#include "logger.hpp"
#include "strings.hpp"
#include "stringutil.hpp"
#include "system/system.hpp"
#include "sys/sys.hpp"
#include "ui/PopMessageManager.hpp"
namespace
@@ -53,6 +53,18 @@ UserOptionState::UserOptionState(data::User *user, TitleSelectCommon *titleSelec
UserOptionState::initialize_data_struct();
}
std::shared_ptr<UserOptionState> UserOptionState::create(data::User *user, TitleSelectCommon *titleSelect)
{
return std::make_shared<UserOptionState>(user, titleSelect);
}
std::shared_ptr<UserOptionState> UserOptionState::create_and_push(data::User *user, TitleSelectCommon *titleSelect)
{
auto newState = UserOptionState::create(user, titleSelect);
StateManager::push_state(newState);
return newState;
}
void UserOptionState::update()
{
const bool hasFocus = BaseState::has_focus();
@@ -277,11 +289,7 @@ static void delete_all_save_data_for_user(sys::Task *task, std::shared_ptr<UserO
std::vector<uint64_t> applicationIDs;
// Check this quick just in case.
if (user->get_account_save_type() == FsSaveDataType_System)
{
task->finished();
return;
}
if (user->get_account_save_type() == FsSaveDataType_System) { TASK_FINISH_RETURN(task); }
for (size_t i = 0; i < totalDataEntries; i++)
{