Skip to content

Conversation

dmitrysimkin
Copy link
Contributor

@dmitrysimkin dmitrysimkin commented Aug 13, 2025

TaskWPB-19514 [iOS] Handle reactive changes in sender name

Issue

Added logic to handle when user name changed, by introducing one publisher per user (one subject and sever cell's view models as subscribers.

Testing

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-08-13.at.18.50.17.mp4

# Conflicts:
#	WireMessaging/Sources/WireMessagingDomain/Conversation/MessageModel.swift
#	WireMessaging/Sources/WireMessagingUI/Conversation/ConversationMessagesDataSource.swift
#	WireMessaging/Sources/WireMessagingUI/Conversation/ConversationMessagesViewController.swift
#	WireMessaging/Sources/WireMessagingUI/Conversation/ConversationMessagesViewModel.swift
#	WireMessaging/Sources/WireMessagingUI/Conversation/Message Views/TextMessageView/TextMessageViewModel.swift
#	WireMessaging/Sources/WireMessagingUI/Conversation/MessageType.swift
#	WireMessaging/Sources/WireMessagingUI/Conversation/MessageUpdateType.swift
#	WirePreviewApps/WIreChatBubbles/SceneDelegate.swift
#	WirePreviewApps/WirePreviewApps.xcodeproj/project.pbxproj
#	wire-ios/Wire-iOS/Sources/UserInterface/Conversation/ConversationViewController.swift
Copy link
Contributor

github-actions bot commented Aug 13, 2025

Test Results

2 003 tests   1 976 ✅  2m 20s ⏱️
  329 suites     27 💤
    2 files        0 ❌

Results for commit e12c337.

♻️ This comment has been updated with latest results.

@dmitrysimkin dmitrysimkin changed the title feat: Chat bubbles - reactively update sender name feat: Chat bubbles - reactively update sender name - WPB-19514 Aug 13, 2025
# Conflicts:
#	WireMessaging/Sources/WireMessagingAssembly/ConversationsAssembly.swift
#	WireMessaging/Sources/WireMessagingDomain/Conversation/LoadConversationMessagesUseCase.swift
#	WireMessaging/Sources/WireMessagingUI/Conversation/ConversationMessagesDataSource.swift
#	WireMessaging/Sources/WireMessagingUI/Conversation/ConversationMessagesViewController.swift
#	WireMessaging/Sources/WireMessagingUI/Conversation/ConversationMessagesViewModel.swift
#	wire-ios/Wire-iOS/Sources/UserInterface/Conversation/Content/LoadConversationMessagesRepository.swift
#	wire-ios/Wire-iOS/Sources/UserInterface/Conversation/ConversationViewController.swift
@dmitrysimkin dmitrysimkin requested review from a team, jullianm and samwyndham and removed request for a team August 18, 2025 13:15
Base automatically changed from feature/CB-3-handle-message-send-WPB-19373 to develop August 21, 2025 15:52
# Conflicts:
#	WireMessaging/Sources/WireMessagingAssembly/ConversationsAssembly.swift
#	WireMessaging/Sources/WireMessagingUI/Conversation/ConversationDataSource.swift
#	WireMessaging/Sources/WireMessagingUI/Conversation/ConversationMessagesViewController.swift
#	wire-ios/Wire-iOS/Sources/UserInterface/Conversation/ConversationViewController.swift
Copy link
Contributor

@jullianm jullianm left a comment

Choose a reason for hiding this comment

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

Nice work! left a question

self.state = state
namePublisher?.sink { [weak self] name in
self?.state = .exists(AttributedString(name))
}.store(in: &cancellables)
Copy link
Contributor

Choose a reason for hiding this comment

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

question: no risk of having a binding still active when a view is reused ? probably works differently in SwiftUI but on UIKit we could have these issues with reusable cells if we didn't clear out the subscriptions which could mess the UI.

@samwyndham samwyndham changed the title feat: Chat bubbles - reactively update sender name - WPB-19514 feat: chat bubbles - reactively update sender name - WPB-19514 Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants