Skip to content

Commit

Permalink
models: Use filesystem public properties instead
Browse files Browse the repository at this point in the history
Issue #577
  • Loading branch information
tchx84 committed Apr 10, 2024
1 parent 03d4da1 commit 42a5719
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/models/filesystemsOther.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,21 +125,21 @@ var FlatpakFilesystemsOtherModel = GObject.registerClass({

const added = new Set([...paths]
.filter(p => p.length !== 0)
.filter(p => !this._filesystems._originals.has(p))
.filter(p => !this._filesystems.originals.has(p))
.filter(p => !this._originals.has(p))
.filter(p => !this._globals.has(p)));

const removedOriginals = [...this._originals]
.filter(p => !this.constructor.isOverriden(this._filesystems._overrides, p))
.filter(p => !this.constructor.isOverriden(this._filesystems.overrides, p))
.filter(p => !this.constructor.isOverriden(this._globals, p))
.filter(p => !this.constructor.isOverriden(added, p))
.filter(p => !paths.has(p))
.map(p => this.constructor.removeMode(p))
.map(p => this.constructor.negate(p));

const removedGlobals = [...this._globals]
.filter(p => !this.constructor.isOverriden(this._filesystems._originals, p))
.filter(p => !this.constructor.isOverriden(this._filesystems._overrides, p))
.filter(p => !this.constructor.isOverriden(this._filesystems.originals, p))
.filter(p => !this.constructor.isOverriden(this._filesystems.overrides, p))
.filter(p => !this.constructor.isOverriden(this._originals, p))
.filter(p => !this.constructor.isOverriden(added, p))
.filter(p => !paths.has(p))
Expand All @@ -160,15 +160,15 @@ var FlatpakFilesystemsOtherModel = GObject.registerClass({

updateProxyProperty(proxy) {
const originals = [...this._originals]
.filter(p => !this.constructor.isOverriden(this._filesystems._overrides, p))
.filter(p => !this.constructor.isOverriden(this._filesystems.overrides, p))
.filter(p => !this.constructor.isOverriden(this._globals, p))
.filter(p => !this.constructor.isOverriden(this._overrides, p));

const globals = [...this._globals]
.filter(p => !this.constructor.isStrictlyOverriden(this._originals, p))
.filter(p => !this.constructor.isOverriden(this._filesystems._overrides, p))
.filter(p => !this.constructor.isOverriden(this._filesystems.overrides, p))
.filter(p => !this.constructor.isOverriden(this._overrides, p))
.filter(p => !(this.constructor.isOverriden(this._filesystems._originals, p) &&
.filter(p => !(this.constructor.isOverriden(this._filesystems.originals, p) &&
this.constructor.isNegated(p) &&
!this.constructor.isResetOverride(p)))
.filter(p => !(this.constructor.isOverriden(this._originals, p) &&
Expand All @@ -178,7 +178,7 @@ var FlatpakFilesystemsOtherModel = GObject.registerClass({
const overrides = [...this._overrides]
.filter(p => !this.constructor.isStrictlyOverriden(this._originals, p))
.filter(p => !this.constructor.isStrictlyOverriden(this._globals, p))
.filter(p => !(this.constructor.isOverriden(this._filesystems._originals, p) &&
.filter(p => !(this.constructor.isOverriden(this._filesystems.originals, p) &&
this.constructor.isNegated(p) &&
!this.constructor.isResetOverride(p)))
.filter(p => !(this.constructor.isOverriden(this._originals, p) &&
Expand Down

0 comments on commit 42a5719

Please sign in to comment.