Add inline comments for iOS locals

This commit is contained in:
Dean Herbert 2024-09-26 16:48:42 +09:00
parent 2fe229d620
commit 89e8baf1d3
No known key found for this signature in database
5 changed files with 5 additions and 0 deletions

View File

@ -198,6 +198,7 @@ protected override void PreImport(BeatmapSetInfo beatmapSet, Realm realm)
if (beatmapSet.OnlineID > 0)
{
// Required local for iOS. Will cause runtime crash if inlined.
int onlineId = beatmapSet.OnlineID;
// OnlineID should really be unique, but to avoid catastrophic failure let's iterate just to be sure.

View File

@ -40,6 +40,7 @@ protected override void LoadComplete()
// Used to interact with manager classes that don't support interface types. Will eventually be replaced.
var beatmapSetInfo = new BeatmapSetInfo { OnlineID = TrackedItem.OnlineID };
// Required local for iOS. Will cause runtime crash if inlined.
int onlineId = TrackedItem.OnlineID;
realmSubscription = realm.RegisterForNotifications(r => r.All<BeatmapSetInfo>().Where(s => s.OnlineID == onlineId && !s.DeletePending), (items, _) =>

View File

@ -46,6 +46,7 @@ protected override void LoadComplete()
Downloader.DownloadBegan += downloadBegan;
Downloader.DownloadFailed += downloadFailed;
// Required local for iOS. Will cause runtime crash if inlined.
long onlineId = TrackedItem.OnlineID;
long legacyOnlineId = TrackedItem.LegacyOnlineID;
string hash = TrackedItem.Hash;

View File

@ -29,6 +29,7 @@ public RealmBackedResourceStore(Live<T> source, IResourceStore<byte[]> underlyin
invalidateCache();
Debug.Assert(fileToStoragePathMapping != null);
// Required local for iOS. Will cause runtime crash if inlined.
Guid id = source.ID;
realmSubscription = realm?.RegisterForNotifications(r => r.All<T>().Where(s => s.ID == id), skinChanged);

View File

@ -131,6 +131,7 @@ public void SelectRandomSkin()
{
Realm.Run(r =>
{
// Required local for iOS. Will cause runtime crash if inlined.
Guid currentSkinId = CurrentSkinInfo.Value.ID;
// choose from only user skins, removing the current selection to ensure a new one is chosen.