Skip to content

Mobile: Deleting a profile does not actually delete the profile data #13871

@mrjo118

Description

@mrjo118

Operating system

Android

Joplin version

3.4.7

Desktop version info

No response

Current behaviour

When using the manage profiles option on the mobile app to delete a profile, it does not actually delete profile data, it only de-references the profile in the profiles config. See:

const onDeleteProfile = useCallback(async (profile: Profile) => {
const doIt = async () => {
try {
const newConfig = deleteProfileById(profileConfig, profile.id);
await saveProfileConfig(newConfig);
setProfileConfigTime(Date.now());
} catch (error) {
dialogs.prompt(_('Error'), error.message);
}
};
dialogs.prompt(
_('Delete this profile?'),
_('All data, including notes, notebooks and tags will be permanently deleted.'),
[
{
text: _('Delete profile "%s"', profile.name),
onPress: () => doIt(),
style: 'destructive',
},
{
text: _('Cancel'),
onPress: () => {},
style: 'cancel',
},
],
);
}, [dialogs, profileConfig, setProfileConfigTime]);

For users with large profiles with many resources, this could be a massive waste of device storage, if the user deleted a profile and created a new one in its place, without being aware of the storage implications

Expected behaviour

The delete profile option should actually delete the profile data (the sqlite db and the resources)

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIt's a bughighHigh priority issuesmobileAll mobile platforms

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions