Skip to content

Commit eac655f

Browse files
committed
Various improvements
1 parent a4ed31d commit eac655f

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

submodules/TelegramUI/Components/ChatThemeScreen/Sources/ChatThemeScreen.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,11 @@ private class ChatThemeScreenNode: ViewControllerTracingNode, ASScrollViewDelega
975975
}
976976
self.otherButton.addTarget(self, action: #selector(self.otherButtonPressed), forControlEvents: .touchUpInside)
977977

978+
var ignoreGiftThemes = false
979+
if let data = self.context.currentAppConfiguration.with({ $0 }).data, let _ = data["ios_killswitch_disable_gift_themes"] {
980+
ignoreGiftThemes = true
981+
}
982+
978983
self.disposable.set(combineLatest(
979984
queue: Queue.mainQueue(),
980985
self.context.engine.themes.getChatThemes(accountManager: self.context.sharedContext.accountManager),
@@ -1028,6 +1033,9 @@ private class ChatThemeScreenNode: ViewControllerTracingNode, ASScrollViewDelega
10281033
))
10291034

10301035
var giftThemes = uniqueGiftChatThemesState.themes
1036+
if ignoreGiftThemes {
1037+
giftThemes = []
1038+
}
10311039
var existingIds = Set<String>()
10321040
if let initiallySelectedTheme, case .gift = initiallySelectedTheme {
10331041
let initialThemeIndex = giftThemes.firstIndex(where: { $0.id == initiallySelectedTheme.id })

submodules/TelegramUI/Components/Gifts/GiftViewScreen/Sources/GiftViewScreen.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1171,7 +1171,12 @@ private final class GiftViewSheetContent: CombinedComponent {
11711171
self?.shareGift()
11721172
})))
11731173

1174-
if gift.flags.contains(.isThemeAvailable) {
1174+
var ignoreGiftThemes = false
1175+
if let data = self.context.currentAppConfiguration.with({ $0 }).data, let _ = data["ios_killswitch_disable_gift_themes"] {
1176+
ignoreGiftThemes = true
1177+
}
1178+
1179+
if gift.flags.contains(.isThemeAvailable) && !ignoreGiftThemes {
11751180
items.append(.action(ContextMenuActionItem(text: presentationData.strings.Gift_View_Context_SetAsTheme, icon: { theme in
11761181
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/ApplyTheme"), color: theme.contextMenu.primaryColor)
11771182
}, action: { [weak self] c, _ in

submodules/TelegramUI/Components/Stars/StarsTransactionsScreen/Sources/StarsTransactionsScreen.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,6 @@ final class StarsTransactionsScreenComponent: Component {
673673
let withdrawAvailable = (self.revenueState?.balances.overallRevenue.amount.value ?? 0) > 0
674674

675675
if component.starsContext.ton {
676-
//TODO:localize
677676
let proceedsSize = self.proceedsView.update(
678677
transition: .immediate,
679678
component: AnyComponent(ListSectionComponent(

0 commit comments

Comments
 (0)