From 920b9752946dac40898adc43689a40bb526f450e Mon Sep 17 00:00:00 2001 From: Kyle Matthew Hedden Date: Tue, 27 Dec 2022 16:47:41 -0500 Subject: [PATCH] expose method to report the final load operation source --- MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h | 1 + MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h index ab87548..1a9f80a 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.h @@ -22,6 +22,7 @@ @property (nullable, strong, nonatomic) MVMCoreLoadObject *loadObject; @property (nullable, strong, nonatomic) NSDictionary *dataForPage; @property (nullable, strong, nonatomic) DelegateObject *delegateObject; +@property (nullable, nonatomic, readonly) NSString *finalLoadSource; @property (nonatomic) BOOL backgroundLoad; @property (nonatomic, getter=areDependenciesAdded) BOOL dependenciesAdded; diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m index d48d53f..48f104c 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m @@ -77,6 +77,10 @@ [super start]; } +- (NSString *)finalLoadSource { + return _sessionTask.currentRequest.URL.absoluteString; +} + - (void)markAsFinished { // stop any loading animation we may have started