Fixing state spreed capability bug with MessageInputFragment.kt
Channel creation now works
unify conversation attributes
Reuse classified-attribute check via ConversationModel helper
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.
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.
Move channel-preset capability check into ConversationUtils.isChannel
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.
Simplify capability handling in ChatViewModel.messagesFlow
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.
Implementing suggestions
Signed-off-by: rapterjet2004 <[email protected]>
- Updated api with getContextForChatMessages
- Added ContextChatCompose for viewing the context of messages
- Added ComposeChatAdapter, a reimplementation of chat adapter
- Helper functions
- Added new date header
- Added a better Shimmer
Signed-off-by: rapterjet2004 <[email protected]>
AS sometimes wants to remove these lines.
Not sure what these lines do, but as the files app also don't have them in the Project.xml file i hope they can be removed without side effects.
Signed-off-by: Marcel Hibbe <[email protected]>
* Various improvements
This is literally the worst commit I ever did, but due to rebasing issues this is how it is.
* Fixes after rebase
Signed-off-by: Mario Danic <[email protected]>
* Updates post-rebase
Signed-off-by: Mario Danic <[email protected]>
* Updates #2 post rebase
Signed-off-by: Mario Danic <[email protected]>
* Update deps
Signed-off-by: Mario Danic <[email protected]>