1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 06:47:24 +08:00
Commit Graph

2901 Commits

Author SHA1 Message Date
Dean Herbert
ea8beffa61
Merge pull request #21871 from bdach/solo-statistics-watcher-reliability
Improve reliability of solo statistics watcher
2022-12-28 21:05:38 +08:00
Bartłomiej Dach
3c0b8af8f1
Allow unsubscribing from solo statistics updates
This is more of a safety item. To avoid potential duplicate key in
dictionary errors (and also avoid being slightly memory-leaky), allow
`SoloStatisticsWatcher` consumers to dispose of the subscriptions they
take out.
2022-12-28 08:07:48 +01:00
Bartłomiej Dach
a0a26b1e8c
Ignore statistics update subscriptions with invalid score ID
If score submission fails, the score will not receive a correct online
ID from web, but will still be passed on to the solo statistics watcher
on the results screen. This could lead to the watcher subscribing to
changes with score ID equal to the default of -1. If this happened more
than once, that would cause a crash due to duplicate keys in the
`callbacks` dictionary.

Closes #21837.
2022-12-28 07:54:01 +01:00
Bartłomiej Dach
e9d32fca18
Fix various failures in initial statistics fetch
- If the local user is restricted, then attempting to fetch their data
  from the `/users` endpoint would result in an empty response.

- Even if the user was successfully fetched, their `RulesetsStatistics`
  may not be populated (and instead be `null`). Curiously this was not
  picked up by static analysis until the first issue was fixed.

Closes #21839.
2022-12-28 07:31:36 +01:00
Dean Herbert
0d78bc2248 Fix osu.ppy.sh links no longer opening in-game
Addresses https://github.com/ppy/osu/discussions/21838.
2022-12-28 06:42:35 +08:00
Dean Herbert
b3e44f20bc Use new lazer API endpoint
This is a temporary change to target the new experimental/next deploy.
The main change that should result from this is having the user profile
show the pp^next values from the new domain.
2022-12-27 17:20:40 +08:00
Bartłomiej Dach
cb2b0d4178
Remove redundant type specs 2022-12-26 23:12:53 +01:00
Berkan Diler
c7ca4bbba5 Use generic Enum methods 2022-12-26 20:36:39 +01:00
Dean Herbert
209d44746a
Merge pull request #21762 from bdach/score-stats-updates
Add solo statistics watcher component to deliver incremental global user statistics updates
2022-12-24 21:30:34 +08:00
Bartłomiej Dach
78c47a3695
Add callback to dictionary rather than overwrite
Attempting to overwrite will henceforth throw an exception.
2022-12-24 13:45:04 +01:00
Bartłomiej Dach
6c4ca387e0
Fix wrong handling of missing ruleset statistics 2022-12-24 13:44:11 +01:00
Bartłomiej Dach
3c26016b61
Ensure latest stats are cleared on successful profile fetch 2022-12-24 13:44:08 +01:00
Bartłomiej Dach
fd9110a61e
Fix solo statistics watcher firing requests for invalid user with id 1
Can happen during login flow (see `APIAccess.attemptConnect()`).
2022-12-24 13:44:05 +01:00
Bartłomiej Dach
d6e079a2b4
Ignore statistics update requests from third-party rulesets for now 2022-12-24 13:43:57 +01:00
Berkan Diler
08d2fbeb8e Use new ArgumentNullException.ThrowIfNull throw-helper API 2022-12-22 21:27:59 +01:00
Bartłomiej Dach
fa2d50fe31
Limit tracking unhandled scores to just the last one 2022-12-22 19:59:39 +01:00
Bartłomiej Dach
48dc2332fd
Refactor test to be easier to work with 2022-12-22 19:59:35 +01:00
Bartłomiej Dach
ac872fac9e
Implement solo statistics watcher 2022-12-22 19:59:07 +01:00
Bartłomiej Dach
f5b3988dd2
Add data structure for delivering statistics updates 2022-12-22 08:01:59 +01:00
Bartłomiej Dach
b03291330f
Add score processed callback to spectator client 2022-12-20 21:23:50 +01:00
Joseph Madamba
01f09529a8 Link beatmap set genre and language to listing filters 2022-12-19 22:54:33 -08:00
Dean Herbert
ba54551313 Merge branch 'master' into guard-url-protocols 2022-12-16 18:23:16 +09:00
Dean Herbert
27c497145f Fix the MOTHERLOAD of undetected issues that are now visible thanks to net6.0 2022-12-16 18:16:26 +09:00
Susko3
0f34d908c7 Use LocalisableStrings for date and time formats 2022-12-16 00:05:47 +01:00
Salman Ahmed
5fbd4ad3b4 Update usages of SupportsJIT in line with framework changes 2022-12-16 00:22:11 +03:00
Salman Ahmed
660cc72f2a Avoid configuring web proxies on iOS for now 2022-12-16 00:22:11 +03:00
cdwcgt
c9cffc8248
use resolved attribute 2022-12-15 21:01:38 +09:00
Bartłomiej Dach
849245b90c
Merge branch 'master' into beginplaying-score-token 2022-12-13 17:15:24 +01:00
Dan Balasescu
caa0b7c290 Move score token to BeginPlaying 2022-12-12 13:59:27 +09:00
cdwcgt
e02b8cb199
Group export methods into their respective managers 2022-12-11 18:30:24 +09:00
cdwcgt
a1fc33668c
Merge branch 'master' into export 2022-12-09 23:40:26 +09:00
Dan Balasescu
e9998f1690 Store maximum statistics to spectator state 2022-12-09 20:15:07 +09:00
Dan Balasescu
4a65f5c864 Add score token to spectator state 2022-12-09 19:09:51 +09:00
Dan Balasescu
3570fa8d93 Fix hub clients not reconnecting after connection error 2022-12-09 17:12:20 +09:00
Joseph Madamba
56e94e49a3 Display nominated ranked beatmaps in user profile 2022-12-06 23:36:11 -08:00
Dan Balasescu
8709b1f2ea Immediately send ack request when joining new channels 2022-12-07 14:24:20 +09:00
Dan Balasescu
eea9bd3898
Merge pull request #21463 from peppy/fix-chat-system-message-ordering
Fix system messages appearing out of order in chat display
2022-12-02 17:39:20 +09:00
Dean Herbert
b1ce93e7bf Add fallback stable sort to avoid any change of misordered local messages 2022-11-30 16:55:39 +09:00
Dean Herbert
9ab4664fcc Merge branch 'master' into chat-profile-highlight-v2 2022-11-30 16:15:48 +09:00
Dean Herbert
b7f0310070
Merge pull request #21353 from peppy/no-initial-presence
Stop requesting messages as part of initial chat presence
2022-11-30 16:15:23 +09:00
Dean Herbert
6524914dbd Merge branch 'master' into chat-profile-highlight-v2 2022-11-30 16:00:52 +09:00
Dean Herbert
2d8854cbac Change message comparator to always use timestamp comparison if either message has a missing Id 2022-11-30 15:46:58 +09:00
Dean Herbert
9e34fe360a Ensure all LocalMessages get a timestamp 2022-11-30 15:46:36 +09:00
Dean Herbert
c84f011bb7 Improve ToString output of Message 2022-11-30 15:46:14 +09:00
Dean Herbert
8bf5d6884d Add ruleset to now playing string 2022-11-30 14:47:16 +09:00
Dean Herbert
b453eecebe Ensure empty pieces do not result in whitespace between elements 2022-11-30 14:43:21 +09:00
Dean Herbert
2df6ccf33e Tidy up code 2022-11-30 14:31:54 +09:00
Dean Herbert
b5c514a8f0 Make incoming Channel target non-nullable 2022-11-30 14:30:20 +09:00
Dean Herbert
69bf0df179 Merge branch 'master' into NowPlaying 2022-11-30 14:27:37 +09:00
Dean Herbert
61c702c02e Add new IDependencyInjectionCandidate interface to non-drawable cached classes 2022-11-29 14:45:26 +09:00
Dean Herbert
b5b79e09e4 Remove unnecessary CQ disable 2022-11-29 14:45:08 +09:00
Alden Wu
0cb7c94c21 Merge branch 'master' of https://github.com/ppy/osu into chat-profile-highlight-v2 2022-11-28 17:59:15 -08:00
Alden Wu
c2d8ffc225 Refactor ChatLine username drawable creation 2022-11-28 17:50:12 -08:00
cdwcgt
e16f8a4410
Merge branch 'master' into NowPlaying 2022-11-27 08:48:49 +08:00
cdwcgt
02e3ebe1a0
DifficultyIncrease use + and other all -
mod.Name to mod.Acronym
2022-11-27 09:44:09 +09:00
cdwcgt
653875bbb4
only post mod when ingame 2022-11-27 09:41:41 +09:00
cdwcgt
8ecb4aa30b
better method name 2022-11-27 09:41:08 +09:00
Bartłomiej Dach
c42720acd4
Temporarily disable "partial class with one part" inspection 2022-11-26 18:05:08 +01:00
Dan Balasescu
7bc8908ca9 Partial everything 2022-11-27 00:00:27 +09:00
cdwcgt
13f86f3e53
Merge branch 'master' into NowPlaying 2022-11-25 23:22:52 +09:00
cdwcgt
a2ea7a3f58
show selected mod and use ILocalisedBindableString in np 2022-11-25 23:20:44 +09:00
Bartłomiej Dach
2f67199b1c
Merge branch 'master' into fix-missing-day-separator 2022-11-23 18:40:44 +01:00
Dean Herbert
172e798847
Merge pull request #21228 from Terochi/recent-messages-implementation
Add ability to view chat send history in input box
2022-11-23 14:58:42 +09:00
Bartłomiej Dach
76bb529cfa
Add test for local echo adding day separator 2022-11-22 16:46:21 +01:00
cdwcgt
c509c5be40
impossible null 2022-11-21 19:45:30 +09:00
cdwcgt
e37d30a373
refactor based on reviews
removed LegacyExportManager

Separated the method of CreateZip method and the default export method
2022-11-21 18:58:01 +09:00
Dean Herbert
462a213ffc Add TODO note about handling initial silences 2022-11-21 15:23:04 +09:00
Dean Herbert
efd73ea9da Rename method to suit better 2022-11-21 15:22:57 +09:00
Dean Herbert
5c640d15a0 Stop requesting messages as part of initial chat presence 2022-11-21 15:17:54 +09:00
cdwcgt
4e457871f3
impossible null and remove storage 2022-11-19 01:03:22 +09:00
cdwcgt
4b29941b47
add LegacyExportManager 2022-11-18 20:00:00 +09:00
Dean Herbert
d17c091d63 Move constant to a better location 2022-11-18 15:47:31 +09:00
Dean Herbert
bab5be8dee
Merge pull request #21290 from smoogipoo/multiplayer-test-debug
Add some debugging for multiplayer test failures
2022-11-18 15:39:33 +09:00
Dan Balasescu
219d049edf
Merge pull request #21140 from maromalo/long-standard
Standardise scores to `long` type
2022-11-18 15:26:33 +09:00
Dan Balasescu
cc434c9113
Merge pull request #21288 from peppy/fix-no-network-slow-gameplay-load
Fix entering gameplay while network connection is in a bad state taking too long
2022-11-18 15:24:31 +09:00
Dan Balasescu
b0faa009c1 Add some debugging for multiplayer test failures 2022-11-18 14:52:11 +09:00
Dan Balasescu
57b8495c7a Merge branch 'master' into long-standard 2022-11-18 14:24:04 +09:00
Dean Herbert
964ceddf83 Fix API queue only being flushed once while in a failing state 2022-11-18 14:21:37 +09:00
Dean Herbert
a5d22195f2 Fix potential incorrect connection state resulting in null reference 2022-11-18 13:45:46 +09:00
Terochi
3d4962e181 Added functioning tests. 2022-11-17 13:07:06 +01:00
Terochi
6d83af01e2 Moved and renamed MessageHistoryTextBox.cs for better fit. 2022-11-17 13:07:06 +01:00
Dragon
b9590320b7 Moved implementation to ChatRecentTextBox.cs and derived ChatTextBox.cs and StandAloneChatDisplay.cs from it. 2022-11-17 13:07:06 +01:00
cdwcgt
e1a21e0cf9
create a task to export to avoid block main thread
Code quality and remove some #nullable disable
2022-11-17 01:08:06 +09:00
Dean Herbert
f343ba6111 Add xmldoc for chat ack request 2022-11-13 00:10:06 +09:00
Dean Herbert
22d8a1160e Fix last silence ID being updated too often, causing most silences to be missed 2022-11-13 00:10:06 +09:00
Dean Herbert
143c946128 Simplify ack re-perform flow 2022-11-12 23:02:37 +09:00
Dean Herbert
bfb939cbd0 Expand on why call needs to be made every 10 minutes 2022-11-12 22:24:27 +09:00
Dean Herbert
6a3665a6fd Remove excess logging on WebSocketNotificaitonsClient 2022-11-12 22:09:27 +09:00
maromalo
1911120afe
Merge branch 'master' into long-standard 2022-11-12 09:52:11 -03:00
Dean Herbert
ace4099079 Update ack code after incorrect merge 2022-11-12 21:41:10 +09:00
Dean Herbert
dde09d409b Merge branch 'master' into chat-silences 2022-11-12 21:00:56 +09:00
Dean Herbert
19876ca0fb
Merge branch 'master' into websocket-chat-2 2022-11-11 23:53:42 +09:00
Dan Balasescu
6ac19615fa Fix test failure 2022-11-11 14:55:41 +09:00
Dan Balasescu
fdca3c2d1c Rename method for consistency 2022-11-07 14:35:42 +09:00
Dan Balasescu
67e99b5344 Lookup channels before calling HandleJoinedChannel() 2022-11-07 14:34:55 +09:00
Joseph Madamba
b977fc8181 Use autosize instead of max width on fixed width timestamps 2022-11-06 19:28:01 -08:00
Dan Balasescu
f931bdc5ff Fix channel lookup not considering missing ids 2022-11-07 12:25:23 +09:00
Dan Balasescu
cd8402df72 Print event type to logs 2022-11-07 12:11:50 +09:00
Dan Balasescu
cf03001c83 Better handling for joining channels with only ID 2022-11-07 11:52:07 +09:00
Dan Balasescu
e3adf5a985 Handle channel parts 2022-11-07 11:36:55 +09:00
maromalo
b7ef9b176d Make score type consistent 2022-11-06 19:59:27 -03:00
Dan Balasescu
d426977f03 Handle channel joins 2022-11-04 20:11:42 +09:00
Dan Balasescu
f12ada9d92 Fix chat connecting too early 2022-11-04 19:36:24 +09:00
Dan Balasescu
1d2818dc70 Reschedule ack request on completion 2022-11-04 19:02:26 +09:00
Dan Balasescu
66bbe34116 Move polling clients to osu.Game.Tests namespace 2022-11-04 18:52:57 +09:00
Dan Balasescu
fa18b5f701 Construct notifications client inside ChannelManager 2022-11-04 18:51:00 +09:00
Dan Balasescu
72745656e7 Remove StartChat()/chat enablement 2022-11-04 18:48:34 +09:00
Dan Balasescu
58396d49dc Fix handling of local echo deduplication 2022-11-04 18:44:22 +09:00
Salman Ahmed
ac8fb4f9b2 Fix beatmap cards still potentially showing twice in listing 2022-11-04 03:23:34 +03:00
Dean Herbert
e6c45b8ab5 Merge branch 'master' into comment-report 2022-11-03 15:35:42 +09:00
Dean Herbert
4f8e912f06 Fix APINotification parsing failing 2022-11-02 17:53:19 +09:00
Dan Balasescu
063a8bdf9e Remove messages from silenced users 2022-11-02 17:13:14 +09:00
Dan Balasescu
f688ed12d0 Add test for removing chat messages 2022-11-02 17:00:47 +09:00
Dean Herbert
2b04e852be
Merge branch 'master' into websocket-chat-2 2022-11-02 14:56:13 +09:00
Dan Balasescu
30800c9252 Add/adjust xmldocs 2022-11-02 13:16:34 +09:00
Dan Balasescu
3816152c9d Merge branch 'socket-client' into websocket-chat-2 2022-11-02 11:49:57 +09:00
Dan Balasescu
e59c8b7d24 Use IDisposable instead 2022-11-02 11:49:04 +09:00
Dan Balasescu
c9108ce41b Rename StartAsync -> ConnectAsync 2022-11-02 11:44:16 +09:00
Dan Balasescu
46d1713e28 Rename Socket* -> PersistentEndpoint* 2022-11-02 11:43:22 +09:00
Dan Balasescu
8ac2075c61 Fix possible threading issues
Not really sure of the best way to handle this in general. It could be
argued that this should be a `Component` type and the bindable bound in
`LoadComplete()`...
2022-11-02 10:04:25 +09:00
Dan Balasescu
5b25ef5f2f Construct notifications client via IAPIProvider 2022-11-01 21:34:34 +09:00
Dean Herbert
17f482bfc3
Merge branch 'master' into websocket-chat-2 2022-10-31 16:11:58 +09:00
Dean Herbert
8a37649097
Merge branch 'master' into socket-client 2022-10-31 16:00:14 +09:00
Dan Balasescu
d3173ab1bd Remove weird cast 2022-10-28 18:54:34 +09:00
Dan Balasescu
ab78cde2d4 Fix crossthread mutations 2022-10-28 18:37:43 +09:00
Dan Balasescu
169bcc2654 Use polling connector in tests 2022-10-28 18:08:08 +09:00
Dan Balasescu
527b1d9db1 Generalise + add polling-style for usage in tests 2022-10-28 17:53:28 +09:00
Dan Balasescu
efa8256911 Use more verbatim strings 2022-10-28 16:32:17 +09:00
Dan Balasescu
2f731f86ba Adjust ChannelManager to use notifications client 2022-10-28 16:28:58 +09:00
Dan Balasescu
33bb1212d1 Add notifications websocket + chat implementation 2022-10-28 16:28:58 +09:00
Dan Balasescu
b3219526a5 Populate beatmap ruleset in SoloScoreInfo.ToScoreInfo() 2022-10-28 14:42:45 +09:00
Dean Herbert
dcff8a193c Use better method of forcing serialisation 2022-10-28 01:26:10 +09:00
Dean Herbert
3c4ba6e9fc Fix SoloScoreInfo.Rank not being serialised if rank is D 2022-10-27 19:02:32 +09:00
Dan Balasescu
6cca3a3dc8 Add new API requests 2022-10-27 14:55:24 +09:00
Dan Balasescu
4127aaa988 Extract general elements from HubClientConnector into SocketClientConnector 2022-10-27 14:37:10 +09:00
Dean Herbert
af84f708b7 Avoid serialising some more properties of SoloScoreInfo unless present 2022-10-21 19:30:35 +09:00
ansel
e1785f73a2 Make report's comment not optional 2022-10-16 20:14:05 +03:00
Feodor0090
fb046e31c1
Merge branch 'master' into comment-report 2022-10-14 16:57:23 +03:00
ansel
7251d41deb Add request class 2022-10-14 16:15:28 +03:00
Dan Balasescu
525f98c158 Fix max combo missing from playlists results screen 2022-10-14 18:01:54 +09:00
Dean Herbert
47fe4eb0bd Merge branch 'master' into comment-deletion 2022-10-12 15:48:26 +09:00
Dean Herbert
74db42394a Silence unobserved exceptions in BeginPlayingInternal
Closes #20526.
2022-10-05 14:31:13 +09:00
ansel
7645fe20f5 Merge branch 'master' into comment-deletion 2022-09-28 17:55:22 +03:00
ansel
58d9509ce6 Apply NRT to Comment 2022-09-27 22:45:05 +03:00
ansel
5282c8b8c6 Fix CQ 2022-09-27 19:40:18 +03:00
ansel
5da7cb5397 Make comment ID public for test 2022-09-27 19:02:18 +03:00
ansel
1721b8e47a Add request class 2022-09-27 16:25:26 +03:00
Dan Balasescu
1811647e34 Make room requests handler handle GetBeatmapRequest 2022-09-27 20:30:41 +09:00
Dean Herbert
de6709d12c Fix rank_history serialisation order dependence
```csharp
[network] 2022-09-26 18:18:39 [verbose]: Processing response from https://dev.ppy.sh/api/v2/me/ failed with Newtonsoft.Json.JsonSerializationException: Error setting value to 'rankHistory' on 'osu.Game.Online.API.Requests.Responses.APIUser'.
[network] 2022-09-26 18:18:39 [verbose]: ---> System.NullReferenceException: Object reference not set to an instance of an object.
[network] 2022-09-26 18:18:39 [verbose]: at osu.Game.Online.API.Requests.Responses.APIUser.set_rankHistory(APIRankHistory
value) in /tmp/osu/osu.Game/Online/API/Requests/Responses/APIUser.cs:line 231
```
2022-09-27 12:46:17 +09:00
Dean Herbert
a1297af441 Apply NRT to base Leaderboard classes 2022-09-26 16:12:47 +09:00