mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 13:35:19 +00:00
Various fixes
This commit is contained in:
parent
8007e25fc4
commit
4bb4e6e896
@ -248,11 +248,11 @@
|
||||
|
||||
}]];
|
||||
|
||||
if (!item.asFile) {
|
||||
[_facesDisposable setDisposable:[[TGPaintFaceDetector detectFacesInItem:item.editableMediaItem editingContext:item.editingContext] startStrictWithNext:nil file:__FILE_NAME__ line:__LINE__]];
|
||||
|
||||
return;
|
||||
}
|
||||
// if (!item.asFile) {
|
||||
// [_facesDisposable setDisposable:[[TGPaintFaceDetector detectFacesInItem:item.editableMediaItem editingContext:item.editingContext] startStrictWithNext:nil file:__FILE_NAME__ line:__LINE__]];
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
|
||||
_fileInfoLabel.text = nil;
|
||||
|
||||
|
@ -407,7 +407,7 @@ public final class PeerNameColorItemNode: ListViewItemNode, ItemListItemNode {
|
||||
|
||||
let rowsCount = ceil(CGFloat(numItems) / CGFloat(itemsPerRow))
|
||||
|
||||
contentSize = CGSize(width: params.width, height: 48.0 * rowsCount)
|
||||
contentSize = CGSize(width: params.width, height: 10.0 + 42.0 * rowsCount)
|
||||
insets = itemListNeighborsGroupedInsets(neighbors, params)
|
||||
|
||||
let layout = ListViewItemNodeLayout(contentSize: contentSize, insets: insets)
|
||||
@ -518,6 +518,7 @@ public final class PeerNameColorItemNode: ListViewItemNode, ItemListItemNode {
|
||||
var origin = CGPoint(x: sideInset, y: 10.0)
|
||||
|
||||
i = 0
|
||||
var validIds = Set<Int32>()
|
||||
for item in items {
|
||||
let iconItemNode: PeerNameColorIconItemNode
|
||||
let indexKey: Int32
|
||||
@ -545,6 +546,20 @@ public final class PeerNameColorItemNode: ListViewItemNode, ItemListItemNode {
|
||||
origin.x = sideInset
|
||||
origin.y += iconSize.height + 10.0
|
||||
}
|
||||
|
||||
validIds.insert(indexKey)
|
||||
}
|
||||
|
||||
var removeKeys: [Int32] = []
|
||||
for (id, _) in strongSelf.itemNodes {
|
||||
if !validIds.contains(id) {
|
||||
removeKeys.append(id)
|
||||
}
|
||||
}
|
||||
for id in removeKeys {
|
||||
if let itemNode = strongSelf.itemNodes.removeValue(forKey: id) {
|
||||
itemNode.removeFromSupernode()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -714,11 +714,7 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
if strongSelf.presentVoiceMessageDiscardAlert(action: action, performAction: false) {
|
||||
return false
|
||||
}
|
||||
|
||||
if strongSelf.presentRecordedVoiceMessageDiscardAlert(action: action, performAction: false) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
if case let .customChatContents(customChatContents) = strongSelf.presentationInterfaceState.subject {
|
||||
switch customChatContents.kind {
|
||||
case let .quickReplyMessageInput(_, shortcutType):
|
||||
@ -14462,13 +14458,6 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
frames: data.frames,
|
||||
framesUpdateTimestamp: data.framesUpdateTimestamp,
|
||||
trimRange: data.trimRange
|
||||
// control: ChatRecordedMediaPreview.Video.Control(
|
||||
// updateTrimRange: { [weak self] start, end, updatedEnd, apply in
|
||||
// if let self, let videoRecorderValue = self.videoRecorderValue {
|
||||
// videoRecorderValue.updateTrimRange(start: start, end: end, updatedEnd: updatedEnd, apply: apply)
|
||||
// }
|
||||
// }
|
||||
// )
|
||||
)
|
||||
))
|
||||
}.updatedInputTextPanelState { panelState in
|
||||
|
@ -32,6 +32,7 @@ import AuthorizationUI
|
||||
import ChatFolderLinkPreviewScreen
|
||||
import StoryContainerScreen
|
||||
import WallpaperGalleryScreen
|
||||
import TelegramStringFormatting
|
||||
|
||||
private func defaultNavigationForPeerId(_ peerId: PeerId?, navigation: ChatControllerInteractionNavigateToPeer) -> ChatControllerInteractionNavigateToPeer {
|
||||
if case .default = navigation {
|
||||
@ -986,7 +987,15 @@ func openResolvedUrlImpl(
|
||||
forceDark: forceDark,
|
||||
action: { [weak navigationController] in
|
||||
let _ = (context.engine.payments.applyPremiumGiftCode(slug: slug)
|
||||
|> deliverOnMainQueue).startStandalone(completed: {
|
||||
|> deliverOnMainQueue).startStandalone(error: { error in
|
||||
dismissImpl?()
|
||||
|
||||
if case let .waitForExpiration(date) = error {
|
||||
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||
let dateText = stringForMediumDate(timestamp: date, strings: presentationData.strings, dateTimeFormat: presentationData.dateTimeFormat)
|
||||
(navigationController?.topViewController as? ViewController)?.present(UndoOverlayController(presentationData: presentationData, content: .info(title: presentationData.strings.Premium_Gift_ApplyLink_AlreadyHasPremium_Title, text: presentationData.strings.Premium_Gift_ApplyLink_AlreadyHasPremium_Text(dateText).string, timeout: nil, customUndoText: nil), elevatedLayout: true, position: .bottom, action: { _ in return true }), in: .window(.root))
|
||||
}
|
||||
}, completed: {
|
||||
dismissImpl?()
|
||||
|
||||
let controller = PremiumIntroScreen(context: context, source: .settings, forceDark: forceDark, forceHasPremium: true)
|
||||
@ -1030,7 +1039,7 @@ func openResolvedUrlImpl(
|
||||
(navigationController?.topViewController as? ViewController)?.present(UndoOverlayController(presentationData: presentationData, content: .forward(savedMessages: true, text: peer.id == context.account.peerId ? presentationData.strings.GiftLink_LinkSharedToSavedMessages : presentationData.strings.GiftLink_LinkSharedToChat(peer.compactDisplayTitle).string), elevatedLayout: false, animateInAsReplacement: true, action: { _ in return false }), in: .window(.root))
|
||||
|
||||
let _ = (enqueueMessages(account: context.account, peerId: peer.id, messages: messages)
|
||||
|> deliverOnMainQueue).startStandalone()
|
||||
|> deliverOnMainQueue).startStandalone()
|
||||
if let peerSelectionController = peerSelectionController {
|
||||
peerSelectionController.dismiss()
|
||||
}
|
||||
|
@ -87,6 +87,7 @@
|
||||
CGContextRef context = CGBitmapContextCreate(rawData, width, height, bitsPerComponent, bytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
|
||||
CGColorSpaceRelease(colorSpace);
|
||||
|
||||
CGContextClearRect(context, CGRectMake(0, 0, width, height));
|
||||
CGContextDrawImage(context, CGRectMake(0, 0, width, height), imageRef);
|
||||
CGContextRelease(context);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user