Various fixes

This commit is contained in:
Ilya Laktyushin 2023-02-06 15:19:48 +04:00
parent 26ae313302
commit a5bd955643
3 changed files with 3 additions and 5 deletions

View File

@ -217,17 +217,15 @@ public final class HorizontalPeerItemNode: ListViewItemNode {
strongSelf.badgeBackgroundNode.isHidden = true
}
var verticalOffset: CGFloat = 0.0
let state: RecentStatusOnlineIconState
if case .actionSheet = item.mode {
state = .panel
verticalOffset -= 9.0
} else {
state = .regular
}
strongSelf.onlineNode.setImage(PresentationResourcesChatList.recentStatusOnlineIcon(item.theme, state: state), color: nil, transition: .immediate)
strongSelf.onlineNode.frame = CGRect(x: itemLayout.size.width - onlineLayout.width - 18.0, y: itemLayout.size.height - onlineLayout.height - 18.0 + verticalOffset, width: onlineLayout.width, height: onlineLayout.height)
strongSelf.onlineNode.frame = CGRect(x: itemLayout.size.width / 2.0 + 14.0, y: itemLayout.size.width - onlineLayout.height - 30.0, width: onlineLayout.width, height: onlineLayout.height)
let _ = badgeApply()
let _ = onlineApply(animateContent)

View File

@ -1362,7 +1362,7 @@ public final class ChatHistoryListNode: ListView, ChatHistoryNode {
}
})
}
if currentIsVisible {
if currentIsVisible && currentlyPlayingVideo {
updatedScrollPosition = .index(index: .message(currentlyPlayingMessageId), position: .center(.bottom), directionHint: .Up, animated: true, highlight: true, displayLink: true)
scrollAnimationCurve = .Spring(duration: 0.4)
}

View File

@ -20,7 +20,7 @@ public struct MediaInputSettings: Codable, Equatable {
let container = try decoder.container(keyedBy: StringCodingKey.self)
self.enableRaiseToSpeak = (try container.decode(Int32.self, forKey: "enableRaiseToSpeak")) != 0
self.pauseMusicOnRecording = (try container.decodeIfPresent(Int32.self, forKey: "pauseMusicOnRecording_v2") ?? 0) != 0
self.pauseMusicOnRecording = (try container.decodeIfPresent(Int32.self, forKey: "pauseMusicOnRecording_v2") ?? 1) != 0
}
public func encode(to encoder: Encoder) throws {