feat: Implement session deduplication in activity listing
- Added a new query parameter `collapseDuplicateSessions` to the activity listing endpoint to enable deduplication of sessions based on date, type, start time, duration, and calories. - Enhanced backend logic to handle deduplication and return the most recent entry for duplicate sessions. - Updated frontend to support the new deduplication feature, improving the clarity of displayed activity data. - Modified API utility to include the new parameter in requests for activity data.
This commit is contained in:
1 parent
f718785145
commit
c6e8371d5a
4 files changed
+189
-26
No files matched your search
@@ -344,6 +344,7 @@ export default function ActivityPage() {
|
||||
chain.map((ym) =>
|
||||
api.listActivity(ACTIVITY_MONTH_FETCH_LIMIT, undefined, {
|
||||
skipQualityFilter: true,
|
||||
collapseDuplicateSessions: true,
|
||||
month: ym,
|
||||
})
|
||||
)
|
||||
@@ -379,6 +380,7 @@ export default function ActivityPage() {
|
||||
try {
|
||||
const more = await api.listActivity(ACTIVITY_MONTH_FETCH_LIMIT, undefined, {
|
||||
skipQualityFilter: true,
|
||||
collapseDuplicateSessions: true,
|
||||
month: prev,
|
||||
})
|
||||
const newChain = [...chain, prev]
|
||||
|
||||
Reference in new issue
Block a user