mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-17 04:20:00 +03:00
Adding helper method to avoid adding comment
This commit is contained in:
parent
61b1e84e61
commit
f9220e4185
1 changed files with 3 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue