-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove all user data on logging out. #545
Conversation
@@ -231,6 +232,12 @@ export class ImageStore { | |||
}); | |||
}); | |||
} | |||
|
|||
async drop() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the drop()
function isn't used anywhere except for tests, and same for the capacitor filesystem table drop implementation. If it's not used then it should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The drop
method helps the tests to clean up the persistence storage without exposing the internal implementation. Thus, IMHO, the method still need to exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it's a good reason and is the cleanest way to do it so I'm fine with that.
@@ -231,6 +232,12 @@ export class ImageStore { | |||
}); | |||
}); | |||
} | |||
|
|||
async drop() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it's a good reason and is the cleanest way to do it so I'm fine with that.
See #369. This PR has several changes regarding data persistence.
clear
method onDatabase
.clear
method onTable
interface.clear
method onPreferenceManager
.clear
method onPreferences
interface.undefined
after beingclear
ed.Observable
will NOT emit new value after beingclear
ed (withisNonNullable
operator).Promise
will emit the default value after beingclear
ed.Preferences
implementations.clear
method onImageStore
.DiaBackendAuthService.logout$()
ImageStore
,Database
andPreferenceManager
.This PR has been tested on Brave browser and Exodus 1.