mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-20 04:24:41 +00:00
Merge commit 'a03f9d45403f7ebc32db6625c80863c97531f28f'
This commit is contained in:
commit
d3d96d0fe1
@ -2328,6 +2328,7 @@
|
||||
"$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib",
|
||||
"$(PROJECT_DIR)/third-party/libwebp/lib",
|
||||
);
|
||||
MODULEMAP_PRIVATE_FILE = "$(SRCROOT)/TelegramCore/module.private.modulemap";
|
||||
OTHER_LDFLAGS = "-Wl,-dead_strip";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@ -2369,6 +2370,7 @@
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
MODULEMAP_PRIVATE_FILE = "$(SRCROOT)/TelegramCore/module.private-mac.modulemap";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.Telegram.TelegramCoreMac;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
@ -2448,6 +2450,7 @@
|
||||
"$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib",
|
||||
"$(PROJECT_DIR)/third-party/libwebp/lib",
|
||||
);
|
||||
MODULEMAP_PRIVATE_FILE = "$(SRCROOT)/TelegramCore/module.private.modulemap";
|
||||
OTHER_LDFLAGS = "-Wl,-dead_strip";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@ -2592,6 +2595,7 @@
|
||||
"$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib",
|
||||
"$(PROJECT_DIR)/third-party/libwebp/lib",
|
||||
);
|
||||
MODULEMAP_PRIVATE_FILE = "$(SRCROOT)/TelegramCore/module.private.modulemap";
|
||||
OTHER_LDFLAGS = "-Wl,-dead_strip";
|
||||
OTHER_SWIFT_FLAGS = "-DDEBUG -Xfrontend -debug-time-function-bodies";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore;
|
||||
@ -2629,6 +2633,7 @@
|
||||
"$(PROJECT_DIR)/third-party/FFmpeg-iOS/lib",
|
||||
"$(PROJECT_DIR)/third-party/libwebp/lib",
|
||||
);
|
||||
MODULEMAP_PRIVATE_FILE = "$(SRCROOT)/TelegramCore/module.private.modulemap";
|
||||
OTHER_LDFLAGS = "-Wl,-dead_strip";
|
||||
OTHER_SWIFT_FLAGS = "-DDEBUG -Xfrontend -debug-time-function-bodies";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.TelegramCore;
|
||||
@ -2682,6 +2687,7 @@
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
MODULEMAP_PRIVATE_FILE = "$(SRCROOT)/TelegramCore/module.private-mac.modulemap";
|
||||
OTHER_SWIFT_FLAGS = "-DDEBUG";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.Telegram.TelegramCoreMac;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@ -2712,6 +2718,7 @@
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
MODULEMAP_PRIVATE_FILE = "$(SRCROOT)/TelegramCore/module.private-mac.modulemap";
|
||||
OTHER_SWIFT_FLAGS = "-DDEBUG";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.Telegram.TelegramCoreMac;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@ -2741,6 +2748,7 @@
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.11;
|
||||
MODULEMAP_PRIVATE_FILE = "$(SRCROOT)/TelegramCore/module.private-mac.modulemap";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.telegram.Telegram.TelegramCoreMac;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
|
@ -18,6 +18,7 @@ public func convertGroupToSupergroup(account: Account, peerId: PeerId) -> Signal
|
||||
|> mapError { _ -> ConvertGroupToSupergroupError in
|
||||
return .generic
|
||||
}
|
||||
|> timeout(5.0, queue: Queue.concurrentDefaultQueue(), alternate: .fail(.generic))
|
||||
|> mapToSignal { updates -> Signal<PeerId, ConvertGroupToSupergroupError> in
|
||||
account.stateManager.addUpdates(updates)
|
||||
var createdPeerId: PeerId?
|
||||
|
@ -10,6 +10,7 @@ fileprivate final class FunctionDescription: CustomStringConvertible {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
||||
var dict: [Int32 : (BufferReader) -> Any?] = [:]
|
||||
dict[-1471112230] = { return $0.readInt32() }
|
||||
|
@ -13,6 +13,7 @@ import Foundation
|
||||
|
||||
public struct TelegramPeerPhoto {
|
||||
public let image: TelegramMediaImage
|
||||
public let reference:TelegramMediaRemoteImageReference
|
||||
public let index:Int
|
||||
public let totalCount:Int
|
||||
}
|
||||
@ -45,13 +46,16 @@ public func requestPeerPhotos(account:Account, peerId:PeerId) -> Signal<[Telegra
|
||||
for i in 0 ..< photos.count {
|
||||
let photo = photos[i]
|
||||
let image:TelegramMediaImage
|
||||
let reference: TelegramMediaRemoteImageReference
|
||||
switch photo {
|
||||
case let .photo(data):
|
||||
image = TelegramMediaImage(imageId: MediaId(namespace: Namespaces.Media.CloudImage, id: data.id), representations: telegramMediaImageRepresentationsFromApiSizes(data.sizes))
|
||||
reference = .remoteImage(imageId: data.id, accessHash: data.accessHash)
|
||||
case let .photoEmpty(id: id):
|
||||
image = TelegramMediaImage(imageId: MediaId(namespace: Namespaces.Media.CloudImage, id: id), representations: [])
|
||||
reference = .remoteImage(imageId: id, accessHash: 0)
|
||||
}
|
||||
images.append(TelegramPeerPhoto(image: image, index: i, totalCount: totalCount))
|
||||
images.append(TelegramPeerPhoto(image: image, reference: reference, index: i, totalCount: totalCount))
|
||||
}
|
||||
|
||||
return images
|
||||
@ -116,7 +120,7 @@ public func requestPeerPhotos(account:Account, peerId:PeerId) -> Signal<[Telegra
|
||||
switch media.action {
|
||||
case let .photoUpdated(image):
|
||||
if let image = image {
|
||||
photos.append(TelegramPeerPhoto(image: image, index: index, totalCount: messages.count))
|
||||
photos.append(TelegramPeerPhoto(image: image, reference: .none, index: index, totalCount: messages.count))
|
||||
}
|
||||
default:
|
||||
break
|
||||
|
@ -7,6 +7,7 @@ import Foundation
|
||||
|
||||
public enum TelegramMediaRemoteImageReference {
|
||||
case remoteImage(imageId: Int64, accessHash: Int64)
|
||||
case none
|
||||
}
|
||||
|
||||
public final class TelegramMediaImage: Media, Equatable {
|
||||
|
@ -18,7 +18,7 @@ public func updateGroupSpecificStickerset(postbox: Postbox, network: Network, pe
|
||||
}
|
||||
if let inputChannel = apiInputChannel(peer) {
|
||||
let api = Api.functions.channels.setStickers(channel: inputChannel, stickerset: inputStickerset)
|
||||
return network.request(api) |> retryRequest |> mapToSignal { value in
|
||||
return network.request(api) |> mapError {_ in return} |> mapToSignal { value in
|
||||
switch value {
|
||||
case .boolTrue:
|
||||
return postbox.modify { modifier -> Void in
|
||||
|
3
TelegramCore/module.private-mac.modulemap
Normal file
3
TelegramCore/module.private-mac.modulemap
Normal file
@ -0,0 +1,3 @@
|
||||
module TelegramCoreMac.TelegramCorePrivate {
|
||||
export *
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user