Skip to content

Commit

Permalink
Fix "Reset Connection to Discord" button deactivation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChunkLightTuna committed Apr 21, 2024
1 parent 2d9e860 commit 0070972
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/settings-form-application.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ export class OronderSettingsFormApplication extends FormApplication {
const event_listener = async event => {
if (event.data.status_code) {
clearInterval(message_interval)
this.init_active = false
popup.close()
event.data.errs.forEach(e => Logger.error(e, {permanent: true}))
if (event.data.auth && event.data.guild) {
Expand All @@ -302,6 +301,7 @@ export class OronderSettingsFormApplication extends FormApplication {
)?.id ?? ''
)
}
this.object.init_active = false
this.object.buttons_disabled = false
this.render()
}
Expand All @@ -314,8 +314,8 @@ export class OronderSettingsFormApplication extends FormApplication {
if (popup.closed) {
clearInterval(close_interval)
window.removeEventListener('message', event_listener)
if (this.init_active) { //if init_waiting is false we have don't need to do anything
this.init_active = false
if (this.object.init_active) { //if init_waiting is false we have don't need to do anything
this.object.init_active = false
this.object.buttons_disabled = false
this.render()
}
Expand Down

0 comments on commit 0070972

Please sign in to comment.