Various fixes

This commit is contained in:
Ilya Laktyushin
2023-09-14 18:16:51 +04:00
parent a288c543f2
commit ab0faf8073
9 changed files with 49 additions and 28 deletions

View File

@@ -4463,10 +4463,10 @@ public final class MediaEditorScreen: ViewController, UIDropInteractionDelegate
if let addressName = peer.addressName, !addressName.isEmpty {
link = "t.me/\(peer.addressName ?? "")?boost"
} else {
link = "t.me/boost?=\(peer.id.id._internalGetInt64Value())"
link = "t.me/c/\(peer.id.id._internalGetInt64Value())?boost"
}
let controller = self.context.sharedContext.makePremiumLimitController(context: self.context, subject: .storiesChannelBoost(peer: peer, level: Int32(status.level), currentLevelBoosts: Int32(status.currentLevelBoosts), nextLevelBoosts: status.nextLevelBoosts.flatMap(Int32.init), link: link, boosted: false), count: Int32(status.boosts), forceDark: true, cancel: {}, action: { [weak self] in
let controller = self.context.sharedContext.makePremiumLimitController(context: self.context, subject: .storiesChannelBoost(peer: peer, isCurrent: true, level: Int32(status.level), currentLevelBoosts: Int32(status.currentLevelBoosts), nextLevelBoosts: status.nextLevelBoosts.flatMap(Int32.init), link: link, boosted: false), count: Int32(status.boosts), forceDark: true, cancel: {}, action: { [weak self] in
guard let self else {
return true
}
@@ -4476,6 +4476,8 @@ public final class MediaEditorScreen: ViewController, UIDropInteractionDelegate
return true
})
self.push(controller)
self.hapticFeedback.impact(.light)
})
default:
break