mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
Various improvements
This commit is contained in:
parent
a4ed31da74
commit
eac655f572
@ -975,6 +975,11 @@ private class ChatThemeScreenNode: ViewControllerTracingNode, ASScrollViewDelega
|
||||
}
|
||||
self.otherButton.addTarget(self, action: #selector(self.otherButtonPressed), forControlEvents: .touchUpInside)
|
||||
|
||||
var ignoreGiftThemes = false
|
||||
if let data = self.context.currentAppConfiguration.with({ $0 }).data, let _ = data["ios_killswitch_disable_gift_themes"] {
|
||||
ignoreGiftThemes = true
|
||||
}
|
||||
|
||||
self.disposable.set(combineLatest(
|
||||
queue: Queue.mainQueue(),
|
||||
self.context.engine.themes.getChatThemes(accountManager: self.context.sharedContext.accountManager),
|
||||
@ -1028,6 +1033,9 @@ private class ChatThemeScreenNode: ViewControllerTracingNode, ASScrollViewDelega
|
||||
))
|
||||
|
||||
var giftThemes = uniqueGiftChatThemesState.themes
|
||||
if ignoreGiftThemes {
|
||||
giftThemes = []
|
||||
}
|
||||
var existingIds = Set<String>()
|
||||
if let initiallySelectedTheme, case .gift = initiallySelectedTheme {
|
||||
let initialThemeIndex = giftThemes.firstIndex(where: { $0.id == initiallySelectedTheme.id })
|
||||
|
@ -1171,7 +1171,12 @@ private final class GiftViewSheetContent: CombinedComponent {
|
||||
self?.shareGift()
|
||||
})))
|
||||
|
||||
if gift.flags.contains(.isThemeAvailable) {
|
||||
var ignoreGiftThemes = false
|
||||
if let data = self.context.currentAppConfiguration.with({ $0 }).data, let _ = data["ios_killswitch_disable_gift_themes"] {
|
||||
ignoreGiftThemes = true
|
||||
}
|
||||
|
||||
if gift.flags.contains(.isThemeAvailable) && !ignoreGiftThemes {
|
||||
items.append(.action(ContextMenuActionItem(text: presentationData.strings.Gift_View_Context_SetAsTheme, icon: { theme in
|
||||
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/ApplyTheme"), color: theme.contextMenu.primaryColor)
|
||||
}, action: { [weak self] c, _ in
|
||||
|
@ -673,7 +673,6 @@ final class StarsTransactionsScreenComponent: Component {
|
||||
let withdrawAvailable = (self.revenueState?.balances.overallRevenue.amount.value ?? 0) > 0
|
||||
|
||||
if component.starsContext.ton {
|
||||
//TODO:localize
|
||||
let proceedsSize = self.proceedsView.update(
|
||||
transition: .immediate,
|
||||
component: AnyComponent(ListSectionComponent(
|
||||
|
Loading…
x
Reference in New Issue
Block a user