mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 01:10:09 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
209325ca3d
@ -889,6 +889,9 @@
|
||||
if (selectedItems.count == 0 && currentItem != nil)
|
||||
[selectedItems addObject:currentItem];
|
||||
|
||||
if (intent == TGMediaAssetsControllerSendMediaIntent)
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@(editingContext.isHighQualityPhoto) forKey:@"TG_photoHighQuality_v0"];
|
||||
|
||||
if (saveEditedPhotos && storeAssets && editingContext != nil)
|
||||
{
|
||||
NSMutableArray *fullSizeSignals = [[NSMutableArray alloc] init];
|
||||
|
||||
@ -2159,6 +2159,12 @@ public final class MediaPickerScreenImpl: ViewController, MediaPickerScreen, Att
|
||||
strongSelf.controllerNode.dismissInput()
|
||||
}
|
||||
}, selectionState: selectionContext, editingState: editingContext ?? TGMediaEditingContext())
|
||||
|
||||
let highQualityPhoto = UserDefaults.standard.bool(forKey: "TG_photoHighQuality_v0")
|
||||
if highQualityPhoto {
|
||||
self.interaction?.editingState.setHighQualityPhoto(highQualityPhoto)
|
||||
}
|
||||
|
||||
self.interaction?.selectionState?.grouping = true
|
||||
|
||||
self.interaction?.editingState.sendPaidMessageStars = sendPaidMessageStars ?? 0
|
||||
|
||||
@ -11426,6 +11426,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, PeerInfoScreenNodePro
|
||||
items.append(.separator)
|
||||
}
|
||||
|
||||
if case .all = pane.currentCollection {
|
||||
items.append(.action(ContextMenuActionItem(text: sorting == .date ? strings.PeerInfo_Gifts_SortByValue : strings.PeerInfo_Gifts_SortByDate, icon: { theme in
|
||||
return generateTintedImage(image: UIImage(bundleImageName: sorting == .date ? "Peer Info/SortValue" : "Peer Info/SortDate"), color: theme.contextMenu.primaryColor)
|
||||
}, action: { [weak giftsContext] _, f in
|
||||
@ -11435,6 +11436,7 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, PeerInfoScreenNodePro
|
||||
})))
|
||||
|
||||
items.append(.separator)
|
||||
}
|
||||
|
||||
let toggleFilter: (ProfileGiftsContext.Filters) -> Void = { [weak giftsContext] value in
|
||||
var updatedFilter = filter
|
||||
|
||||
@ -133,6 +133,12 @@ final class AddGiftsScreenComponent: Component {
|
||||
giftsListView = current
|
||||
} else {
|
||||
giftsListView = GiftsListView(context: component.context, peerId: component.peerId, profileGifts: component.profileGifts, giftsCollections: nil, canSelect: true, ignoreCollection: component.collectionId, remainingSelectionCount: component.remainingCount)
|
||||
giftsListView.onContentUpdated = { [weak self] in
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
self.state?.updated(transition: .immediate)
|
||||
}
|
||||
giftsListView.selectionUpdated = { [weak self] in
|
||||
guard let self else {
|
||||
return
|
||||
|
||||
@ -151,6 +151,15 @@ public final class PeerInfoGiftsPaneNode: ASDisplayNode, PeerInfoPaneNode, UIScr
|
||||
|
||||
super.init()
|
||||
|
||||
self.giftsListView.onContentUpdated = { [weak self] in
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
if let params = self.currentParams {
|
||||
self.update(size: params.size, topInset: params.topInset, sideInset: params.sideInset, bottomInset: params.bottomInset, deviceMetrics: params.deviceMetrics, visibleHeight: params.visibleHeight, isScrollingLockedAtTop: params.isScrollingLockedAtTop, expandProgress: params.expandProgress, navigationHeight: params.navigationHeight, presentationData: params.presentationData, synchronous: true, transition: .immediate)
|
||||
}
|
||||
}
|
||||
|
||||
self.addSubnode(self.backgroundNode)
|
||||
self.addSubnode(self.scrollNode)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user