mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-08 01:40:09 +00:00
Various fixes
This commit is contained in:
parent
a4b5b9d30f
commit
1cb85c3d73
@ -257,7 +257,7 @@ final class NavigationToolbarContentComponent: CombinedComponent {
|
|||||||
component: Button(
|
component: Button(
|
||||||
content: AnyComponent(
|
content: AnyComponent(
|
||||||
BundleIconComponent(
|
BundleIconComponent(
|
||||||
name: "Stories/EmbeddedViewIcon",
|
name: "Instant View/OpenDocument",
|
||||||
tintColor: context.component.accentColor
|
tintColor: context.component.accentColor
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|||||||
@ -3665,8 +3665,7 @@ public class ChatListItemNode: ItemListRevealOptionsItemNode {
|
|||||||
} else {
|
} else {
|
||||||
starView = StarView()
|
starView = StarView()
|
||||||
strongSelf.starView = starView
|
strongSelf.starView = starView
|
||||||
strongSelf.view.addSubview(starView)
|
strongSelf.contextContainer.view.addSubview(starView)
|
||||||
// strongSelf.mainContentContainerNode.view.addSubview(starView)
|
|
||||||
}
|
}
|
||||||
starView.outlineColor = effectiveBackgroundColor
|
starView.outlineColor = effectiveBackgroundColor
|
||||||
|
|
||||||
|
|||||||
@ -2108,13 +2108,12 @@ public func chatMessageVideo(postbox: Postbox, userLocation: MediaResourceUserLo
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func chatSecretMessageVideoData(account: Account, userLocation: MediaResourceUserLocation, fileReference: FileMediaReference, synchronousLoad: Bool) -> Signal<Data?, NoError> {
|
private func chatSecretMessageVideoData(account: Account, userLocation: MediaResourceUserLocation, fileReference: FileMediaReference, synchronousLoad: Bool) -> Signal<Data?, NoError> {
|
||||||
|
let decodedThumbnailData = fileReference.media.immediateThumbnailData.flatMap(decodeTinyThumbnail)
|
||||||
if let smallestRepresentation = smallestImageRepresentation(fileReference.media.previewRepresentations) {
|
if let smallestRepresentation = smallestImageRepresentation(fileReference.media.previewRepresentations) {
|
||||||
let thumbnailResource = smallestRepresentation.resource
|
let thumbnailResource = smallestRepresentation.resource
|
||||||
|
|
||||||
let fetchedThumbnail = fetchedMediaResource(mediaBox: account.postbox.mediaBox, userLocation: userLocation, userContentType: MediaResourceUserContentType(file: fileReference.media), reference: fileReference.resourceReference(thumbnailResource))
|
let fetchedThumbnail = fetchedMediaResource(mediaBox: account.postbox.mediaBox, userLocation: userLocation, userContentType: MediaResourceUserContentType(file: fileReference.media), reference: fileReference.resourceReference(thumbnailResource))
|
||||||
|
|
||||||
let decodedThumbnailData = fileReference.media.immediateThumbnailData.flatMap(decodeTinyThumbnail)
|
|
||||||
|
|
||||||
let thumbnail = Signal<Data?, NoError> { subscriber in
|
let thumbnail = Signal<Data?, NoError> { subscriber in
|
||||||
let fetchedDisposable = fetchedThumbnail.start()
|
let fetchedDisposable = fetchedThumbnail.start()
|
||||||
let thumbnailDisposable = account.postbox.mediaBox.resourceData(thumbnailResource, attemptSynchronously: synchronousLoad).start(next: { next in
|
let thumbnailDisposable = account.postbox.mediaBox.resourceData(thumbnailResource, attemptSynchronously: synchronousLoad).start(next: { next in
|
||||||
@ -2129,7 +2128,7 @@ private func chatSecretMessageVideoData(account: Account, userLocation: MediaRes
|
|||||||
}
|
}
|
||||||
return thumbnail
|
return thumbnail
|
||||||
} else {
|
} else {
|
||||||
return .single(nil)
|
return .single(decodedThumbnailData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -481,8 +481,8 @@ public func makeDefaultDarkPresentationTheme(extendingThemeReference: Presentati
|
|||||||
itemSeparatorColor: UIColor(rgb: 0x545458, alpha: 0.55),
|
itemSeparatorColor: UIColor(rgb: 0x545458, alpha: 0.55),
|
||||||
itemBackgroundColor: UIColor(rgb: 0x000000),
|
itemBackgroundColor: UIColor(rgb: 0x000000),
|
||||||
pinnedItemBackgroundColor: UIColor(rgb: 0x1c1c1d),
|
pinnedItemBackgroundColor: UIColor(rgb: 0x1c1c1d),
|
||||||
itemHighlightedBackgroundColor: UIColor(rgb: 0xffffff, alpha: 0.07),
|
itemHighlightedBackgroundColor: UIColor(rgb: 0x121212),
|
||||||
pinnedItemHighlightedBackgroundColor: UIColor(rgb: 0xffffff, alpha: 0.07),
|
pinnedItemHighlightedBackgroundColor: UIColor(rgb: 0x2b2b2c),
|
||||||
itemSelectedBackgroundColor: UIColor(rgb: 0x191919),
|
itemSelectedBackgroundColor: UIColor(rgb: 0x191919),
|
||||||
titleColor: UIColor(rgb: 0xffffff),
|
titleColor: UIColor(rgb: 0xffffff),
|
||||||
secretTitleColor: UIColor(rgb: 0x00b12c),
|
secretTitleColor: UIColor(rgb: 0x00b12c),
|
||||||
|
|||||||
@ -844,12 +844,6 @@ func peerInfoScreenSettingsData(context: AccountContext, peerId: EnginePeer.Id,
|
|||||||
let starsState: Signal<StarsContext.State?, NoError>
|
let starsState: Signal<StarsContext.State?, NoError>
|
||||||
if let starsContext {
|
if let starsContext {
|
||||||
starsState = starsContext.state
|
starsState = starsContext.state
|
||||||
|> map { state in
|
|
||||||
if let state, state.balance > 0 || !state.transactions.isEmpty {
|
|
||||||
return state
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
starsState = .single(nil)
|
starsState = .single(nil)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
"filename" : "boost_24.pdf",
|
"filename" : "boost_24 (3).pdf",
|
||||||
"idiom" : "universal"
|
"idiom" : "universal"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
BIN
submodules/TelegramUI/Images.xcassets/Chat/Context Menu/Boost.imageset/boost_24 (3).pdf
vendored
Normal file
BIN
submodules/TelegramUI/Images.xcassets/Chat/Context Menu/Boost.imageset/boost_24 (3).pdf
vendored
Normal file
Binary file not shown.
@ -1,295 +0,0 @@
|
|||||||
%PDF-1.7
|
|
||||||
|
|
||||||
1 0 obj
|
|
||||||
<< /Type /XObject
|
|
||||||
/Length 2 0 R
|
|
||||||
/Group << /Type /Group
|
|
||||||
/S /Transparency
|
|
||||||
>>
|
|
||||||
/Subtype /Form
|
|
||||||
/Resources << >>
|
|
||||||
/BBox [ 0.000000 0.000000 24.000000 24.000000 ]
|
|
||||||
>>
|
|
||||||
stream
|
|
||||||
/DeviceRGB CS
|
|
||||||
/DeviceRGB cs
|
|
||||||
1.000000 0.000000 -0.000000 1.000000 5.944336 -2.413574 cm
|
|
||||||
8.262308 16.282097 m
|
|
||||||
7.803495 16.282097 7.453221 16.692017 7.524779 17.145216 c
|
|
||||||
8.522446 23.463770 l
|
|
||||||
8.646609 24.250139 7.618237 24.658890 7.168687 24.001854 c
|
|
||||||
0.131716 13.717052 l
|
|
||||||
-0.207343 13.221502 0.147505 12.548755 0.747946 12.548755 c
|
|
||||||
3.842392 12.548755 l
|
|
||||||
4.301206 12.548755 4.651480 12.138834 4.579922 11.685636 c
|
|
||||||
3.582255 5.367081 l
|
|
||||||
3.458092 4.580711 4.486464 4.171961 4.936014 4.828997 c
|
|
||||||
11.972985 15.113801 l
|
|
||||||
12.312045 15.609349 11.957196 16.282097 11.356755 16.282097 c
|
|
||||||
8.262308 16.282097 l
|
|
||||||
h
|
|
||||||
0.000000 0.000000 0.000000 scn
|
|
||||||
f*
|
|
||||||
n
|
|
||||||
|
|
||||||
endstream
|
|
||||||
endobj
|
|
||||||
|
|
||||||
2 0 obj
|
|
||||||
627
|
|
||||||
endobj
|
|
||||||
|
|
||||||
3 0 obj
|
|
||||||
<< /Length 4 0 R
|
|
||||||
/FunctionType 4
|
|
||||||
/Domain [ 0.000000 1.000000 ]
|
|
||||||
/Range [ 0.000000 1.000000 ]
|
|
||||||
>>
|
|
||||||
stream
|
|
||||||
{ 0 gt { 0 } { 1 } ifelse }
|
|
||||||
endstream
|
|
||||||
endobj
|
|
||||||
|
|
||||||
4 0 obj
|
|
||||||
27
|
|
||||||
endobj
|
|
||||||
|
|
||||||
5 0 obj
|
|
||||||
<< /Type /XObject
|
|
||||||
/Length 6 0 R
|
|
||||||
/Group << /Type /Group
|
|
||||||
/S /Transparency
|
|
||||||
>>
|
|
||||||
/Subtype /Form
|
|
||||||
/Resources << /ExtGState << /E1 << /SMask << /Type /Mask
|
|
||||||
/G 1 0 R
|
|
||||||
/S /Alpha
|
|
||||||
/TR 3 0 R
|
|
||||||
>>
|
|
||||||
/Type /ExtGState
|
|
||||||
>> >> >>
|
|
||||||
/BBox [ 0.000000 0.000000 24.000000 24.000000 ]
|
|
||||||
>>
|
|
||||||
stream
|
|
||||||
/DeviceRGB CS
|
|
||||||
/DeviceRGB cs
|
|
||||||
q
|
|
||||||
/E1 gs
|
|
||||||
q
|
|
||||||
1.000000 0.000000 -0.000000 1.000000 5.944336 -2.413574 cm
|
|
||||||
0.000000 0.000000 0.000000 scn
|
|
||||||
11.972985 15.113801 m
|
|
||||||
10.875327 15.864830 l
|
|
||||||
11.972985 15.113801 l
|
|
||||||
h
|
|
||||||
0.131716 13.717052 m
|
|
||||||
-0.965942 14.468081 l
|
|
||||||
0.131716 13.717052 l
|
|
||||||
h
|
|
||||||
8.522446 23.463770 m
|
|
||||||
7.208721 23.671200 l
|
|
||||||
8.522446 23.463770 l
|
|
||||||
h
|
|
||||||
7.524779 17.145216 m
|
|
||||||
6.211054 17.352646 l
|
|
||||||
7.524779 17.145216 l
|
|
||||||
h
|
|
||||||
8.838504 16.937786 m
|
|
||||||
9.836171 23.256340 l
|
|
||||||
7.208721 23.671200 l
|
|
||||||
6.211054 17.352646 l
|
|
||||||
8.838504 16.937786 l
|
|
||||||
h
|
|
||||||
6.071028 24.752884 m
|
|
||||||
-0.965942 14.468081 l
|
|
||||||
1.229375 12.966022 l
|
|
||||||
8.266346 23.250824 l
|
|
||||||
6.071028 24.752884 l
|
|
||||||
h
|
|
||||||
0.747946 11.218755 m
|
|
||||||
3.842392 11.218755 l
|
|
||||||
3.842392 13.878755 l
|
|
||||||
0.747946 13.878755 l
|
|
||||||
0.747946 11.218755 l
|
|
||||||
h
|
|
||||||
3.266197 11.893065 m
|
|
||||||
2.268530 5.574511 l
|
|
||||||
4.895980 5.159651 l
|
|
||||||
5.893647 11.478206 l
|
|
||||||
3.266197 11.893065 l
|
|
||||||
h
|
|
||||||
6.033673 4.077967 m
|
|
||||||
13.070644 14.362771 l
|
|
||||||
10.875327 15.864830 l
|
|
||||||
3.838356 5.580027 l
|
|
||||||
6.033673 4.077967 l
|
|
||||||
h
|
|
||||||
11.356755 17.612097 m
|
|
||||||
8.262308 17.612097 l
|
|
||||||
8.262308 14.952097 l
|
|
||||||
11.356755 14.952097 l
|
|
||||||
11.356755 17.612097 l
|
|
||||||
h
|
|
||||||
13.070644 14.362771 m
|
|
||||||
14.013656 15.741019 13.026727 17.612097 11.356755 17.612097 c
|
|
||||||
11.356755 14.952097 l
|
|
||||||
10.887666 14.952097 10.610434 15.477679 10.875327 15.864830 c
|
|
||||||
13.070644 14.362771 l
|
|
||||||
h
|
|
||||||
2.268530 5.574511 m
|
|
||||||
1.923201 3.387428 4.783359 2.250586 6.033673 4.077967 c
|
|
||||||
3.838356 5.580027 l
|
|
||||||
3.905082 5.677549 4.024478 5.770592 4.176677 5.810925 c
|
|
||||||
4.314623 5.847483 4.439354 5.830826 4.535248 5.792711 c
|
|
||||||
4.631143 5.754595 4.733274 5.681080 4.808484 5.559799 c
|
|
||||||
4.891464 5.425989 4.914409 5.276369 4.895980 5.159651 c
|
|
||||||
2.268530 5.574511 l
|
|
||||||
h
|
|
||||||
3.842392 11.218755 m
|
|
||||||
3.483944 11.218755 3.210293 11.539005 3.266197 11.893065 c
|
|
||||||
5.893647 11.478206 l
|
|
||||||
6.092667 12.738664 5.118467 13.878755 3.842392 13.878755 c
|
|
||||||
3.842392 11.218755 l
|
|
||||||
h
|
|
||||||
-0.965942 14.468081 m
|
|
||||||
-1.908953 13.089835 -0.922029 11.218755 0.747946 11.218755 c
|
|
||||||
0.747946 13.878755 l
|
|
||||||
1.217038 13.878755 1.494266 13.353170 1.229375 12.966022 c
|
|
||||||
-0.965942 14.468081 l
|
|
||||||
h
|
|
||||||
9.836171 23.256340 m
|
|
||||||
10.181499 25.443424 7.321342 26.580265 6.071028 24.752884 c
|
|
||||||
8.266346 23.250824 l
|
|
||||||
8.199619 23.153301 8.080223 23.060259 7.928024 23.019926 c
|
|
||||||
7.790078 22.983368 7.665347 23.000025 7.569453 23.038141 c
|
|
||||||
7.473559 23.076256 7.371428 23.149771 7.296218 23.271051 c
|
|
||||||
7.213237 23.404861 7.190292 23.554482 7.208721 23.671200 c
|
|
||||||
9.836171 23.256340 l
|
|
||||||
h
|
|
||||||
6.211054 17.352646 m
|
|
||||||
6.012034 16.092186 6.986233 14.952097 8.262308 14.952097 c
|
|
||||||
8.262308 17.612097 l
|
|
||||||
8.620757 17.612097 8.894408 17.291845 8.838504 16.937786 c
|
|
||||||
6.211054 17.352646 l
|
|
||||||
h
|
|
||||||
f
|
|
||||||
n
|
|
||||||
Q
|
|
||||||
Q
|
|
||||||
|
|
||||||
endstream
|
|
||||||
endobj
|
|
||||||
|
|
||||||
6 0 obj
|
|
||||||
2492
|
|
||||||
endobj
|
|
||||||
|
|
||||||
7 0 obj
|
|
||||||
<< /Type /XObject
|
|
||||||
/Length 8 0 R
|
|
||||||
/Group << /Type /Group
|
|
||||||
/S /Transparency
|
|
||||||
>>
|
|
||||||
/Subtype /Form
|
|
||||||
/Resources << >>
|
|
||||||
/BBox [ 0.000000 0.000000 24.000000 24.000000 ]
|
|
||||||
>>
|
|
||||||
stream
|
|
||||||
/DeviceRGB CS
|
|
||||||
/DeviceRGB cs
|
|
||||||
q
|
|
||||||
1.000000 0.000000 -0.000000 1.000000 0.000000 0.000000 cm
|
|
||||||
0.000000 0.000000 0.000000 scn
|
|
||||||
0.000000 24.000000 m
|
|
||||||
24.000000 24.000000 l
|
|
||||||
24.000000 0.000000 l
|
|
||||||
0.000000 0.000000 l
|
|
||||||
0.000000 24.000000 l
|
|
||||||
h
|
|
||||||
f
|
|
||||||
n
|
|
||||||
Q
|
|
||||||
|
|
||||||
endstream
|
|
||||||
endobj
|
|
||||||
|
|
||||||
8 0 obj
|
|
||||||
232
|
|
||||||
endobj
|
|
||||||
|
|
||||||
9 0 obj
|
|
||||||
<< /XObject << /X1 5 0 R >>
|
|
||||||
/ExtGState << /E1 << /SMask << /Type /Mask
|
|
||||||
/G 7 0 R
|
|
||||||
/S /Alpha
|
|
||||||
>>
|
|
||||||
/Type /ExtGState
|
|
||||||
>> >>
|
|
||||||
>>
|
|
||||||
endobj
|
|
||||||
|
|
||||||
10 0 obj
|
|
||||||
<< /Length 11 0 R >>
|
|
||||||
stream
|
|
||||||
/DeviceRGB CS
|
|
||||||
/DeviceRGB cs
|
|
||||||
q
|
|
||||||
/E1 gs
|
|
||||||
/X1 Do
|
|
||||||
Q
|
|
||||||
|
|
||||||
endstream
|
|
||||||
endobj
|
|
||||||
|
|
||||||
11 0 obj
|
|
||||||
46
|
|
||||||
endobj
|
|
||||||
|
|
||||||
12 0 obj
|
|
||||||
<< /Annots []
|
|
||||||
/Type /Page
|
|
||||||
/MediaBox [ 0.000000 0.000000 24.000000 24.000000 ]
|
|
||||||
/Resources 9 0 R
|
|
||||||
/Contents 10 0 R
|
|
||||||
/Parent 13 0 R
|
|
||||||
>>
|
|
||||||
endobj
|
|
||||||
|
|
||||||
13 0 obj
|
|
||||||
<< /Kids [ 12 0 R ]
|
|
||||||
/Count 1
|
|
||||||
/Type /Pages
|
|
||||||
>>
|
|
||||||
endobj
|
|
||||||
|
|
||||||
14 0 obj
|
|
||||||
<< /Pages 13 0 R
|
|
||||||
/Type /Catalog
|
|
||||||
>>
|
|
||||||
endobj
|
|
||||||
|
|
||||||
xref
|
|
||||||
0 15
|
|
||||||
0000000000 65535 f
|
|
||||||
0000000010 00000 n
|
|
||||||
0000000885 00000 n
|
|
||||||
0000000907 00000 n
|
|
||||||
0000001082 00000 n
|
|
||||||
0000001103 00000 n
|
|
||||||
0000004215 00000 n
|
|
||||||
0000004238 00000 n
|
|
||||||
0000004718 00000 n
|
|
||||||
0000004740 00000 n
|
|
||||||
0000005038 00000 n
|
|
||||||
0000005142 00000 n
|
|
||||||
0000005164 00000 n
|
|
||||||
0000005340 00000 n
|
|
||||||
0000005416 00000 n
|
|
||||||
trailer
|
|
||||||
<< /ID [ (some) (id) ]
|
|
||||||
/Root 14 0 R
|
|
||||||
/Size 15
|
|
||||||
>>
|
|
||||||
startxref
|
|
||||||
5477
|
|
||||||
%%EOF
|
|
||||||
12
submodules/TelegramUI/Images.xcassets/Instant View/OpenDocument.imageset/Contents.json
vendored
Normal file
12
submodules/TelegramUI/Images.xcassets/Instant View/OpenDocument.imageset/Contents.json
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "docviewer_24.pdf",
|
||||||
|
"idiom" : "universal"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
submodules/TelegramUI/Images.xcassets/Instant View/OpenDocument.imageset/docviewer_24.pdf
vendored
Normal file
BIN
submodules/TelegramUI/Images.xcassets/Instant View/OpenDocument.imageset/docviewer_24.pdf
vendored
Normal file
Binary file not shown.
@ -925,8 +925,8 @@ func openExternalUrlImpl(context: AccountContext, urlContext: OpenURLContext, ur
|
|||||||
if let queryItems = components.queryItems {
|
if let queryItems = components.queryItems {
|
||||||
for queryItem in queryItems {
|
for queryItem in queryItems {
|
||||||
if let value = queryItem.value {
|
if let value = queryItem.value {
|
||||||
if queryItem.name == "balance" {
|
if queryItem.name == "balance", let amountValue = Int64(value), amountValue > 0 && amountValue < Int32.max {
|
||||||
amount = Int64(value)
|
amount = amountValue
|
||||||
} else if queryItem.name == "purpose" {
|
} else if queryItem.name == "purpose" {
|
||||||
purpose = value
|
purpose = value
|
||||||
}
|
}
|
||||||
|
|||||||
@ -621,7 +621,7 @@ private final class TooltipScreenNode: ViewControllerTracingNode {
|
|||||||
text: .plain(attributedText),
|
text: .plain(attributedText),
|
||||||
horizontalAlignment: self.textAlignment == .center ? .center : .left,
|
horizontalAlignment: self.textAlignment == .center ? .center : .left,
|
||||||
truncationType: .end,
|
truncationType: .end,
|
||||||
maximumNumberOfLines: 3,
|
maximumNumberOfLines: 0,
|
||||||
lineSpacing: 0.2,
|
lineSpacing: 0.2,
|
||||||
highlightAction: nil,
|
highlightAction: nil,
|
||||||
tapAction: { _, _ in
|
tapAction: { _, _ in
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user