Skip to content

Commit

Permalink
rename to less confusing name;
Browse files Browse the repository at this point in the history
because it's about the state change not if it's currently resolved.
  • Loading branch information
notbakaneko committed Jan 30, 2024
1 parent 35c439d commit 14fdb80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions resources/js/beatmap-discussions/discussion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class Discussion extends React.Component<Props> {
}

@computed
private get resolvedSystemPostId() {
private get resolvedStateChangedPostId() {
// TODO: handling resolved status in bundles....?
if (this.props.discussionsState == null) return -1;

Expand Down Expand Up @@ -236,7 +236,7 @@ export class Discussion extends React.Component<Props> {
post={post}
read={this.isRead(post)}
readonly={this.readonly}
resolved={post.id <= this.resolvedSystemPostId}
resolvedStateChangedPostId={this.resolvedStateChangedPostId}
store={this.props.store}
type={type}
user={user}
Expand Down
6 changes: 3 additions & 3 deletions resources/js/beatmap-discussions/post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ interface Props {
post: BeatmapsetDiscussionMessagePostJson;
read: boolean;
readonly: boolean;
resolved: boolean;
resolvedStateChangedPostId: number;
store: BeatmapsetDiscussionsStore;
type: string;
user: UserJson;
Expand All @@ -50,7 +50,7 @@ interface Props {
@observer
export default class Post extends React.Component<Props> {
static defaultProps = {
resolved: false,
resolvedStateChangedPostId: -1,
};

@observable private canSave = true; // this isn't computed because Editor's onChange doesn't provide anything to react to.
Expand Down Expand Up @@ -85,7 +85,7 @@ export default class Post extends React.Component<Props> {
return this.isAdmin
|| (!downloadLimited(this.beatmapset)
&& this.isOwn
&& !this.props.resolved
&& this.props.post.id > this.props.resolvedStateChangedPostId
&& !this.beatmapset.discussion_locked
);
}
Expand Down

0 comments on commit 14fdb80

Please sign in to comment.