mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Various fixes
This commit is contained in:
parent
75f7d3e2fb
commit
d8f7f18652
@ -36,7 +36,7 @@ float text(float2 uvIn,
|
||||
|
||||
float2 uv = fmod(uvIn, 1.0 / count) * count;
|
||||
float2 block = uvIn * count - uv;
|
||||
uv = uv * 0.8 + 0.1;
|
||||
uv = uv * 0.8;
|
||||
uv += floor(noiseTexture.sample(textureSampler, block / noiseResolution + time * .00025).xy * 256.);
|
||||
uv *= -1.0;
|
||||
|
||||
|
Binary file not shown.
@ -80,7 +80,7 @@ final class StickersCarouselComponent: Component {
|
||||
}
|
||||
}
|
||||
|
||||
private let itemSize = CGSize(width: 200.0, height: 200.0)
|
||||
private let itemSize = CGSize(width: 220.0, height: 220.0)
|
||||
|
||||
private class StickerNode: ASDisplayNode {
|
||||
private let context: AccountContext
|
||||
|
@ -2310,7 +2310,7 @@ final class PeerInfoHeaderNode: ASDisplayNode {
|
||||
credibilityIcon = .scam
|
||||
} else if peer.isVerified {
|
||||
credibilityIcon = .verified
|
||||
} else if peer.isPremium && !premiumConfiguration.isPremiumDisabled {
|
||||
} else if peer.isPremium && !premiumConfiguration.isPremiumDisabled && peer.id != self.context.account.peerId {
|
||||
credibilityIcon = .premium
|
||||
} else {
|
||||
credibilityIcon = .none
|
||||
|
@ -6291,39 +6291,43 @@ final class PeerInfoScreenNode: ViewControllerTracingNode, UIScrollViewDelegate
|
||||
case .username:
|
||||
push(usernameSetupController(context: self.context))
|
||||
case .addAccount:
|
||||
if let data = self.data {
|
||||
let _ = (activeAccountsAndPeers(context: context)
|
||||
|> take(1)
|
||||
|> deliverOnMainQueue
|
||||
).start(next: { [weak self] accountAndPeer, accountsAndPeers in
|
||||
guard let strongSelf = self else {
|
||||
return
|
||||
}
|
||||
var maximumAvailableAccounts: Int = 3
|
||||
if data.peer?.isPremium == true && !self.context.account.testingEnvironment {
|
||||
if accountAndPeer?.1.isPremium == true && !strongSelf.context.account.testingEnvironment {
|
||||
maximumAvailableAccounts = 4
|
||||
}
|
||||
var count: Int = 1
|
||||
if let settings = data.globalSettings {
|
||||
for (accountContext, peer, _) in settings.accountsAndPeers {
|
||||
if !accountContext.account.testingEnvironment {
|
||||
if peer.isPremium {
|
||||
maximumAvailableAccounts = 4
|
||||
}
|
||||
count += 1
|
||||
for (accountContext, peer, _) in accountsAndPeers {
|
||||
if !accountContext.account.testingEnvironment {
|
||||
if peer.isPremium {
|
||||
maximumAvailableAccounts = 4
|
||||
}
|
||||
count += 1
|
||||
}
|
||||
}
|
||||
|
||||
if count >= maximumAvailableAccounts {
|
||||
let context = self.context
|
||||
var replaceImpl: ((ViewController) -> Void)?
|
||||
let controller = PremiumLimitScreen(context: context, subject: .accounts, count: Int32(count), action: {
|
||||
let controller = PremiumIntroScreen(context: context, source: .accounts)
|
||||
let controller = PremiumLimitScreen(context: strongSelf.context, subject: .accounts, count: Int32(count), action: {
|
||||
let controller = PremiumIntroScreen(context: strongSelf.context, source: .accounts)
|
||||
replaceImpl?(controller)
|
||||
})
|
||||
replaceImpl = { [weak controller] c in
|
||||
controller?.replace(with: c)
|
||||
}
|
||||
if let navigationController = context.sharedContext.mainWindow?.viewController as? NavigationController {
|
||||
if let navigationController = strongSelf.context.sharedContext.mainWindow?.viewController as? NavigationController {
|
||||
navigationController.pushViewController(controller)
|
||||
}
|
||||
} else {
|
||||
self.context.sharedContext.beginNewAuth(testingEnvironment: self.context.account.testingEnvironment)
|
||||
strongSelf.context.sharedContext.beginNewAuth(testingEnvironment: strongSelf.context.account.testingEnvironment)
|
||||
}
|
||||
}
|
||||
})
|
||||
case .logout:
|
||||
if let user = self.data?.peer as? TelegramUser, let phoneNumber = user.phone {
|
||||
if let controller = self.controller, let navigationController = controller.navigationController as? NavigationController {
|
||||
|
Loading…
x
Reference in New Issue
Block a user