From e5395e6f1627e5032855d5775a3a417f2f033fe5 Mon Sep 17 00:00:00 2001 From: Kiryl Kaveryn Date: Wed, 18 Dec 2024 13:20:18 +0400 Subject: [PATCH] [ios] add `emptyInfo` to the `TrackRecordingInfo` `emptyInfo` is used as an initial (zero) state during the recoding process starting to notify the info observers Signed-off-by: Kiryl Kaveryn --- iphone/CoreApi/CoreApi/TrackRecorder/TrackRecordingInfo.h | 2 ++ iphone/CoreApi/CoreApi/TrackRecorder/TrackRecordingInfo.mm | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/iphone/CoreApi/CoreApi/TrackRecorder/TrackRecordingInfo.h b/iphone/CoreApi/CoreApi/TrackRecorder/TrackRecordingInfo.h index 6289e90c0b..eaf1adb902 100644 --- a/iphone/CoreApi/CoreApi/TrackRecorder/TrackRecordingInfo.h +++ b/iphone/CoreApi/CoreApi/TrackRecorder/TrackRecordingInfo.h @@ -11,6 +11,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readonly) NSString * maxElevation; @property (nonatomic, readonly) NSString * minElevation; ++ (TrackRecordingInfo *)emptyInfo; + @end NS_ASSUME_NONNULL_END diff --git a/iphone/CoreApi/CoreApi/TrackRecorder/TrackRecordingInfo.mm b/iphone/CoreApi/CoreApi/TrackRecorder/TrackRecordingInfo.mm index 1cdc8f1d00..88fb0a2c4e 100644 --- a/iphone/CoreApi/CoreApi/TrackRecorder/TrackRecordingInfo.mm +++ b/iphone/CoreApi/CoreApi/TrackRecorder/TrackRecordingInfo.mm @@ -5,6 +5,10 @@ @implementation TrackRecordingInfo ++ (TrackRecordingInfo *)emptyInfo { + return [[TrackRecordingInfo alloc] initWithGpsTrackInfo:GpsTrackInfo()]; +} + @end @implementation TrackRecordingInfo (Core)