Skip to content

Conversation

@gpunto
Copy link
Contributor

@gpunto gpunto commented Nov 3, 2025

Goal

The stories updated event now contain activities in addition to aggregated activities, so we should handle those too as pointed out in #134 (comment).

Implementation

Update activities in the story feed based on the ones that come in the event

Testing

The demo displays aggregated activities, so it's not easy to test it there. One would need to change the demo to show stories from activities instead.

Checklist

  • Issue linked (if any)
  • Tests/docs updated
  • I have signed the Stream CLA (required for external contributors)

@gpunto gpunto requested a review from Copilot November 3, 2025 10:05
@gpunto gpunto added the pr:improvement Improvement label Nov 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled.

🎉 Great job! This PR is ready for review.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for updating individual activities in addition to aggregated activities when a StoriesFeedUpdated event is received. The StoriesFeedUpdatedEvent network model already contained an activities field, but it was not being processed or passed through the state management system.

Key changes:

  • Added activities parameter to StoriesFeedUpdated state event and onStoriesFeedUpdated handler
  • Implemented updateActivities helper function to merge activity updates
  • Updated tests to verify both activities and aggregated activities are properly updated

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
StateUpdateEvent.kt Added activities field to StoriesFeedUpdated event and mapped it from the WebSocket event
FeedStateImpl.kt Added updateActivities helper function and updated onStoriesFeedUpdated to process both activities and aggregated activities
FeedEventHandler.kt Updated handler to pass activities parameter when calling onStoriesFeedUpdated
FeedEventHandlerTest.kt Updated test cases to include activities in StoriesFeedUpdated event creation
FeedStateImplTest.kt Enhanced test to verify both activities and aggregated activities are updated correctly

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

SDK Size Comparison 📏

SDK Before After Difference Status
stream-feeds-android-client 2.36 MB 2.36 MB 0.00 MB 🟢

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 3, 2025

@gpunto gpunto added bug and removed bug labels Nov 3, 2025
@gpunto gpunto marked this pull request as ready for review November 3, 2025 10:22
@aleksandar-apostolov aleksandar-apostolov merged commit bd0d86b into develop Nov 3, 2025
14 of 16 checks passed
@aleksandar-apostolov aleksandar-apostolov deleted the stories-updated-handle-activities branch November 3, 2025 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:improvement Improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants