Add observable call preview thumbnail in Video sdk#1619
Add observable call preview thumbnail in Video sdk#1619rahul-lohra wants to merge 1 commit intodevelopfrom
Conversation
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
SDK Size Comparison 📏
|
|
WalkthroughA new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/CallState.kt (1)
669-671: Add KDoc and explicit type annotation to the new publicthumbnailproperty.Two nits on this new public API surface:
- KDoc is missing. Per the coding guidelines, public APIs require
/** ... */documentation.- No explicit type annotation. Every other comparable public
StateFlowproperty in this file carries an explicit: StateFlow<T>declaration (e.g.,egress,recording,settings, …). Omitting it here is inconsistent.✏️ Proposed fix
- internal val _thumbnail = MutableStateFlow<String?>(null) - public val thumbnail = _thumbnail.asStateFlow() + internal val _thumbnail = MutableStateFlow<String?>(null) + + /** + * A URL pointing to the call preview thumbnail image, or `null` if no thumbnail is available. + * Updated whenever new call state is received from the server. + */ + public val thumbnail: StateFlow<String?> = _thumbnail.asStateFlow()As per coding guidelines: "Use KDoc (
/** ... */) for public APIs and complex subsystems."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/CallState.kt` around lines 669 - 671, Add a KDoc block and an explicit public type annotation to the new thumbnail property: document the property with /** ... */ describing what the thumbnail represents and change the declaration to include the explicit type StateFlow<String?> (matching the pattern used for other public StateFlow properties). Ensure you still back it with the internal MutableStateFlow _thumbnail and expose it via .asStateFlow() so the symbol names _thumbnail and thumbnail remain unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/CallState.kt`:
- Around line 669-671: Add a KDoc block and an explicit public type annotation
to the new thumbnail property: document the property with /** ... */ describing
what the thumbnail represents and change the declaration to include the explicit
type StateFlow<String?> (matching the pattern used for other public StateFlow
properties). Ensure you still back it with the internal MutableStateFlow
_thumbnail and expose it via .asStateFlow() so the symbol names _thumbnail and
thumbnail remain unchanged.
| MutableStateFlow<Map<String, Boolean?>>(emptyMap()) | ||
| val participantVideoEnabledOverrides = _participantVideoEnabledOverrides.asStateFlow() | ||
|
|
||
| internal val _thumbnail = MutableStateFlow<String?>(null) |
There was a problem hiding this comment.
Should be private like every other mutable backing field in this class (_settings, _transcribing, _team, etc.). internal exposes the MutableStateFlow to the entire module.




Goal
Add observable call preview thumbnail
Implementation
🎨 UI Changes
None
Testing
None
Summary by CodeRabbit