Various fixes

This commit is contained in:
Ilya Laktyushin 2025-12-31 16:51:40 +04:00
parent 3defa0121e
commit b04fd532da
7 changed files with 21 additions and 15 deletions

View file

@ -622,7 +622,9 @@ private final class GiftSetupScreenComponent: Component {
}
}
starsContext.load(force: true)
Queue.mainQueue().after(2.5) {
starsContext.load(force: true)
}
}, error: { [weak self] error in
guard let self, let controller = self.environment?.controller() else {
return

View file

@ -1636,8 +1636,10 @@ private final class GiftAuctionBidScreenComponent: Component {
),
in: .current
)
component.context.starsContext?.load(force: true)
Queue.mainQueue().after(2.5) {
component.context.starsContext?.load(force: true)
}
}, error: { [weak self] _ in
guard let self else {
return

View file

@ -632,7 +632,7 @@ private final class GiftViewSheetContent: CombinedComponent {
controller?.dismissAnimated()
if let navigationController {
Queue.mainQueue().after(0.5) {
Queue.mainQueue().after(2.5) {
starsContext.load(force: true)
let text: String
@ -737,7 +737,7 @@ private final class GiftViewSheetContent: CombinedComponent {
guard let self else {
return
}
Queue.mainQueue().after(0.5) {
Queue.mainQueue().after(2.5) {
starsContext?.load(force: true)
}
switch self.subject {
@ -1141,7 +1141,7 @@ private final class GiftViewSheetContent: CombinedComponent {
guard let peerId = peerIds.first else {
return .complete()
}
Queue.mainQueue().after(1.5, {
Queue.mainQueue().after(2.5, {
if transferStars > 0 {
context.starsContext?.load(force: true)
}
@ -1855,7 +1855,7 @@ private final class GiftViewSheetContent: CombinedComponent {
self.updated(transition: .spring(duration: 0.4))
Queue.mainQueue().after(0.5) {
Queue.mainQueue().after(2.5) {
switch finalPrice.currency {
case .stars:
context.starsContext?.load(force: true)
@ -2148,7 +2148,7 @@ private final class GiftViewSheetContent: CombinedComponent {
self.subject = .profileGift(peerId, result)
self.updated(transition: .spring(duration: 0.4))
Queue.mainQueue().after(0.5) {
Queue.mainQueue().after(2.5) {
starsContext?.load(force: true)
}
})
@ -2267,7 +2267,7 @@ private final class GiftViewSheetContent: CombinedComponent {
guard let self else {
return
}
Queue.mainQueue().after(0.5) {
Queue.mainQueue().after(2.5) {
starsContext?.load(force: true)
}
@ -2431,7 +2431,7 @@ private final class GiftViewSheetContent: CombinedComponent {
guard let self else {
return
}
Queue.mainQueue().after(0.5) {
Queue.mainQueue().after(2.5) {
starsContext?.load(force: true)
}
self.openPeer(peer, dismiss: true)

View file

@ -911,7 +911,7 @@ private final class LinkComponent: Component {
foreground: component.theme.list.itemCheckColors.foregroundColor,
pressedColor: component.theme.list.itemCheckColors.fillColor.withMultipliedAlpha(0.8)
),
content: AnyComponentWithIdentity(id: "label", component: AnyComponent(Text(text: "Copy", font: Font.semibold(17.0), color: component.theme.list.itemCheckColors.foregroundColor))),
content: AnyComponentWithIdentity(id: "label", component: AnyComponent(Text(text: component.strings.FolderLinkScreen_LinkActionCopy, font: Font.semibold(17.0), color: component.theme.list.itemCheckColors.foregroundColor))),
action: { [weak self] in
guard let self, let component = self.component else {
return
@ -939,7 +939,7 @@ private final class LinkComponent: Component {
foreground: component.theme.list.itemCheckColors.foregroundColor,
pressedColor: component.theme.list.itemCheckColors.fillColor.withMultipliedAlpha(0.8)
),
content: AnyComponentWithIdentity(id: "label", component: AnyComponent(Text(text: "Share", font: Font.semibold(17.0), color: component.theme.list.itemCheckColors.foregroundColor))),
content: AnyComponentWithIdentity(id: "label", component: AnyComponent(Text(text: component.strings.FolderLinkScreen_LinkActionShare, font: Font.semibold(17.0), color: component.theme.list.itemCheckColors.foregroundColor))),
action: { [weak self] in
guard let self, let component = self.component else {
return

View file

@ -563,7 +563,7 @@ final class UserAppearanceScreenComponent: Component {
self.isApplyingSettings = false
self.applySettings()
Queue.mainQueue().after(0.5) {
Queue.mainQueue().after(2.5) {
switch finalPrice.currency {
case .stars:
component.context.starsContext?.load(force: true)

View file

@ -655,7 +655,9 @@ private final class SheetContent: CombinedComponent {
controller?.complete(paid: success)
controller?.dismissAnimated()
starsContext.load(force: true)
Queue.mainQueue().after(2.5) {
starsContext.load(force: true)
}
})
}
),

View file

@ -2177,7 +2177,7 @@ class ChatControllerNode: ASDisplayNode, ASScrollViewDelegate {
additionalOffset = 80.0
}
if let _ = inputPanelSize {
inputPanelHideOffset += -40.0 - additionalOffset
inputPanelHideOffset += -48.0 - additionalOffset
}
if let accessoryPanelSize = accessoryPanelSize {
inputPanelHideOffset += -accessoryPanelSize.height - additionalOffset