-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
22 changed files
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the GNU Affero General Public License v3.0. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
import BeatmapsetDiscussions from 'interfaces/beatmapset-discussions'; | ||
import { action, computed, makeObservable, observable } from 'mobx'; | ||
import { observer } from 'mobx-react'; | ||
import BeatmapsetDiscussions from 'models/beatmapset-discussions'; | ||
import core from 'osu-core-singleton'; | ||
import * as React from 'react'; | ||
import { downloadLimited } from 'utils/beatmapset-helper'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,12 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the GNU Affero General Public License v3.0. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
import BeatmapsetDiscussions from 'interfaces/beatmapset-discussions'; | ||
import BeatmapsetDiscussionsBundleJson from 'interfaces/beatmapset-discussions-bundle-json'; | ||
import { computed, makeObservable } from 'mobx'; | ||
import { mapBy, mapByWithNulls } from 'utils/map'; | ||
import BeatmapsetDiscussions from './beatmapset-discussions'; | ||
|
||
export default class BeatmapsetDiscussionsBundleStore implements BeatmapsetDiscussions { | ||
constructor(private bundle: BeatmapsetDiscussionsBundleJson) { | ||
makeObservable(this); | ||
} | ||
|
||
@computed | ||
get beatmaps() { | ||
return mapBy(this.bundle.beatmaps, 'id'); | ||
|
@@ -31,4 +27,8 @@ export default class BeatmapsetDiscussionsBundleStore implements BeatmapsetDiscu | |
get users() { | ||
return mapByWithNulls(this.bundle.users, 'id'); | ||
} | ||
|
||
constructor(private bundle: BeatmapsetDiscussionsBundleJson) { | ||
makeObservable(this); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...-discussions-for-modding-profile-store.ts → ...-discussions-for-modding-profile-store.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the GNU Affero General Public License v3.0. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
import BeatmapsetDiscussions from 'interfaces/beatmapset-discussions'; | ||
import { BeatmapsetDiscussionsBundleJsonForModdingProfile } from 'interfaces/beatmapset-discussions-bundle-json'; | ||
import { computed, makeObservable } from 'mobx'; | ||
import { mapBy, mapByWithNulls } from 'utils/map'; | ||
import BeatmapsetDiscussions from './beatmapset-discussions'; | ||
|
||
export default class BeatmapsetDiscussionsBundleForModdingProfileStore implements BeatmapsetDiscussions { | ||
@computed | ||
|
2 changes: 1 addition & 1 deletion
2
...js/models/beatmapset-discussions-store.ts → ...js/stores/beatmapset-discussions-store.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the GNU Affero General Public License v3.0. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
import BeatmapsetDiscussions from 'interfaces/beatmapset-discussions'; | ||
import BeatmapsetExtendedJson from 'interfaces/beatmapset-extended-json'; | ||
import BeatmapsetWithDiscussionsJson from 'interfaces/beatmapset-with-discussions-json'; | ||
import { isEmpty } from 'lodash'; | ||
import { computed, makeObservable, observable } from 'mobx'; | ||
import { mapBy, mapByWithNulls } from 'utils/map'; | ||
import BeatmapsetDiscussions from './beatmapset-discussions'; | ||
|
||
export default class BeatmapsetDiscussionsStore implements BeatmapsetDiscussions { | ||
@observable beatmapset: BeatmapsetWithDiscussionsJson; | ||
|