Skip to content

Commit 4e7173a

Browse files
authored
Merge pull request #11972 from notbakaneko/feature/deleted-beatmapset-no-poll-updates
Skip checking for discussion updates if Beatmapset is deleted
2 parents c896668 + e790341 commit 4e7173a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

resources/js/beatmap-discussions/discussions-state-worker.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export default class DiscussionsStateWorker {
4444

4545
constructor(private readonly discussionsState: DiscussionsState) {
4646
makeObservable(this);
47-
this.timeoutCheckNew = window.setTimeout(this.checkNew, checkNewTimeoutDefault);
47+
if (this.discussionsState.beatmapset.deleted_at == null) {
48+
this.timeoutCheckNew = window.setTimeout(this.checkNew, checkNewTimeoutDefault);
49+
}
4850
}
4951

5052
@action

resources/js/beatmap-discussions/main.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export default class Main extends React.Component<Props> {
128128
</ReviewEditorConfigContext.Provider>
129129
)}
130130
<div className='floating-toolbar'>
131-
<Refresh worker={this.discussionsStateWorker} />
131+
{this.discussionsState.beatmapset.deleted_at == null && <Refresh worker={this.discussionsStateWorker} />}
132132
<BackToTop />
133133
</div>
134134
</>

0 commit comments

Comments
 (0)