📣 Adding Announcements and Channels - #6416
Conversation
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/30644556404/artifacts/8799264492 |
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/30834160916/artifacts/8864465159 |
ad99f1d to
a50d4bc
Compare
|
rebased, resolved some merge conflicts and added some commits to unify how/where the bitwise and capabilities checks are done. Not yet finished with reviewing but i for now i got these points:
|
|
APK file: https://github.com/nextcloud/talk-android/actions/runs/31022064020/artifacts/8939554324 |
| _conversationDescription.value = conversationDescription | ||
| } | ||
|
|
||
| fun updateConversationPreset(preset: String) { |
There was a problem hiding this comment.
- default and voice room also need to be handled here to set the correct values.
Otherwise when switching between the presets the values get sometimes set and sometimes not.
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Adds isClassifiedAttribute() next to isChannel()/isAnnouncement() on ConversationModel, and has ConversationUtils.isClassified() compose it instead of re-deriving the attribute bitmask check. The Conversation (json model) overload is kept for CallActivity but marked deprecated in favor of the ConversationModel one. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
…tionUtils checkIfVoiceRoom()/isChannel()/isAnnouncement()/isClassifiedAttribute() were declared on ConversationModel even though every other "does this conversation satisfy X" predicate already lives in ConversationUtils. Keeps the extension-function call syntax at all call sites, only the import path changes. ConversationModel keeps mapToConversationModel(), which is model construction rather than a business-rule predicate. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
isChannel() was a raw attribute check, so every caller had to repeat "conversation.isChannel() && hasSpreedFeatureCapability(..., ANNOUNCEMENT_PRESET)" themselves. Renamed the raw checks to isChannelAttribute()/ isAnnouncementAttribute() (mirroring isClassifiedAttribute()) and added a capability-gated isChannel(conversation, spreedCapabilities), mirroring the existing isClassified()/isClassifiedAttribute() split. Callers now call ConversationUtils.isChannel(...) directly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
spreedCapabilities was only needed inside the terminal map step of messagesFlow (to filter system messages for channels), but it was being combined into the outer flatMapLatest trigger. Any capabilities emission unrelated to the conversation forced the whole message source subscription to cancel and restart. Move the capabilities dependency to a dedicated isChannelFlow (conversationAndUserFlow + spreedCapabilities -> Boolean, with distinctUntilChanged), and combine only that into the innermost step. handleSystemMessages() now takes a plain Boolean instead of ConversationModel/SpreedCapability, making it simpler to reason about and test. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
69bae84 to
6e9afaa
Compare
|
@rapterjet2004 please have a look at my commits and let me know if something is wrong/unclear in your opinion. Besides the points that i mentioned above it look good. |
🚧 TODO
🏁 Checklist
/backport to stable-xx.x🤖 AI (if applicable)