Cherry-pick more fixes

This commit is contained in:
Ilya Laktyushin 2021-09-28 14:52:56 +03:00
parent bd7a43fe44
commit fd538327d8
5 changed files with 10 additions and 2 deletions

View File

@ -4289,6 +4289,7 @@ Unused sets are archived when you add more.";
"Settings.CheckPhoneNumberText" = "Keep your number up to date to ensure you can always log in to Telegram. [Learn more]()";
"Settings.KeepPhoneNumber" = "Keep %@";
"Settings.ChangePhoneNumber" = "Change Number";
"Settings.CheckPhoneNumberFAQAnchor" = "q-i-have-a-new-phone-number-what-do-i-do";
"Undo.ChatDeletedForBothSides" = "Chat deleted for both sides";

View File

@ -5827,6 +5827,10 @@ public final class VoiceChatController: ViewController {
let translation = recognizer.translation(in: self.contentContainer.view)
var velocity = recognizer.velocity(in: self.contentContainer.view)
if self.isScheduled && (translation.y < 0.0 || velocity.y < 0.0) {
return
}
if case let .known(value) = contentOffset, value > 0.0 {
velocity = CGPoint()
} else if case .unknown = contentOffset {

View File

@ -142,6 +142,9 @@ enum ChatMediaInputGridEntry: Equatable, Comparable, Identifiable {
if lhsStrings !== rhsStrings {
return false
}
if lhsPacks.count != rhsPacks.count {
return false
}
for i in 0 ..< lhsPacks.count {
if lhsPacks[i].unread != rhsPacks[i].unread {
return false

View File

@ -2,7 +2,7 @@ import Foundation
import Display
import SwiftSignalKit
private let impactTime: Double = 0.4
private let impactTime: Double = 0.6
final class PeachHaptic: EmojiHaptic {
private var hapticFeedback = HapticFeedback()

View File

@ -701,7 +701,7 @@ private func settingsItems(data: PeerInfoScreenData?, context: AccountContext, p
let phoneNumber = formatPhoneNumber(peer.phone ?? "")
items[.phone]!.append(PeerInfoScreenInfoItem(id: 0, title: presentationData.strings.Settings_CheckPhoneNumberTitle(phoneNumber).string, text: .markdown(presentationData.strings.Settings_CheckPhoneNumberText), linkAction: { link in
if case .tap = link {
interaction.openFaq("q-i-have-a-new-phone-number-what-do-i-do")
interaction.openFaq(presentationData.strings.Settings_CheckPhoneNumberFAQAnchor)
}
}))
items[.phone]!.append(PeerInfoScreenActionItem(id: 1, text: presentationData.strings.Settings_KeepPhoneNumber(phoneNumber).string, action: {