Skip to content

Commit 9e099d6

Browse files
committed
Various fixes
1 parent be54adb commit 9e099d6

File tree

4 files changed

+8
-19
lines changed

4 files changed

+8
-19
lines changed

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -975,11 +975,6 @@ 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-
983978
self.disposable.set(combineLatest(
984979
queue: Queue.mainQueue(),
985980
self.context.engine.themes.getChatThemes(accountManager: self.context.sharedContext.accountManager),
@@ -1033,9 +1028,6 @@ private class ChatThemeScreenNode: ViewControllerTracingNode, ASScrollViewDelega
10331028
))
10341029

10351030
var giftThemes = uniqueGiftChatThemesState.themes
1036-
if ignoreGiftThemes {
1037-
giftThemes = []
1038-
}
10391031
var existingIds = Set<String>()
10401032
if let initiallySelectedTheme, case .gift = initiallySelectedTheme {
10411033
let initialThemeIndex = giftThemes.firstIndex(where: { $0.id == initiallySelectedTheme.id })

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

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,9 @@ private final class GiftViewSheetContent: CombinedComponent {
826826
peerController.peerSelected = { [weak peerController, weak navigationController] peer, _ in
827827
if let navigationController {
828828
let proceed = {
829-
let _ = context.engine.themes.setChatTheme(peerId: peer.id, chatTheme: .gift(.unique(gift), [])).start()
829+
let _ = context.engine.themes.setChatWallpaper(peerId: peer.id, wallpaper: nil, forBoth: true).startStandalone()
830+
let _ = context.engine.themes.setChatTheme(peerId: peer.id, chatTheme: .gift(.unique(gift), [])).startStandalone()
831+
830832
peerController?.dismiss()
831833

832834
context.sharedContext.navigateToChatController(NavigateToChatControllerParams(
@@ -1210,13 +1212,8 @@ private final class GiftViewSheetContent: CombinedComponent {
12101212

12111213
self?.shareGift()
12121214
})))
1213-
1214-
var ignoreGiftThemes = false
1215-
if let data = self.context.currentAppConfiguration.with({ $0 }).data, let _ = data["ios_killswitch_disable_gift_themes"] {
1216-
ignoreGiftThemes = true
1217-
}
1218-
1219-
if gift.flags.contains(.isThemeAvailable) && !ignoreGiftThemes {
1215+
1216+
if gift.flags.contains(.isThemeAvailable) {
12201217
items.append(.action(ContextMenuActionItem(text: presentationData.strings.Gift_View_Context_SetAsTheme, icon: { theme in
12211218
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/ApplyTheme"), color: theme.contextMenu.primaryColor)
12221219
}, action: { [weak self] c, _ in
@@ -4714,7 +4711,7 @@ public class GiftViewScreen: ViewControllerComponentContainer {
47144711

47154712
self.view.disablesInteractiveModalDismiss = true
47164713

4717-
if let arguments = self.subject.arguments, let _ = self.subject.arguments?.resellAmounts {
4714+
if let arguments = self.subject.arguments, let resellAmounts = self.subject.arguments?.resellAmounts, !resellAmounts.isEmpty {
47184715
if case let .unique(uniqueGift) = arguments.gift, case .peerId(self.context.account.peerId) = uniqueGift.owner {
47194716
} else {
47204717
self.showBalance = true

submodules/TelegramUI/Sources/Chat/ChatControllerThemeManagement.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ extension ChatControllerImpl {
262262
return
263263
}
264264
if canResetWallpaper && chatTheme != nil {
265-
let _ = context.engine.themes.setChatWallpaper(peerId: peerId, wallpaper: nil, forBoth: false).startStandalone()
265+
let _ = context.engine.themes.setChatWallpaper(peerId: peerId, wallpaper: nil, forBoth: true).startStandalone()
266266
}
267267
strongSelf.chatThemeAndDarkAppearancePreviewPromise.set(.single((chatTheme ?? .emoticon(""), nil)))
268268
let _ = context.engine.themes.setChatTheme(peerId: peerId, chatTheme: chatTheme ?? .emoticon("")).startStandalone(completed: { [weak self] in

versions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"app": "11.15",
2+
"app": "12.0",
33
"xcode": "16.2",
44
"bazel": "8.3.1:0cac3a67dc5429c68272dc6944104952e9e4cf84b29d126a5ff3fbaa59045217",
55
"macos": "15"

0 commit comments

Comments
 (0)