mirror of
https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies.git
synced 2026-08-04 10:40:23 +00:00
Refactor mafile storage: async, modular, bulk rename
- Fix crash: Updated SaveMafileAsync to properly update or add to MaFiles collection - Fix naming logic: Added Filename reset logic to adding new mafile to prevent inconsistent and duplicating import - Extracted mafile path and naming logic to MafilesStorageHelper for better modularity - Refactored Storage methods to use MafilesStorageHelper - Replaced all sync mafile save/add calls with async/await versions throughout the codebase - Performed code cleanups and improved maintainability for mafile-related operations
This commit is contained in:
@@ -13,6 +13,7 @@ using NebulaAuth.Core;
|
||||
using NebulaAuth.Model;
|
||||
using NebulaAuth.Model.Entities;
|
||||
using NebulaAuth.Model.Exceptions;
|
||||
using NebulaAuth.Model.Mafiles;
|
||||
using NebulaAuth.Utility;
|
||||
using NebulaAuth.View;
|
||||
using NebulaAuth.View.Dialogs;
|
||||
@@ -78,7 +79,7 @@ public partial class MainVM //File //TODO: Refactor
|
||||
{
|
||||
try
|
||||
{
|
||||
Storage.AddNewMafile(str, confirmOverwrite ?? false);
|
||||
await Storage.AddNewMafile(str, confirmOverwrite ?? false);
|
||||
added++;
|
||||
}
|
||||
catch (FormatException)
|
||||
@@ -92,7 +93,7 @@ public partial class MainVM //File //TODO: Refactor
|
||||
|
||||
if (confirmOverwrite == true)
|
||||
{
|
||||
Storage.AddNewMafile(str, true);
|
||||
await Storage.AddNewMafile(str, true);
|
||||
added++;
|
||||
}
|
||||
else if (confirmOverwrite == false)
|
||||
|
||||
Reference in New Issue
Block a user