Fix build

This commit is contained in:
Ali
2023-03-08 13:50:54 +04:00
parent 22aef07aaf
commit 27f0a39391
8 changed files with 168 additions and 11 deletions

View File

@@ -115,7 +115,7 @@ public final class AuthorizationSequenceCodeEntryController: ViewController {
if let (number, email, codeType, nextType, timeout) = self.data {
var appleSignInAllowed = false
if case let .email(_, _, _, appleSignInAllowedValue, _) = codeType {
if case let .email(_, _, _, _, appleSignInAllowedValue, _) = codeType {
appleSignInAllowed = appleSignInAllowedValue
}
self.controllerNode.updateData(number: number, email: email, codeType: codeType, nextType: nextType, timeout: timeout, appleSignInAllowed: appleSignInAllowed)
@@ -164,7 +164,7 @@ public final class AuthorizationSequenceCodeEntryController: ViewController {
self.data = (number, email, codeType, nextType, timeout)
var appleSignInAllowed = false
if case let .email(_, _, _, appleSignInAllowedValue, _) = codeType {
if case let .email(_, _, _, _, appleSignInAllowedValue, _) = codeType {
appleSignInAllowed = appleSignInAllowedValue
}
@@ -204,7 +204,7 @@ public final class AuthorizationSequenceCodeEntryController: ViewController {
minimalCodeLength = Int(length)
case let .missedCall(_, length):
minimalCodeLength = Int(length)
case let .email(_, length, _, _, _):
case let .email(_, length, _, _, _, _):
minimalCodeLength = Int(length)
case let .fragment(_, length):
minimalCodeLength = Int(length)

View File

@@ -430,7 +430,7 @@ final class AuthorizationSequenceCodeEntryControllerNode: ASDisplayNode, UITextF
codeLength = Int(length)
case let .sms(length):
codeLength = Int(length)
case let .email(_, length, _, _, _):
case let .email(_, length, _, _, _, _):
codeLength = Int(length)
case let .fragment(_, length):
codeLength = Int(length)
@@ -624,7 +624,7 @@ final class AuthorizationSequenceCodeEntryControllerNode: ASDisplayNode, UITextF
codeLength = length
case let .sms(length):
codeLength = length
case let .email(_, length, _, _, _):
case let .email(_, length, _, _, _, _):
codeLength = length
case let .fragment(_, length):
codeLength = length

View File

@@ -314,7 +314,7 @@ public final class AuthorizationSequenceController: NavigationController, MFMail
authorizationCode = .phoneCode(code)
}
if case let .email(_, _, _, _, setup) = type, setup, case let .emailVerification(emailCode) = authorizationCode {
if case let .email(_, _, _, _, setup, _) = type, setup, case let .emailVerification(emailCode) = authorizationCode {
strongSelf.actionDisposable.set(((verifyLoginEmailSetup(account: strongSelf.account, code: emailCode))
|> deliverOnMainQueue).start(error: { error in
Queue.mainQueue().async {

View File

@@ -27,7 +27,7 @@ public func authorizationCurrentOptionText(_ type: SentAuthorizationCodeType, ph
return parseMarkdownIntoAttributedString(strings.Login_CodeSentCallText(phoneNumber).string, attributes: attributes, textAlignment: .center)
case .emailSetupRequired:
return NSAttributedString(string: "", font: Font.regular(fontSize), textColor: primaryColor, paragraphAlignment: .center)
case let .email(emailPattern, _, _, _, _):
case let .email(emailPattern, _, _, _, _, _):
let mutableString = NSAttributedString(string: strings.Login_EnterCodeEmailText(email ?? emailPattern).string, font: Font.regular(fontSize), textColor: primaryColor, paragraphAlignment: .center).mutableCopy() as! NSMutableAttributedString
let string = mutableString.string

View File

@@ -353,6 +353,7 @@ public final class ReactionListContextMenuContent: ContextControllerItemsContent
}
private static let readIconImage: UIImage? = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/MenuReadIcon"), color: .white)?.withRenderingMode(.alwaysTemplate)
private static let reactionIconImage: UIImage? = generateTintedImage(image: UIImage(bundleImageName: "Chat/Message/MenuReactionIcon"), color: .white)?.withRenderingMode(.alwaysTemplate)
private final class ReactionsTabNode: ASDisplayNode, UIScrollViewDelegate {
private final class ItemNode: HighlightTrackingButtonNode {
@@ -643,6 +644,9 @@ public final class ReactionListContextMenuContent: ContextControllerItemsContent
let textFrame = CGRect(origin: CGPoint(x: titleFrame.minX + floor(textFontFraction * 18.0), y: titleFrame.maxY + textSpacing), size: textSize)
self.textLabelNode.frame = textFrame
self.readIconView.image = item.timestampIsReaction ? ReactionListContextMenuContent.reactionIconImage : ReactionListContextMenuContent.readIconImage
if let readImage = self.readIconView.image {
self.readIconView.tintColor = presentationData.theme.contextMenu.secondaryColor
let fraction: CGFloat = textFontFraction
@@ -694,7 +698,7 @@ public final class ReactionListContextMenuContent: ContextControllerItemsContent
for peer in readStats.peers {
if !existingPeers.contains(peer.id) {
existingPeers.insert(peer.id)
mergedItems.append(EngineMessageReactionListContext.Item(peer: peer, reaction: nil, timestamp: readStats.readTimestamps[peer.id]))
mergedItems.append(EngineMessageReactionListContext.Item(peer: peer, reaction: nil, timestamp: readStats.readTimestamps[peer.id], timestampIsReaction: false))
}
}
}

View File

@@ -338,7 +338,7 @@ public extension EngineMessageReactionListContext.State {
for recentPeer in reactionsAttribute.recentPeers {
if let peer = message.peers[recentPeer.peerId] {
if reaction == nil || recentPeer.value == reaction {
items.append(EngineMessageReactionListContext.Item(peer: EnginePeer(peer), reaction: recentPeer.value, timestamp: recentPeer.timestamp ?? readStats?.readTimestamps[peer.id]))
items.append(EngineMessageReactionListContext.Item(peer: EnginePeer(peer), reaction: recentPeer.value, timestamp: recentPeer.timestamp ?? readStats?.readTimestamps[peer.id], timestampIsReaction: recentPeer.timestamp != nil))
}
}
}
@@ -360,15 +360,18 @@ public final class EngineMessageReactionListContext {
public let peer: EnginePeer
public let reaction: MessageReaction.Reaction?
public let timestamp: Int32?
public let timestampIsReaction: Bool
public init(
peer: EnginePeer,
reaction: MessageReaction.Reaction?,
timestamp: Int32?
timestamp: Int32?,
timestampIsReaction: Bool
) {
self.peer = peer
self.reaction = reaction
self.timestamp = timestamp
self.timestampIsReaction = timestampIsReaction
}
public static func ==(lhs: Item, rhs: Item) -> Bool {
@@ -381,6 +384,9 @@ public final class EngineMessageReactionListContext {
if lhs.timestamp != rhs.timestamp {
return false
}
if lhs.timestampIsReaction != rhs.timestampIsReaction {
return false
}
return true
}
}
@@ -509,7 +515,7 @@ public final class EngineMessageReactionListContext {
switch reaction {
case let .messagePeerReaction(_, peer, date, reaction):
if let peer = transaction.getPeer(peer.peerId), let reaction = MessageReaction.Reaction(apiReaction: reaction) {
items.append(EngineMessageReactionListContext.Item(peer: EnginePeer(peer), reaction: reaction, timestamp: date))
items.append(EngineMessageReactionListContext.Item(peer: EnginePeer(peer), reaction: reaction, timestamp: date, timestampIsReaction: true))
}
}
}

View File

@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "heart.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -0,0 +1,135 @@
%PDF-1.7
1 0 obj
<< >>
endobj
2 0 obj
<< /Length 3 0 R >>
stream
/DeviceRGB CS
/DeviceRGB cs
q
1.000000 0.000000 -0.000000 1.000000 1.625000 0.360352 cm
0.000000 0.000000 0.000000 scn
6.962005 1.569971 m
7.317825 1.008150 l
7.322064 1.010880 l
6.962005 1.569971 l
h
6.375000 11.403881 m
5.789029 11.089458 l
5.904477 10.874304 6.128550 10.739723 6.372719 10.738885 c
6.616888 10.738048 6.841879 10.871088 6.958801 11.085444 c
6.375000 11.403881 l
h
5.787995 1.569971 m
5.427937 1.010880 l
5.432092 1.008204 5.436277 1.005574 5.440492 1.002992 c
5.787995 1.569971 l
h
6.375000 0.665119 m
6.595855 0.665119 6.796738 0.739336 6.926071 0.796043 c
7.069793 0.859060 7.206355 0.937575 7.317815 1.008166 c
6.606195 2.131776 l
6.528299 2.082441 6.453413 2.041030 6.391999 2.014103 c
6.361848 2.000883 6.342614 1.994561 6.333794 1.992147 c
6.322921 1.989172 6.338955 1.995120 6.375000 1.995120 c
6.375000 0.665119 l
h
7.322064 1.010880 m
10.881090 3.302918 13.415000 6.139813 13.415000 9.207347 c
12.085000 9.207347 l
12.085000 6.871911 10.099603 4.381577 6.601946 2.129062 c
7.322064 1.010880 l
h
13.415000 9.207347 m
13.415000 11.850730 11.559452 13.804648 9.139605 13.804648 c
9.139605 12.474648 l
10.746737 12.474648 12.085000 11.196884 12.085000 9.207347 c
13.415000 9.207347 l
h
9.139605 13.804648 m
7.595778 13.804648 6.452867 12.935374 5.791200 11.722318 c
6.958801 11.085444 l
7.433272 11.955309 8.171302 12.474648 9.139605 12.474648 c
9.139605 13.804648 l
h
6.960972 11.718305 m
6.311201 12.929241 5.160131 13.804648 3.616708 13.804648 c
3.616708 12.474648 l
4.585414 12.474648 5.327909 11.948818 5.789029 11.089458 c
6.960972 11.718305 l
h
3.616708 13.804648 m
1.198328 13.804648 -0.665000 11.852291 -0.665000 9.207347 c
0.665000 9.207347 l
0.665000 11.195323 2.008108 12.474648 3.616708 12.474648 c
3.616708 13.804648 l
h
-0.665000 9.207347 m
-0.665000 6.139813 1.868910 3.302918 5.427937 1.010880 c
6.148054 2.129062 l
2.650397 4.381577 0.665000 6.871911 0.665000 9.207347 c
-0.665000 9.207347 l
h
5.440492 1.002992 m
5.551538 0.934931 5.687469 0.857952 5.828663 0.796043 c
5.953417 0.741344 6.154605 0.665119 6.375000 0.665119 c
6.375000 1.995120 l
6.415094 1.995120 6.433691 1.988276 6.422485 1.991394 c
6.413795 1.993813 6.394164 2.000322 6.362735 2.014103 c
6.298793 2.042139 6.220120 2.085086 6.135499 2.136950 c
5.440492 1.002992 l
h
f
n
Q
endstream
endobj
3 0 obj
2285
endobj
4 0 obj
<< /Annots []
/Type /Page
/MediaBox [ 0.000000 0.000000 16.000000 16.000000 ]
/Resources 1 0 R
/Contents 2 0 R
/Parent 5 0 R
>>
endobj
5 0 obj
<< /Kids [ 4 0 R ]
/Count 1
/Type /Pages
>>
endobj
6 0 obj
<< /Pages 5 0 R
/Type /Catalog
>>
endobj
xref
0 7
0000000000 65535 f
0000000010 00000 n
0000000034 00000 n
0000002375 00000 n
0000002398 00000 n
0000002571 00000 n
0000002645 00000 n
trailer
<< /ID [ (some) (id) ]
/Root 6 0 R
/Size 7
>>
startxref
2704
%%EOF