Add refetch for non-managed hide/restore attempts

This commit is contained in:
Dean Herbert 2022-01-11 22:55:00 +09:00
parent e0c59f4b3c
commit d5239d550a

View File

@ -122,6 +122,9 @@ namespace osu.Game.Beatmaps
using (var realm = contextFactory.CreateContext())
using (var transaction = realm.BeginWrite())
{
if (!beatmapInfo.IsManaged)
beatmapInfo = realm.Find<BeatmapInfo>(beatmapInfo.ID);
beatmapInfo.Hidden = true;
transaction.Commit();
}
@ -136,6 +139,9 @@ namespace osu.Game.Beatmaps
using (var realm = contextFactory.CreateContext())
using (var transaction = realm.BeginWrite())
{
if (!beatmapInfo.IsManaged)
beatmapInfo = realm.Find<BeatmapInfo>(beatmapInfo.ID);
beatmapInfo.Hidden = false;
transaction.Commit();
}