mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
feat: recalculate conflicts on sync
This commit is contained in:
18
packages/core/api/conflicts.js
Normal file
18
packages/core/api/conflicts.js
Normal file
@@ -0,0 +1,18 @@
|
||||
import Database from "./index";
|
||||
|
||||
class Conflicts {
|
||||
/**
|
||||
*
|
||||
* @param {Database} db
|
||||
*/
|
||||
constructor(db) {
|
||||
this._db = db;
|
||||
}
|
||||
|
||||
recalculate = async () => {
|
||||
if (this._db.notes.conflicted.length < 0) {
|
||||
await this._db.context.write("hasConflicts", false);
|
||||
}
|
||||
};
|
||||
}
|
||||
export default Conflicts;
|
||||
Reference in New Issue
Block a user