Adding helper method to avoid adding comment
This commit is contained in:
parent
61b1e84e61
commit
f9220e4185
@ -82,9 +82,10 @@ internal class DefaultLiveLocationAggregationProcessor @Inject constructor() : L
|
||||
?.getBestTimestampAsMilliseconds()
|
||||
?: 0
|
||||
|
||||
if (updatedLocationTimestamp > currentLocationTimestamp) {
|
||||
// only take location if it is more recent
|
||||
if (updatedLocationTimestamp.isMoreRecentThan(currentLocationTimestamp)) {
|
||||
aggregatedSummary.lastLocationContent = ContentMapper.map(content.toContent())
|
||||
}
|
||||
}
|
||||
|
||||
private fun Long.isMoreRecentThan(timestamp: Long) = this > timestamp
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user