Skip to content

Commit

Permalink
refactor: Update useTreeManagement.ts for backup functionality
Browse files Browse the repository at this point in the history
Update the useTreeManagement.ts file to improve the backup functionality. This includes dynamically setting the backup title and text based on the current tree name or date and time. Additionally, update the dialog title to reflect the backup details. These changes enhance the user experience and make the backup feature more informative.
  • Loading branch information
Jun-Murakami committed Oct 5, 2024
1 parent b45bf38 commit 2d7db80
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/hooks/useTreeManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -580,10 +580,10 @@ export const useTreeManagement = () => {
encoding: Encoding.UTF8,
});
await Share.share({
title: 'TaskTrees Backup title',
text: 'TaskTrees Backup text',
title: `TaskTrees Backup ${currentTreeName}`,
text: `TaskTrees Backup ${currentTreeName}`,
url: result.uri,
dialogTitle: 'TaskTrees Backup dialog title',
dialogTitle: `TaskTrees Backup ${currentTreeName}`,
});
return result.uri;
} catch (error) {
Expand Down Expand Up @@ -639,10 +639,10 @@ export const useTreeManagement = () => {
encoding: Encoding.UTF8,
});
await Share.share({
title: 'TaskTrees Backup title',
text: 'TaskTrees Backup text',
title: `TaskTrees All Backup ${getCurrentDateTime()}`,
text: `TaskTrees All Backup ${getCurrentDateTime()}`,
url: result.uri,
dialogTitle: 'TaskTrees Backup dialog title',
dialogTitle: `TaskTrees All Backup ${getCurrentDateTime()}`,
});
return Promise.resolve(result.uri);
} else {
Expand Down

0 comments on commit 2d7db80

Please sign in to comment.