mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix build
This commit is contained in:
parent
d5f3580d78
commit
6602671913
@ -7,7 +7,6 @@
|
|||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
D06018E522F36A3900796784 /* DeviceAccess.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018E422F36A3900796784 /* DeviceAccess.framework */; };
|
|
||||||
D06018E722F36A3F00796784 /* TelegramPresentationData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018E622F36A3F00796784 /* TelegramPresentationData.framework */; };
|
D06018E722F36A3F00796784 /* TelegramPresentationData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D06018E622F36A3F00796784 /* TelegramPresentationData.framework */; };
|
||||||
D0D3285422F329A900D07EE2 /* AccountContext.h in Headers */ = {isa = PBXBuildFile; fileRef = D0D3285222F329A900D07EE2 /* AccountContext.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
D0D3285422F329A900D07EE2 /* AccountContext.h in Headers */ = {isa = PBXBuildFile; fileRef = D0D3285222F329A900D07EE2 /* AccountContext.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
D0D3285F22F335B000D07EE2 /* AccountContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D3285E22F335B000D07EE2 /* AccountContext.swift */; };
|
D0D3285F22F335B000D07EE2 /* AccountContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0D3285E22F335B000D07EE2 /* AccountContext.swift */; };
|
||||||
@ -36,7 +35,6 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
D06018E722F36A3F00796784 /* TelegramPresentationData.framework in Frameworks */,
|
D06018E722F36A3F00796784 /* TelegramPresentationData.framework in Frameworks */,
|
||||||
D06018E522F36A3900796784 /* DeviceAccess.framework in Frameworks */,
|
|
||||||
D0D328A322F3462800D07EE2 /* SwiftSignalKit.framework in Frameworks */,
|
D0D328A322F3462800D07EE2 /* SwiftSignalKit.framework in Frameworks */,
|
||||||
D0D328A122F3462400D07EE2 /* Postbox.framework in Frameworks */,
|
D0D328A122F3462400D07EE2 /* Postbox.framework in Frameworks */,
|
||||||
D0D3289F22F3462000D07EE2 /* TelegramCore.framework in Frameworks */,
|
D0D3289F22F3462000D07EE2 /* TelegramCore.framework in Frameworks */,
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
|
D068EE9222F4ABB60064E921 /* AccountContext.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D068EE9122F4ABB60064E921 /* AccountContext.framework */; };
|
||||||
D0AE31FE22B281300058D3BC /* DeviceAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AE31FC22B281300058D3BC /* DeviceAccess.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
D0AE31FE22B281300058D3BC /* DeviceAccess.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AE31FC22B281300058D3BC /* DeviceAccess.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
D0AE320522B2818D0058D3BC /* DeviceAccess.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AE320422B2818D0058D3BC /* DeviceAccess.swift */; };
|
D0AE320522B2818D0058D3BC /* DeviceAccess.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AE320422B2818D0058D3BC /* DeviceAccess.swift */; };
|
||||||
D0AE320A22B281CA0058D3BC /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0AE320922B281CA0058D3BC /* Display.framework */; };
|
D0AE320A22B281CA0058D3BC /* Display.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0AE320922B281CA0058D3BC /* Display.framework */; };
|
||||||
@ -17,6 +18,7 @@
|
|||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
D068EE9122F4ABB60064E921 /* AccountContext.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AccountContext.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
D0AE31F922B281300058D3BC /* DeviceAccess.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = DeviceAccess.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
D0AE31F922B281300058D3BC /* DeviceAccess.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = DeviceAccess.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
D0AE31FC22B281300058D3BC /* DeviceAccess.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DeviceAccess.h; sourceTree = "<group>"; };
|
D0AE31FC22B281300058D3BC /* DeviceAccess.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DeviceAccess.h; sourceTree = "<group>"; };
|
||||||
D0AE31FD22B281300058D3BC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
D0AE31FD22B281300058D3BC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
@ -33,6 +35,7 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
D068EE9222F4ABB60064E921 /* AccountContext.framework in Frameworks */,
|
||||||
D0AE321222B2821B0058D3BC /* TelegramPresentationData.framework in Frameworks */,
|
D0AE321222B2821B0058D3BC /* TelegramPresentationData.framework in Frameworks */,
|
||||||
D0AE321022B281E50058D3BC /* LegacyComponents.framework in Frameworks */,
|
D0AE321022B281E50058D3BC /* LegacyComponents.framework in Frameworks */,
|
||||||
D0AE320E22B281D30058D3BC /* SwiftSignalKit.framework in Frameworks */,
|
D0AE320E22B281D30058D3BC /* SwiftSignalKit.framework in Frameworks */,
|
||||||
@ -74,6 +77,7 @@
|
|||||||
D0AE320822B281CA0058D3BC /* Frameworks */ = {
|
D0AE320822B281CA0058D3BC /* Frameworks */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
D068EE9122F4ABB60064E921 /* AccountContext.framework */,
|
||||||
D0AE321122B2821B0058D3BC /* TelegramPresentationData.framework */,
|
D0AE321122B2821B0058D3BC /* TelegramPresentationData.framework */,
|
||||||
D0AE320F22B281E50058D3BC /* LegacyComponents.framework */,
|
D0AE320F22B281E50058D3BC /* LegacyComponents.framework */,
|
||||||
D0AE320D22B281D30058D3BC /* SwiftSignalKit.framework */,
|
D0AE320D22B281D30058D3BC /* SwiftSignalKit.framework */,
|
||||||
|
@ -3,11 +3,11 @@ import UIKit
|
|||||||
import Postbox
|
import Postbox
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
|
|
||||||
final class CachedStickerAJpegRepresentation: CachedMediaResourceRepresentation {
|
public final class CachedStickerAJpegRepresentation: CachedMediaResourceRepresentation {
|
||||||
let size: CGSize?
|
public let size: CGSize?
|
||||||
let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
public let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
||||||
|
|
||||||
var uniqueId: String {
|
public var uniqueId: String {
|
||||||
if let size = self.size {
|
if let size = self.size {
|
||||||
return "sticker-ajpeg-\(Int(size.width))x\(Int(size.height))"
|
return "sticker-ajpeg-\(Int(size.width))x\(Int(size.height))"
|
||||||
} else {
|
} else {
|
||||||
@ -15,11 +15,11 @@ final class CachedStickerAJpegRepresentation: CachedMediaResourceRepresentation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
init(size: CGSize?) {
|
public init(size: CGSize?) {
|
||||||
self.size = size
|
self.size = size
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
public func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
||||||
if let to = to as? CachedStickerAJpegRepresentation {
|
if let to = to as? CachedStickerAJpegRepresentation {
|
||||||
return self.size == to.size
|
return self.size == to.size
|
||||||
} else {
|
} else {
|
||||||
@ -28,27 +28,27 @@ final class CachedStickerAJpegRepresentation: CachedMediaResourceRepresentation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum CachedScaledImageRepresentationMode: Int32 {
|
public enum CachedScaledImageRepresentationMode: Int32 {
|
||||||
case fill = 0
|
case fill = 0
|
||||||
case aspectFit = 1
|
case aspectFit = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
final class CachedScaledImageRepresentation: CachedMediaResourceRepresentation {
|
public final class CachedScaledImageRepresentation: CachedMediaResourceRepresentation {
|
||||||
let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
public let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
||||||
|
|
||||||
let size: CGSize
|
public let size: CGSize
|
||||||
let mode: CachedScaledImageRepresentationMode
|
public let mode: CachedScaledImageRepresentationMode
|
||||||
|
|
||||||
var uniqueId: String {
|
public var uniqueId: String {
|
||||||
return "scaled-image-\(Int(self.size.width))x\(Int(self.size.height))-\(self.mode.rawValue)"
|
return "scaled-image-\(Int(self.size.width))x\(Int(self.size.height))-\(self.mode.rawValue)"
|
||||||
}
|
}
|
||||||
|
|
||||||
init(size: CGSize, mode: CachedScaledImageRepresentationMode) {
|
public init(size: CGSize, mode: CachedScaledImageRepresentationMode) {
|
||||||
self.size = size
|
self.size = size
|
||||||
self.mode = mode
|
self.mode = mode
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
public func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
||||||
if let to = to as? CachedScaledImageRepresentation {
|
if let to = to as? CachedScaledImageRepresentation {
|
||||||
return self.size == to.size && self.mode == to.mode
|
return self.size == to.size && self.mode == to.mode
|
||||||
} else {
|
} else {
|
||||||
@ -57,14 +57,17 @@ final class CachedScaledImageRepresentation: CachedMediaResourceRepresentation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final class CachedVideoFirstFrameRepresentation: CachedMediaResourceRepresentation {
|
public final class CachedVideoFirstFrameRepresentation: CachedMediaResourceRepresentation {
|
||||||
let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
public let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
||||||
|
|
||||||
var uniqueId: String {
|
public var uniqueId: String {
|
||||||
return "first-frame"
|
return "first-frame"
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
public init() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
||||||
if to is CachedVideoFirstFrameRepresentation {
|
if to is CachedVideoFirstFrameRepresentation {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
@ -73,20 +76,20 @@ final class CachedVideoFirstFrameRepresentation: CachedMediaResourceRepresentati
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final class CachedScaledVideoFirstFrameRepresentation: CachedMediaResourceRepresentation {
|
public final class CachedScaledVideoFirstFrameRepresentation: CachedMediaResourceRepresentation {
|
||||||
let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
public let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
||||||
|
|
||||||
let size: CGSize
|
public let size: CGSize
|
||||||
|
|
||||||
var uniqueId: String {
|
public var uniqueId: String {
|
||||||
return "scaled-frame-\(Int(self.size.width))x\(Int(self.size.height))"
|
return "scaled-frame-\(Int(self.size.width))x\(Int(self.size.height))"
|
||||||
}
|
}
|
||||||
|
|
||||||
init(size: CGSize) {
|
public init(size: CGSize) {
|
||||||
self.size = size
|
self.size = size
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
public func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
||||||
if let to = to as? CachedScaledVideoFirstFrameRepresentation {
|
if let to = to as? CachedScaledVideoFirstFrameRepresentation {
|
||||||
return self.size == to.size
|
return self.size == to.size
|
||||||
} else {
|
} else {
|
||||||
@ -95,14 +98,17 @@ final class CachedScaledVideoFirstFrameRepresentation: CachedMediaResourceRepres
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final class CachedBlurredWallpaperRepresentation: CachedMediaResourceRepresentation {
|
public final class CachedBlurredWallpaperRepresentation: CachedMediaResourceRepresentation {
|
||||||
let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
public let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
||||||
|
|
||||||
var uniqueId: String {
|
public var uniqueId: String {
|
||||||
return "blurred-wallpaper"
|
return "blurred-wallpaper"
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
public init() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
||||||
if to is CachedBlurredWallpaperRepresentation {
|
if to is CachedBlurredWallpaperRepresentation {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
@ -111,12 +117,12 @@ final class CachedBlurredWallpaperRepresentation: CachedMediaResourceRepresentat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final class CachedPatternWallpaperMaskRepresentation: CachedMediaResourceRepresentation {
|
public final class CachedPatternWallpaperMaskRepresentation: CachedMediaResourceRepresentation {
|
||||||
let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
public let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
||||||
|
|
||||||
let size: CGSize?
|
public let size: CGSize?
|
||||||
|
|
||||||
var uniqueId: String {
|
public var uniqueId: String {
|
||||||
if let size = self.size {
|
if let size = self.size {
|
||||||
return "pattern-wallpaper-mask-\(Int(size.width))x\(Int(size.height))"
|
return "pattern-wallpaper-mask-\(Int(size.width))x\(Int(size.height))"
|
||||||
} else {
|
} else {
|
||||||
@ -124,11 +130,11 @@ final class CachedPatternWallpaperMaskRepresentation: CachedMediaResourceReprese
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
init(size: CGSize?) {
|
public init(size: CGSize?) {
|
||||||
self.size = size
|
self.size = size
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
public func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
||||||
if let to = to as? CachedPatternWallpaperMaskRepresentation {
|
if let to = to as? CachedPatternWallpaperMaskRepresentation {
|
||||||
return self.size == to.size
|
return self.size == to.size
|
||||||
} else {
|
} else {
|
||||||
@ -138,22 +144,22 @@ final class CachedPatternWallpaperMaskRepresentation: CachedMediaResourceReprese
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
final class CachedPatternWallpaperRepresentation: CachedMediaResourceRepresentation {
|
public final class CachedPatternWallpaperRepresentation: CachedMediaResourceRepresentation {
|
||||||
let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
public let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
||||||
|
|
||||||
let color: Int32
|
public let color: Int32
|
||||||
let intensity: Int32
|
public let intensity: Int32
|
||||||
|
|
||||||
var uniqueId: String {
|
public var uniqueId: String {
|
||||||
return "pattern-wallpaper-\(self.color)-\(self.intensity)"
|
return "pattern-wallpaper-\(self.color)-\(self.intensity)"
|
||||||
}
|
}
|
||||||
|
|
||||||
init(color: Int32, intensity: Int32) {
|
public init(color: Int32, intensity: Int32) {
|
||||||
self.color = color
|
self.color = color
|
||||||
self.intensity = intensity
|
self.intensity = intensity
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
public func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
||||||
if let to = to as? CachedPatternWallpaperRepresentation {
|
if let to = to as? CachedPatternWallpaperRepresentation {
|
||||||
return self.color == to.color && self.intensity == intensity
|
return self.color == to.color && self.intensity == intensity
|
||||||
} else {
|
} else {
|
||||||
@ -162,12 +168,12 @@ final class CachedPatternWallpaperRepresentation: CachedMediaResourceRepresentat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final class CachedAlbumArtworkRepresentation: CachedMediaResourceRepresentation {
|
public final class CachedAlbumArtworkRepresentation: CachedMediaResourceRepresentation {
|
||||||
let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
public let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
||||||
|
|
||||||
let size: CGSize?
|
public let size: CGSize?
|
||||||
|
|
||||||
var uniqueId: String {
|
public var uniqueId: String {
|
||||||
if let size = self.size {
|
if let size = self.size {
|
||||||
return "album-artwork-\(Int(size.width))x\(Int(size.height))"
|
return "album-artwork-\(Int(size.width))x\(Int(size.height))"
|
||||||
} else {
|
} else {
|
||||||
@ -175,11 +181,11 @@ final class CachedAlbumArtworkRepresentation: CachedMediaResourceRepresentation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
init(size: CGSize) {
|
public init(size: CGSize) {
|
||||||
self.size = size
|
self.size = size
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
public func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
||||||
if let to = to as? CachedAlbumArtworkRepresentation {
|
if let to = to as? CachedAlbumArtworkRepresentation {
|
||||||
return self.size == to.size
|
return self.size == to.size
|
||||||
} else {
|
} else {
|
||||||
@ -188,20 +194,20 @@ final class CachedAlbumArtworkRepresentation: CachedMediaResourceRepresentation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final class CachedEmojiThumbnailRepresentation: CachedMediaResourceRepresentation {
|
public final class CachedEmojiThumbnailRepresentation: CachedMediaResourceRepresentation {
|
||||||
let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
public let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
||||||
|
|
||||||
let outline: Bool
|
public let outline: Bool
|
||||||
|
|
||||||
var uniqueId: String {
|
public var uniqueId: String {
|
||||||
return "emoji-thumb-\(self.outline ? 1 : 0)"
|
return "emoji-thumb-\(self.outline ? 1 : 0)"
|
||||||
}
|
}
|
||||||
|
|
||||||
init(outline: Bool) {
|
public init(outline: Bool) {
|
||||||
self.outline = outline
|
self.outline = outline
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
public func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
||||||
if let to = to as? CachedEmojiThumbnailRepresentation {
|
if let to = to as? CachedEmojiThumbnailRepresentation {
|
||||||
return self.outline == to.outline
|
return self.outline == to.outline
|
||||||
} else {
|
} else {
|
||||||
@ -210,22 +216,22 @@ final class CachedEmojiThumbnailRepresentation: CachedMediaResourceRepresentatio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final class CachedEmojiRepresentation: CachedMediaResourceRepresentation {
|
public final class CachedEmojiRepresentation: CachedMediaResourceRepresentation {
|
||||||
let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
public let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
||||||
|
|
||||||
let tile: UInt8
|
public let tile: UInt8
|
||||||
let outline: Bool
|
public let outline: Bool
|
||||||
|
|
||||||
var uniqueId: String {
|
public var uniqueId: String {
|
||||||
return "emoji-\(Int(self.tile))-\(self.outline ? 1 : 0)"
|
return "emoji-\(Int(self.tile))-\(self.outline ? 1 : 0)"
|
||||||
}
|
}
|
||||||
|
|
||||||
init(tile: UInt8, outline: Bool) {
|
public init(tile: UInt8, outline: Bool) {
|
||||||
self.tile = tile
|
self.tile = tile
|
||||||
self.outline = outline
|
self.outline = outline
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
public func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
||||||
if let to = to as? CachedEmojiRepresentation {
|
if let to = to as? CachedEmojiRepresentation {
|
||||||
return self.tile == to.tile && self.outline == to.outline
|
return self.tile == to.tile && self.outline == to.outline
|
||||||
} else {
|
} else {
|
||||||
@ -234,22 +240,22 @@ final class CachedEmojiRepresentation: CachedMediaResourceRepresentation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final class CachedAnimatedStickerFirstFrameRepresentation: CachedMediaResourceRepresentation {
|
public final class CachedAnimatedStickerFirstFrameRepresentation: CachedMediaResourceRepresentation {
|
||||||
let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
public let keepDuration: CachedMediaRepresentationKeepDuration = .general
|
||||||
|
|
||||||
let width: Int32
|
public let width: Int32
|
||||||
let height: Int32
|
public let height: Int32
|
||||||
|
|
||||||
init(width: Int32, height: Int32) {
|
public init(width: Int32, height: Int32) {
|
||||||
self.width = width
|
self.width = width
|
||||||
self.height = height
|
self.height = height
|
||||||
}
|
}
|
||||||
|
|
||||||
var uniqueId: String {
|
public var uniqueId: String {
|
||||||
return "animated-sticker-first-frame-\(self.width)x\(self.height)-v1"
|
return "animated-sticker-first-frame-\(self.width)x\(self.height)-v1"
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
public func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
||||||
if let other = to as? CachedAnimatedStickerFirstFrameRepresentation {
|
if let other = to as? CachedAnimatedStickerFirstFrameRepresentation {
|
||||||
if other.width != self.width {
|
if other.width != self.width {
|
||||||
return false
|
return false
|
||||||
@ -264,22 +270,22 @@ final class CachedAnimatedStickerFirstFrameRepresentation: CachedMediaResourceRe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final class CachedAnimatedStickerRepresentation: CachedMediaResourceRepresentation {
|
public final class CachedAnimatedStickerRepresentation: CachedMediaResourceRepresentation {
|
||||||
let keepDuration: CachedMediaRepresentationKeepDuration = .shortLived
|
public let keepDuration: CachedMediaRepresentationKeepDuration = .shortLived
|
||||||
|
|
||||||
let width: Int32
|
public let width: Int32
|
||||||
let height: Int32
|
public let height: Int32
|
||||||
|
|
||||||
var uniqueId: String {
|
public var uniqueId: String {
|
||||||
return "animated-sticker-\(self.width)x\(self.height)-v7"
|
return "animated-sticker-\(self.width)x\(self.height)-v7"
|
||||||
}
|
}
|
||||||
|
|
||||||
init(width: Int32, height: Int32) {
|
public init(width: Int32, height: Int32) {
|
||||||
self.width = width
|
self.width = width
|
||||||
self.height = height
|
self.height = height
|
||||||
}
|
}
|
||||||
|
|
||||||
func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
public func isEqual(to: CachedMediaResourceRepresentation) -> Bool {
|
||||||
if let other = to as? CachedAnimatedStickerRepresentation {
|
if let other = to as? CachedAnimatedStickerRepresentation {
|
||||||
if other.width != self.width {
|
if other.width != self.width {
|
||||||
return false
|
return false
|
||||||
|
@ -5,6 +5,7 @@ import TelegramCore
|
|||||||
import Display
|
import Display
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import Postbox
|
import Postbox
|
||||||
|
import MediaResources
|
||||||
|
|
||||||
private var backgroundImageForWallpaper: (TelegramWallpaper, Bool, UIImage)?
|
private var backgroundImageForWallpaper: (TelegramWallpaper, Bool, UIImage)?
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
D06017F522F35A4000796784 /* PresentationThemeEssentialGraphics.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06017F422F35A4000796784 /* PresentationThemeEssentialGraphics.swift */; };
|
D06017F522F35A4000796784 /* PresentationThemeEssentialGraphics.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06017F422F35A4000796784 /* PresentationThemeEssentialGraphics.swift */; };
|
||||||
D06017F722F35A9200796784 /* ChatMessageBubbleImages.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06017F622F35A9200796784 /* ChatMessageBubbleImages.swift */; };
|
D06017F722F35A9200796784 /* ChatMessageBubbleImages.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06017F622F35A9200796784 /* ChatMessageBubbleImages.swift */; };
|
||||||
D06017F922F35ACF00796784 /* WallpaperUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06017F822F35ACF00796784 /* WallpaperUtils.swift */; };
|
D06017F922F35ACF00796784 /* WallpaperUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06017F822F35ACF00796784 /* WallpaperUtils.swift */; };
|
||||||
|
D068EE9022F4A9B60064E921 /* MediaResources.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D068EE8F22F4A9B60064E921 /* MediaResources.framework */; };
|
||||||
D084F9F022F3AEFD004874CE /* ChatControllerBackgroundNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D084F9EF22F3AEFD004874CE /* ChatControllerBackgroundNode.swift */; };
|
D084F9F022F3AEFD004874CE /* ChatControllerBackgroundNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D084F9EF22F3AEFD004874CE /* ChatControllerBackgroundNode.swift */; };
|
||||||
D0AE31AB22B273F20058D3BC /* TelegramPresentationData.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AE31A922B273F20058D3BC /* TelegramPresentationData.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
D0AE31AB22B273F20058D3BC /* TelegramPresentationData.h in Headers */ = {isa = PBXBuildFile; fileRef = D0AE31A922B273F20058D3BC /* TelegramPresentationData.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
D0AE31B422B2746B0058D3BC /* PresentationStrings.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AE31B122B2746B0058D3BC /* PresentationStrings.swift */; };
|
D0AE31B422B2746B0058D3BC /* PresentationStrings.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0AE31B122B2746B0058D3BC /* PresentationStrings.swift */; };
|
||||||
@ -62,6 +63,7 @@
|
|||||||
D06017F422F35A4000796784 /* PresentationThemeEssentialGraphics.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresentationThemeEssentialGraphics.swift; sourceTree = "<group>"; };
|
D06017F422F35A4000796784 /* PresentationThemeEssentialGraphics.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresentationThemeEssentialGraphics.swift; sourceTree = "<group>"; };
|
||||||
D06017F622F35A9200796784 /* ChatMessageBubbleImages.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatMessageBubbleImages.swift; sourceTree = "<group>"; };
|
D06017F622F35A9200796784 /* ChatMessageBubbleImages.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatMessageBubbleImages.swift; sourceTree = "<group>"; };
|
||||||
D06017F822F35ACF00796784 /* WallpaperUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WallpaperUtils.swift; sourceTree = "<group>"; };
|
D06017F822F35ACF00796784 /* WallpaperUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WallpaperUtils.swift; sourceTree = "<group>"; };
|
||||||
|
D068EE8F22F4A9B60064E921 /* MediaResources.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MediaResources.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
D084F9EF22F3AEFD004874CE /* ChatControllerBackgroundNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatControllerBackgroundNode.swift; sourceTree = "<group>"; };
|
D084F9EF22F3AEFD004874CE /* ChatControllerBackgroundNode.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChatControllerBackgroundNode.swift; sourceTree = "<group>"; };
|
||||||
D084F9F122F3AFEA004874CE /* AccountContext.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AccountContext.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
D084F9F122F3AFEA004874CE /* AccountContext.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AccountContext.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
D0AE31A622B273F20058D3BC /* TelegramPresentationData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TelegramPresentationData.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
D0AE31A622B273F20058D3BC /* TelegramPresentationData.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TelegramPresentationData.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
@ -94,6 +96,7 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
D068EE9022F4A9B60064E921 /* MediaResources.framework in Frameworks */,
|
||||||
D0AE31C322B274E90058D3BC /* TelegramUIPreferences.framework in Frameworks */,
|
D0AE31C322B274E90058D3BC /* TelegramUIPreferences.framework in Frameworks */,
|
||||||
D0AE31BF22B274950058D3BC /* Display.framework in Frameworks */,
|
D0AE31BF22B274950058D3BC /* Display.framework in Frameworks */,
|
||||||
D0AE31BD22B274830058D3BC /* TelegramCore.framework in Frameworks */,
|
D0AE31BD22B274830058D3BC /* TelegramCore.framework in Frameworks */,
|
||||||
@ -173,6 +176,7 @@
|
|||||||
D0AE31B722B2747A0058D3BC /* Frameworks */ = {
|
D0AE31B722B2747A0058D3BC /* Frameworks */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
D068EE8F22F4A9B60064E921 /* MediaResources.framework */,
|
||||||
D084F9F122F3AFEA004874CE /* AccountContext.framework */,
|
D084F9F122F3AFEA004874CE /* AccountContext.framework */,
|
||||||
D0AE31C222B274E90058D3BC /* TelegramUIPreferences.framework */,
|
D0AE31C222B274E90058D3BC /* TelegramUIPreferences.framework */,
|
||||||
D0AE31BE22B274950058D3BC /* Display.framework */,
|
D0AE31BE22B274950058D3BC /* Display.framework */,
|
||||||
|
@ -7,6 +7,7 @@ import AsyncDisplayKit
|
|||||||
import TelegramCore
|
import TelegramCore
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
|
import MediaResources
|
||||||
|
|
||||||
private let historyMessageCount: Int = 100
|
private let historyMessageCount: Int = 100
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ import Foundation
|
|||||||
import AsyncDisplayKit
|
import AsyncDisplayKit
|
||||||
import Display
|
import Display
|
||||||
import Postbox
|
import Postbox
|
||||||
|
import TelegramPresentationData
|
||||||
|
|
||||||
final class ChatMessageBubbleBackdrop: ASDisplayNode {
|
final class ChatMessageBubbleBackdrop: ASDisplayNode {
|
||||||
private let backgroundContent: ASDisplayNode
|
private let backgroundContent: ASDisplayNode
|
||||||
|
@ -223,7 +223,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView {
|
|||||||
self?.allowsGroupOpacity = false
|
self?.allowsGroupOpacity = false
|
||||||
})
|
})
|
||||||
self.layer.animateScale(from: 1.0, to: 0.1, duration: 0.15, removeOnCompletion: false)
|
self.layer.animateScale(from: 1.0, to: 0.1, duration: 0.15, removeOnCompletion: false)
|
||||||
self.layer.animatePosition(from: CGPoint(), to: CGPoint(x: self.bounds.width / 2.0 - self.backgroundNode.frame.midX, y: self.backgroundNode.frame.midY), duration: 0.15, timingFunction: kCAMediaTimingFunctionEaseInEaseOut, removeOnCompletion: false, additive: true)
|
self.layer.animatePosition(from: CGPoint(), to: CGPoint(x: self.bounds.width / 2.0 - self.backgroundNode.frame.midX, y: self.backgroundNode.frame.midY), duration: 0.15, timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, removeOnCompletion: false, additive: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
override func animateAdded(_ currentTimestamp: Double, duration: Double) {
|
override func animateAdded(_ currentTimestamp: Double, duration: Double) {
|
||||||
@ -2357,7 +2357,7 @@ class ChatMessageBubbleItemNode: ChatMessageItemView {
|
|||||||
if self.highlightedState != highlighted {
|
if self.highlightedState != highlighted {
|
||||||
self.highlightedState = highlighted
|
self.highlightedState = highlighted
|
||||||
if let backgroundType = self.backgroundType {
|
if let backgroundType = self.backgroundType {
|
||||||
let graphics = PresentationResourcesChat.principalGraphics(context: mediaBox: item.context.account.postbox.mediaBox, knockoutWallpaper: item.context.sharedContext.immediateExperimentalUISettings.knockoutWallpaper, theme: item.presentationData.theme.theme, wallpaper: item.presentationData.theme.wallpaper)
|
let graphics = PresentationResourcesChat.principalGraphics(mediaBox: item.context.account.postbox.mediaBox, knockoutWallpaper: item.context.sharedContext.immediateExperimentalUISettings.knockoutWallpaper, theme: item.presentationData.theme.theme, wallpaper: item.presentationData.theme.wallpaper)
|
||||||
|
|
||||||
if highlighted {
|
if highlighted {
|
||||||
self.backgroundNode.setType(type: backgroundType, highlighted: true, graphics: graphics, transition: .immediate)
|
self.backgroundNode.setType(type: backgroundType, highlighted: true, graphics: graphics, transition: .immediate)
|
||||||
|
@ -127,7 +127,7 @@ class ChatMessageDateAndStatusNode: ASDisplayNode {
|
|||||||
self.addSubnode(self.dateNode)
|
self.addSubnode(self.dateNode)
|
||||||
}
|
}
|
||||||
|
|
||||||
func asyncLayout() -> (_ context: AccountContext, _ presentationData: ChatPresentationData, _ edited: Bool, _ impressionCount: Int?, _ dateText: String, _ type: ChatMessageDateAndStatusType, _ constrainedSize: CGSize) -> (CGSize, (Bool) -> Void) {
|
func asyncLayout() -> (_ context: AccountContextImpl, _ presentationData: ChatPresentationData, _ edited: Bool, _ impressionCount: Int?, _ dateText: String, _ type: ChatMessageDateAndStatusType, _ constrainedSize: CGSize) -> (CGSize, (Bool) -> Void) {
|
||||||
let dateLayout = TextNode.asyncLayout(self.dateNode)
|
let dateLayout = TextNode.asyncLayout(self.dateNode)
|
||||||
|
|
||||||
var checkReadNode = self.checkReadNode
|
var checkReadNode = self.checkReadNode
|
||||||
@ -506,7 +506,7 @@ class ChatMessageDateAndStatusNode: ASDisplayNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static func asyncLayout(_ node: ChatMessageDateAndStatusNode?) -> (_ context: AccountContext, _ presentationData: ChatPresentationData, _ edited: Bool, _ impressionCount: Int?, _ dateText: String, _ type: ChatMessageDateAndStatusType, _ constrainedSize: CGSize) -> (CGSize, (Bool) -> ChatMessageDateAndStatusNode) {
|
static func asyncLayout(_ node: ChatMessageDateAndStatusNode?) -> (_ context: AccountContextImpl, _ presentationData: ChatPresentationData, _ edited: Bool, _ impressionCount: Int?, _ dateText: String, _ type: ChatMessageDateAndStatusType, _ constrainedSize: CGSize) -> (CGSize, (Bool) -> ChatMessageDateAndStatusNode) {
|
||||||
let currentLayout = node?.asyncLayout()
|
let currentLayout = node?.asyncLayout()
|
||||||
return { context, presentationData, edited, impressionCount, dateText, type, constrainedSize in
|
return { context, presentationData, edited, impressionCount, dateText, type, constrainedSize in
|
||||||
let resultNode: ChatMessageDateAndStatusNode
|
let resultNode: ChatMessageDateAndStatusNode
|
||||||
|
@ -21,10 +21,10 @@ final class ChatMessageDateHeader: ListViewItemHeader {
|
|||||||
|
|
||||||
let id: Int64
|
let id: Int64
|
||||||
let presentationData: ChatPresentationData
|
let presentationData: ChatPresentationData
|
||||||
let context: AccountContext
|
let context: AccountContextImpl
|
||||||
let action: ((Int32) -> Void)?
|
let action: ((Int32) -> Void)?
|
||||||
|
|
||||||
init(timestamp: Int32, presentationData: ChatPresentationData, context: AccountContext, action: ((Int32) -> Void)? = nil) {
|
init(timestamp: Int32, presentationData: ChatPresentationData, context: AccountContextImpl, action: ((Int32) -> Void)? = nil) {
|
||||||
self.timestamp = timestamp
|
self.timestamp = timestamp
|
||||||
self.presentationData = presentationData
|
self.presentationData = presentationData
|
||||||
self.context = context
|
self.context = context
|
||||||
@ -86,13 +86,13 @@ final class ChatMessageDateHeaderNode: ListViewItemHeaderNode {
|
|||||||
|
|
||||||
private let localTimestamp: Int32
|
private let localTimestamp: Int32
|
||||||
private var presentationData: ChatPresentationData
|
private var presentationData: ChatPresentationData
|
||||||
private let context: AccountContext
|
private let context: AccountContextImpl
|
||||||
|
|
||||||
private var flashingOnScrolling = false
|
private var flashingOnScrolling = false
|
||||||
private var stickDistanceFactor: CGFloat = 0.0
|
private var stickDistanceFactor: CGFloat = 0.0
|
||||||
private var action: ((Int32) -> Void)? = nil
|
private var action: ((Int32) -> Void)? = nil
|
||||||
|
|
||||||
init(localTimestamp: Int32, presentationData: ChatPresentationData, context: AccountContext, action: ((Int32) -> Void)? = nil) {
|
init(localTimestamp: Int32, presentationData: ChatPresentationData, context: AccountContextImpl, action: ((Int32) -> Void)? = nil) {
|
||||||
self.presentationData = presentationData
|
self.presentationData = presentationData
|
||||||
self.context = context
|
self.context = context
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ final class ChatMessageDateHeaderNode: ListViewItemHeaderNode {
|
|||||||
self.view.addGestureRecognizer(ListViewTapGestureRecognizer(target: self, action: #selector(self.tapGesture(_:))))
|
self.view.addGestureRecognizer(ListViewTapGestureRecognizer(target: self, action: #selector(self.tapGesture(_:))))
|
||||||
}
|
}
|
||||||
|
|
||||||
func updatePresentationData(_ presentationData: ChatPresentationData, context: AccountContext) {
|
func updatePresentationData(_ presentationData: ChatPresentationData, context: AccountContextImpl) {
|
||||||
let graphics = PresentationResourcesChat.principalGraphics(mediaBox: context.account.postbox.mediaBox, knockoutWallpaper: context.sharedContext.immediateExperimentalUISettings.knockoutWallpaper, theme: presentationData.theme.theme, wallpaper: presentationData.theme.wallpaper)
|
let graphics = PresentationResourcesChat.principalGraphics(mediaBox: context.account.postbox.mediaBox, knockoutWallpaper: context.sharedContext.immediateExperimentalUISettings.knockoutWallpaper, theme: presentationData.theme.theme, wallpaper: presentationData.theme.wallpaper)
|
||||||
|
|
||||||
self.backgroundNode.image = graphics.dateStaticBackground
|
self.backgroundNode.image = graphics.dateStaticBackground
|
||||||
|
@ -100,7 +100,7 @@ private final class ActionSheetItemNode: ASDisplayNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode, UIScrollViewDelegate {
|
final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode, UIScrollViewDelegate {
|
||||||
private let context: AccountContext
|
private let context: AccountContextImpl
|
||||||
private var presentationData: PresentationData
|
private var presentationData: PresentationData
|
||||||
private let sendButtonFrame: CGRect
|
private let sendButtonFrame: CGRect
|
||||||
private let textFieldFrame: CGRect
|
private let textFieldFrame: CGRect
|
||||||
|
@ -13,7 +13,7 @@ class ChatUnreadItem: ListViewItem {
|
|||||||
let presentationData: ChatPresentationData
|
let presentationData: ChatPresentationData
|
||||||
let header: ChatMessageDateHeader
|
let header: ChatMessageDateHeader
|
||||||
|
|
||||||
init(index: MessageIndex, presentationData: ChatPresentationData, context: AccountContext) {
|
init(index: MessageIndex, presentationData: ChatPresentationData, context: AccountContextImpl) {
|
||||||
self.index = index
|
self.index = index
|
||||||
self.presentationData = presentationData
|
self.presentationData = presentationData
|
||||||
self.header = ChatMessageDateHeader(timestamp: index.timestamp, presentationData: presentationData, context: context)
|
self.header = ChatMessageDateHeader(timestamp: index.timestamp, presentationData: presentationData, context: context)
|
||||||
|
@ -10,6 +10,8 @@ import TelegramUIPreferences
|
|||||||
import DeviceAccess
|
import DeviceAccess
|
||||||
import MergeLists
|
import MergeLists
|
||||||
import ItemListUI
|
import ItemListUI
|
||||||
|
import MediaResources
|
||||||
|
import AccountContext
|
||||||
|
|
||||||
private let dropDownIcon = { () -> UIImage in
|
private let dropDownIcon = { () -> UIImage in
|
||||||
UIGraphicsBeginImageContextWithOptions(CGSize(width: 12.0, height: 12.0), false, 0.0)
|
UIGraphicsBeginImageContextWithOptions(CGSize(width: 12.0, height: 12.0), false, 0.0)
|
||||||
|
@ -6,6 +6,7 @@ import Postbox
|
|||||||
import TelegramCore
|
import TelegramCore
|
||||||
import LegacyComponents
|
import LegacyComponents
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
|
import MediaResources
|
||||||
|
|
||||||
func presentCustomWallpaperPicker(context: AccountContextImpl, present: @escaping (ViewController) -> Void) {
|
func presentCustomWallpaperPicker(context: AccountContextImpl, present: @escaping (ViewController) -> Void) {
|
||||||
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||||
|
@ -9,6 +9,7 @@ import WebPImage
|
|||||||
#else
|
#else
|
||||||
import WebP
|
import WebP
|
||||||
#endif
|
#endif
|
||||||
|
import MediaResources
|
||||||
|
|
||||||
public struct EmojiThumbnailResourceId: MediaResourceId {
|
public struct EmojiThumbnailResourceId: MediaResourceId {
|
||||||
public let emoji: String
|
public let emoji: String
|
||||||
|
@ -14,6 +14,7 @@ import WebP
|
|||||||
#endif
|
#endif
|
||||||
import Lottie
|
import Lottie
|
||||||
import TelegramUIPrivateModule
|
import TelegramUIPrivateModule
|
||||||
|
import MediaResources
|
||||||
|
|
||||||
public func fetchCachedResourceRepresentation(account: Account, resource: MediaResource, representation: CachedMediaResourceRepresentation) -> Signal<CachedMediaResourceRepresentationResult, NoError> {
|
public func fetchCachedResourceRepresentation(account: Account, resource: MediaResource, representation: CachedMediaResourceRepresentation) -> Signal<CachedMediaResourceRepresentationResult, NoError> {
|
||||||
if let representation = representation as? CachedStickerAJpegRepresentation {
|
if let representation = representation as? CachedStickerAJpegRepresentation {
|
||||||
|
@ -5,7 +5,7 @@ import TelegramCore
|
|||||||
import Postbox
|
import Postbox
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
|
import MediaResources
|
||||||
import LegacyComponents
|
import LegacyComponents
|
||||||
|
|
||||||
final class InstantVideoControllerRecordingStatus {
|
final class InstantVideoControllerRecordingStatus {
|
||||||
|
@ -8,6 +8,7 @@ import TelegramPresentationData
|
|||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
import DeviceAccess
|
import DeviceAccess
|
||||||
import ItemListUI
|
import ItemListUI
|
||||||
|
import AccountContext
|
||||||
|
|
||||||
private final class NotificationsAndSoundsArguments {
|
private final class NotificationsAndSoundsArguments {
|
||||||
let context: AccountContextImpl
|
let context: AccountContextImpl
|
||||||
|
@ -3,6 +3,7 @@ import SwiftSignalKit
|
|||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import DeviceAccess
|
import DeviceAccess
|
||||||
|
import AccountContext
|
||||||
|
|
||||||
public enum PermissionKind: Int32 {
|
public enum PermissionKind: Int32 {
|
||||||
case contacts
|
case contacts
|
||||||
|
@ -13,6 +13,7 @@ import WebPImage
|
|||||||
import WebP
|
import WebP
|
||||||
#endif
|
#endif
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
|
import MediaResources
|
||||||
|
|
||||||
private enum ResourceFileData {
|
private enum ResourceFileData {
|
||||||
case data(Data)
|
case data(Data)
|
||||||
|
@ -15,6 +15,7 @@ import TelegramPresentationData
|
|||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
import DeviceAccess
|
import DeviceAccess
|
||||||
import ItemListUI
|
import ItemListUI
|
||||||
|
import AccountContext
|
||||||
|
|
||||||
private let maximumNumberOfAccounts = 3
|
private let maximumNumberOfAccounts = 3
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import SwiftSignalKit
|
|||||||
import Display
|
import Display
|
||||||
import TelegramUIPrivateModule
|
import TelegramUIPrivateModule
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
|
import MediaResources
|
||||||
|
|
||||||
private func imageFromAJpeg(data: Data) -> (UIImage, UIImage)? {
|
private func imageFromAJpeg(data: Data) -> (UIImage, UIImage)? {
|
||||||
if let (colorData, alphaData) = data.withUnsafeBytes({ (bytes: UnsafePointer<UInt8>) -> (Data, Data)? in
|
if let (colorData, alphaData) = data.withUnsafeBytes({ (bytes: UnsafePointer<UInt8>) -> (Data, Data)? in
|
||||||
|
@ -4,6 +4,7 @@ import TelegramCore
|
|||||||
import Postbox
|
import Postbox
|
||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
|
import MediaResources
|
||||||
|
|
||||||
private enum LegacyPreferencesKeyValues: Int32 {
|
private enum LegacyPreferencesKeyValues: Int32 {
|
||||||
case cacheStorageSettings = 1
|
case cacheStorageSettings = 1
|
||||||
|
@ -9,6 +9,7 @@ import TelegramCore
|
|||||||
import Photos
|
import Photos
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
|
import MediaResources
|
||||||
|
|
||||||
enum WallpaperListType {
|
enum WallpaperListType {
|
||||||
case wallpapers(WallpaperPresentationOptions?)
|
case wallpapers(WallpaperPresentationOptions?)
|
||||||
|
@ -9,6 +9,7 @@ import LegacyComponents
|
|||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
import ProgressNavigationButtonNode
|
import ProgressNavigationButtonNode
|
||||||
|
import MediaResources
|
||||||
|
|
||||||
struct WallpaperGalleryItemArguments {
|
struct WallpaperGalleryItemArguments {
|
||||||
let colorPreview: Bool
|
let colorPreview: Bool
|
||||||
|
@ -5,6 +5,7 @@ import Display
|
|||||||
import Postbox
|
import Postbox
|
||||||
import TelegramCore
|
import TelegramCore
|
||||||
import TelegramUIPrivateModule
|
import TelegramUIPrivateModule
|
||||||
|
import MediaResources
|
||||||
|
|
||||||
private func wallpaperDatas(account: Account, accountManager: AccountManager, fileReference: FileMediaReference? = nil, representations: [ImageRepresentationWithReference], alwaysShowThumbnailFirst: Bool = false, thumbnail: Bool = false, autoFetchFullSize: Bool = false, synchronousLoad: Bool = false) -> Signal<(Data?, Data?, Bool), NoError> {
|
private func wallpaperDatas(account: Account, accountManager: AccountManager, fileReference: FileMediaReference? = nil, representations: [ImageRepresentationWithReference], alwaysShowThumbnailFirst: Bool = false, thumbnail: Bool = false, autoFetchFullSize: Bool = false, synchronousLoad: Bool = false) -> Signal<(Data?, Data?, Bool), NoError> {
|
||||||
if let smallestRepresentation = smallestImageRepresentation(representations.map({ $0.representation })), let largestRepresentation = largestImageRepresentation(representations.map({ $0.representation })), let smallestIndex = representations.index(where: { $0.representation == smallestRepresentation }), let largestIndex = representations.index(where: { $0.representation == largestRepresentation }) {
|
if let smallestRepresentation = smallestImageRepresentation(representations.map({ $0.representation })), let largestRepresentation = largestImageRepresentation(representations.map({ $0.representation })), let smallestIndex = representations.index(where: { $0.representation == smallestRepresentation }), let largestIndex = representations.index(where: { $0.representation == largestRepresentation }) {
|
||||||
|
@ -5,6 +5,7 @@ import TelegramCore
|
|||||||
import SwiftSignalKit
|
import SwiftSignalKit
|
||||||
import TelegramPresentationData
|
import TelegramPresentationData
|
||||||
import TelegramUIPreferences
|
import TelegramUIPreferences
|
||||||
|
import MediaResources
|
||||||
|
|
||||||
private extension TelegramWallpaper {
|
private extension TelegramWallpaper {
|
||||||
var mainResource: MediaResource? {
|
var mainResource: MediaResource? {
|
||||||
|
@ -359,7 +359,6 @@
|
|||||||
D04281F1200E4084009DDE36 /* GroupInfoSearchNavigationContentNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281F0200E4084009DDE36 /* GroupInfoSearchNavigationContentNode.swift */; };
|
D04281F1200E4084009DDE36 /* GroupInfoSearchNavigationContentNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281F0200E4084009DDE36 /* GroupInfoSearchNavigationContentNode.swift */; };
|
||||||
D04281F4200E5AB0009DDE36 /* ChatRecentActionsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281F3200E5AB0009DDE36 /* ChatRecentActionsController.swift */; };
|
D04281F4200E5AB0009DDE36 /* ChatRecentActionsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281F3200E5AB0009DDE36 /* ChatRecentActionsController.swift */; };
|
||||||
D04281F6200E5AC2009DDE36 /* ChatRecentActionsControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281F5200E5AC2009DDE36 /* ChatRecentActionsControllerNode.swift */; };
|
D04281F6200E5AC2009DDE36 /* ChatRecentActionsControllerNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281F5200E5AC2009DDE36 /* ChatRecentActionsControllerNode.swift */; };
|
||||||
D04281F8200E5C17009DDE36 /* ChatControllerBackgroundNode.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281F7200E5C17009DDE36 /* ChatControllerBackgroundNode.swift */; };
|
|
||||||
D04281FA200E5CDC009DDE36 /* ChatRecentActionsControllerState.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281F9200E5CDC009DDE36 /* ChatRecentActionsControllerState.swift */; };
|
D04281FA200E5CDC009DDE36 /* ChatRecentActionsControllerState.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281F9200E5CDC009DDE36 /* ChatRecentActionsControllerState.swift */; };
|
||||||
D04281FC200E61BC009DDE36 /* ChatRecentActionsInteraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281FB200E61BC009DDE36 /* ChatRecentActionsInteraction.swift */; };
|
D04281FC200E61BC009DDE36 /* ChatRecentActionsInteraction.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281FB200E61BC009DDE36 /* ChatRecentActionsInteraction.swift */; };
|
||||||
D04281FE200E639A009DDE36 /* ChatRecentActionsTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281FD200E639A009DDE36 /* ChatRecentActionsTitleView.swift */; };
|
D04281FE200E639A009DDE36 /* ChatRecentActionsTitleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04281FD200E639A009DDE36 /* ChatRecentActionsTitleView.swift */; };
|
||||||
@ -1642,7 +1641,6 @@
|
|||||||
D04281F0200E4084009DDE36 /* GroupInfoSearchNavigationContentNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupInfoSearchNavigationContentNode.swift; sourceTree = "<group>"; };
|
D04281F0200E4084009DDE36 /* GroupInfoSearchNavigationContentNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupInfoSearchNavigationContentNode.swift; sourceTree = "<group>"; };
|
||||||
D04281F3200E5AB0009DDE36 /* ChatRecentActionsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatRecentActionsController.swift; sourceTree = "<group>"; };
|
D04281F3200E5AB0009DDE36 /* ChatRecentActionsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatRecentActionsController.swift; sourceTree = "<group>"; };
|
||||||
D04281F5200E5AC2009DDE36 /* ChatRecentActionsControllerNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatRecentActionsControllerNode.swift; sourceTree = "<group>"; };
|
D04281F5200E5AC2009DDE36 /* ChatRecentActionsControllerNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatRecentActionsControllerNode.swift; sourceTree = "<group>"; };
|
||||||
D04281F7200E5C17009DDE36 /* ChatControllerBackgroundNode.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatControllerBackgroundNode.swift; sourceTree = "<group>"; };
|
|
||||||
D04281F9200E5CDC009DDE36 /* ChatRecentActionsControllerState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatRecentActionsControllerState.swift; sourceTree = "<group>"; };
|
D04281F9200E5CDC009DDE36 /* ChatRecentActionsControllerState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatRecentActionsControllerState.swift; sourceTree = "<group>"; };
|
||||||
D04281FB200E61BC009DDE36 /* ChatRecentActionsInteraction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatRecentActionsInteraction.swift; sourceTree = "<group>"; };
|
D04281FB200E61BC009DDE36 /* ChatRecentActionsInteraction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatRecentActionsInteraction.swift; sourceTree = "<group>"; };
|
||||||
D04281FD200E639A009DDE36 /* ChatRecentActionsTitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatRecentActionsTitleView.swift; sourceTree = "<group>"; };
|
D04281FD200E639A009DDE36 /* ChatRecentActionsTitleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatRecentActionsTitleView.swift; sourceTree = "<group>"; };
|
||||||
@ -4569,7 +4567,6 @@
|
|||||||
D0F69E0E1D6B8ACF0046BCD6 /* ChatController.swift */,
|
D0F69E0E1D6B8ACF0046BCD6 /* ChatController.swift */,
|
||||||
D0F69E0F1D6B8ACF0046BCD6 /* ChatControllerInteraction.swift */,
|
D0F69E0F1D6B8ACF0046BCD6 /* ChatControllerInteraction.swift */,
|
||||||
D0F69E101D6B8ACF0046BCD6 /* ChatControllerNode.swift */,
|
D0F69E101D6B8ACF0046BCD6 /* ChatControllerNode.swift */,
|
||||||
D04281F7200E5C17009DDE36 /* ChatControllerBackgroundNode.swift */,
|
|
||||||
D0F69E111D6B8ACF0046BCD6 /* ChatHistoryEntry.swift */,
|
D0F69E111D6B8ACF0046BCD6 /* ChatHistoryEntry.swift */,
|
||||||
D0F69E121D6B8ACF0046BCD6 /* ChatHistoryLocation.swift */,
|
D0F69E121D6B8ACF0046BCD6 /* ChatHistoryLocation.swift */,
|
||||||
D0D268681D78865300C422DA /* ChatAvatarNavigationNode.swift */,
|
D0D268681D78865300C422DA /* ChatAvatarNavigationNode.swift */,
|
||||||
@ -6130,7 +6127,6 @@
|
|||||||
D0EC6E5C1EB9F58900EBF1C3 /* CallControllerNode.swift in Sources */,
|
D0EC6E5C1EB9F58900EBF1C3 /* CallControllerNode.swift in Sources */,
|
||||||
D0F4B0222110972300912B92 /* ContactInfoStrings.swift in Sources */,
|
D0F4B0222110972300912B92 /* ContactInfoStrings.swift in Sources */,
|
||||||
D0EC6E5D1EB9F58900EBF1C3 /* PrivacyAndSecurityController.swift in Sources */,
|
D0EC6E5D1EB9F58900EBF1C3 /* PrivacyAndSecurityController.swift in Sources */,
|
||||||
D04281F8200E5C17009DDE36 /* ChatControllerBackgroundNode.swift in Sources */,
|
|
||||||
D0EC6E5E1EB9F58900EBF1C3 /* ItemListRecentSessionItem.swift in Sources */,
|
D0EC6E5E1EB9F58900EBF1C3 /* ItemListRecentSessionItem.swift in Sources */,
|
||||||
D00ADFDD1EBB73C200873D2E /* OverlayMediaManager.swift in Sources */,
|
D00ADFDD1EBB73C200873D2E /* OverlayMediaManager.swift in Sources */,
|
||||||
D056CD7C1FF3E92C00880D28 /* DirectionalPanGestureRecognizer.swift in Sources */,
|
D056CD7C1FF3E92C00880D28 /* DirectionalPanGestureRecognizer.swift in Sources */,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user