WIP: Fixes

This commit is contained in:
Kylmakalle 2025-06-16 15:57:26 +03:00
parent cf3796f833
commit 2a67eff841
2 changed files with 4 additions and 3 deletions

View File

@ -152,11 +152,11 @@ public class ChatMessageShareButton: ASDisplayNode {
} else if case let .customChatContents(contents) = subject, case .hashTagSearch = contents.kind {
updatedIconImage = PresentationResourcesChat.chatFreeNavigateButtonIcon(presentationData.theme.theme, wallpaper: presentationData.theme.wallpaper)
updatedIconOffset = CGPoint(x: UIScreenPixel, y: 1.0)
} else if let hasTranslation = hasTranslation /* MARK: Swiftgram */ {
updatedIconImage = PresentationResourcesChat.chatTranslateShareButtonIcon(presentationData.theme.theme, wallpaper: presentationData.theme.wallpaper, undoTranslate: hasTranslation)
} else if isNavigate {
updatedIconImage = PresentationResourcesChat.chatFreeNavigateToThreadButtonIcon(presentationData.theme.theme, wallpaper: presentationData.theme.wallpaper)
updatedIconOffset = CGPoint(x: UIScreenPixel, y: -3.0)
} else if let hasTranslation = hasTranslation /* MARK: Swiftgram */ {
updatedIconImage = PresentationResourcesChat.chatTranslateShareButtonIcon(presentationData.theme.theme, wallpaper: presentationData.theme.wallpaper, undoTranslate: hasTranslation)
} else if case .pinnedMessages = subject {
updatedIconImage = PresentationResourcesChat.chatFreeNavigateButtonIcon(presentationData.theme.theme, wallpaper: presentationData.theme.wallpaper)
updatedIconOffset = CGPoint(x: UIScreenPixel, y: 1.0)

View File

@ -2092,7 +2092,8 @@ extension ChatControllerImpl {
return nil
}
}
|> distinctUntilChanged).startStrict(next: { [weak self] translationState in
|> distinctUntilChanged
|> deliverOnMainQueue).startStrict(next: { [weak self] translationState in
if let strongSelf = self, let translationState = translationState, strongSelf.state.predictedChatLanguage == nil {
let previousState = strongSelf.state