mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-07-06 13:47:59 +02:00
fix: save model after the state reset
This commit is contained in:
+3
-3
@@ -280,12 +280,12 @@ export default class Repository {
|
|||||||
* Reset/delete the state of the repository
|
* Reset/delete the state of the repository
|
||||||
*/
|
*/
|
||||||
async resetSate(status?: RepositoryStatus, statusMessage?: string) {
|
async resetSate(status?: RepositoryStatus, statusMessage?: string) {
|
||||||
if (status) {
|
|
||||||
await this.updateStatus(status, statusMessage);
|
|
||||||
}
|
|
||||||
// remove attribute
|
// remove attribute
|
||||||
this._model.size = { storage: 0, file: 0 };
|
this._model.size = { storage: 0, file: 0 };
|
||||||
this._model.originalFiles = undefined;
|
this._model.originalFiles = undefined;
|
||||||
|
if (status) {
|
||||||
|
await this.updateStatus(status, statusMessage);
|
||||||
|
}
|
||||||
// remove cache
|
// remove cache
|
||||||
await this.removeCache();
|
await this.removeCache();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user