mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
8007e25fc4
commit
4bb4e6e896
@ -248,11 +248,11 @@
|
|||||||
|
|
||||||
}]];
|
}]];
|
||||||
|
|
||||||
if (!item.asFile) {
|
// if (!item.asFile) {
|
||||||
[_facesDisposable setDisposable:[[TGPaintFaceDetector detectFacesInItem:item.editableMediaItem editingContext:item.editingContext] startStrictWithNext:nil file:__FILE_NAME__ line:__LINE__]];
|
// [_facesDisposable setDisposable:[[TGPaintFaceDetector detectFacesInItem:item.editableMediaItem editingContext:item.editingContext] startStrictWithNext:nil file:__FILE_NAME__ line:__LINE__]];
|
||||||
|
//
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
_fileInfoLabel.text = nil;
|
_fileInfoLabel.text = nil;
|
||||||
|
|
||||||
|
@ -407,7 +407,7 @@ public final class PeerNameColorItemNode: ListViewItemNode, ItemListItemNode {
|
|||||||
|
|
||||||
let rowsCount = ceil(CGFloat(numItems) / CGFloat(itemsPerRow))
|
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)
|
insets = itemListNeighborsGroupedInsets(neighbors, params)
|
||||||
|
|
||||||
let layout = ListViewItemNodeLayout(contentSize: contentSize, insets: insets)
|
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)
|
var origin = CGPoint(x: sideInset, y: 10.0)
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
|
var validIds = Set<Int32>()
|
||||||
for item in items {
|
for item in items {
|
||||||
let iconItemNode: PeerNameColorIconItemNode
|
let iconItemNode: PeerNameColorIconItemNode
|
||||||
let indexKey: Int32
|
let indexKey: Int32
|
||||||
@ -545,6 +546,20 @@ public final class PeerNameColorItemNode: ListViewItemNode, ItemListItemNode {
|
|||||||
origin.x = sideInset
|
origin.x = sideInset
|
||||||
origin.y += iconSize.height + 10.0
|
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()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -715,10 +715,6 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if strongSelf.presentRecordedVoiceMessageDiscardAlert(action: action, performAction: false) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
if case let .customChatContents(customChatContents) = strongSelf.presentationInterfaceState.subject {
|
if case let .customChatContents(customChatContents) = strongSelf.presentationInterfaceState.subject {
|
||||||
switch customChatContents.kind {
|
switch customChatContents.kind {
|
||||||
case let .quickReplyMessageInput(_, shortcutType):
|
case let .quickReplyMessageInput(_, shortcutType):
|
||||||
@ -14462,13 +14458,6 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
|||||||
frames: data.frames,
|
frames: data.frames,
|
||||||
framesUpdateTimestamp: data.framesUpdateTimestamp,
|
framesUpdateTimestamp: data.framesUpdateTimestamp,
|
||||||
trimRange: data.trimRange
|
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
|
}.updatedInputTextPanelState { panelState in
|
||||||
|
@ -32,6 +32,7 @@ import AuthorizationUI
|
|||||||
import ChatFolderLinkPreviewScreen
|
import ChatFolderLinkPreviewScreen
|
||||||
import StoryContainerScreen
|
import StoryContainerScreen
|
||||||
import WallpaperGalleryScreen
|
import WallpaperGalleryScreen
|
||||||
|
import TelegramStringFormatting
|
||||||
|
|
||||||
private func defaultNavigationForPeerId(_ peerId: PeerId?, navigation: ChatControllerInteractionNavigateToPeer) -> ChatControllerInteractionNavigateToPeer {
|
private func defaultNavigationForPeerId(_ peerId: PeerId?, navigation: ChatControllerInteractionNavigateToPeer) -> ChatControllerInteractionNavigateToPeer {
|
||||||
if case .default = navigation {
|
if case .default = navigation {
|
||||||
@ -986,7 +987,15 @@ func openResolvedUrlImpl(
|
|||||||
forceDark: forceDark,
|
forceDark: forceDark,
|
||||||
action: { [weak navigationController] in
|
action: { [weak navigationController] in
|
||||||
let _ = (context.engine.payments.applyPremiumGiftCode(slug: slug)
|
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?()
|
dismissImpl?()
|
||||||
|
|
||||||
let controller = PremiumIntroScreen(context: context, source: .settings, forceDark: forceDark, forceHasPremium: true)
|
let controller = PremiumIntroScreen(context: context, source: .settings, forceDark: forceDark, forceHasPremium: true)
|
||||||
|
@ -87,6 +87,7 @@
|
|||||||
CGContextRef context = CGBitmapContextCreate(rawData, width, height, bitsPerComponent, bytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
|
CGContextRef context = CGBitmapContextCreate(rawData, width, height, bitsPerComponent, bytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
|
||||||
CGColorSpaceRelease(colorSpace);
|
CGColorSpaceRelease(colorSpace);
|
||||||
|
|
||||||
|
CGContextClearRect(context, CGRectMake(0, 0, width, height));
|
||||||
CGContextDrawImage(context, CGRectMake(0, 0, width, height), imageRef);
|
CGContextDrawImage(context, CGRectMake(0, 0, width, height), imageRef);
|
||||||
CGContextRelease(context);
|
CGContextRelease(context);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user