Skip to content

Commit

Permalink
1.8.7 (362)
Browse files Browse the repository at this point in the history
  • Loading branch information
denis15yo committed Nov 1, 2024
1 parent 56e7027 commit b2def73
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions submodules/TelegramUI/Sources/ChatController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,6 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G

// MARK: Nicegram
private var nicegramCloseCallback: (() -> Void)?
private var nicegramCloseCallbackDisposable: Disposable?
//

var avatarNode: ChatAvatarNavigationNode?
Expand Down Expand Up @@ -7078,6 +7077,10 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
}

deinit {
// MARK: Nicegram
self.nicegramCloseCallback?()
//

let _ = ChatControllerCount.modify { value in
return value - 1
}
Expand Down Expand Up @@ -7174,9 +7177,6 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
self.recorderDataDisposable.dispose()
self.displaySendWhenOnlineTipDisposable.dispose()
self.networkSpeedEventsDisposable?.dispose()
// MARK: Nicegram
self.nicegramCloseCallbackDisposable?.dispose()
//
}
deallocate()
}
Expand Down Expand Up @@ -7703,19 +7703,6 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
}
self.hasBrowserOrAppInFront.set(hasBrowserOrWebAppInFront)
}

// MARK: Nicegram
self.nicegramCloseCallbackDisposable = self.effectiveNavigationController?.viewControllersSignal.start(
next: { [weak self] controllers in
guard let self else { return }

if !controllers.contains(where: { $0 === self }) {
self.nicegramCloseCallback?()
self.nicegramCloseCallback = nil
}
}
)
//
}

var returnInputViewFocus = false
Expand Down

0 comments on commit b2def73

Please sign in to comment.