()
| 154 | } |
| 155 | |
| 156 | destroy () { |
| 157 | // Currently only check presence on the level. |
| 158 | // TODO: Should this system also handle other models with local backups: 'LevelComponent', 'LevelSystem', 'ThangType' |
| 159 | if ((!this.level.hasLocalChanges()) && me.isAdmin()) { |
| 160 | presenceApi.deletePresence({ levelOriginalId: this.level.get('original') }) |
| 161 | } |
| 162 | |
| 163 | clearInterval(this.timerIntervalID) |
| 164 | clearInterval(this.checkPresenceIntervalID) |
| 165 | return super.destroy() |
| 166 | } |
| 167 | |
| 168 | async onAITranslate () { |
| 169 | this.openModalView(new AITranslateConfirmModal(this.level)) |
no test coverage detected