Web app improvements

This commit is contained in:
Ilya Laktyushin
2022-04-04 16:23:30 +04:00
parent fd88343573
commit 354122226c
8 changed files with 103 additions and 62 deletions

View File

@@ -375,7 +375,9 @@ public class AttachmentController: ViewController {
controller._presentedInModal = true
controller.navigation_setPresenting(strongSelf.controller)
controller.requestAttachmentMenuExpansion = { [weak self] in
self?.container.update(isExpanded: true, transition: .animated(duration: 0.4, curve: .spring))
if let strongSelf = self, !strongSelf.container.isTracking {
strongSelf.container.update(isExpanded: true, transition: .animated(duration: 0.4, curve: .spring))
}
}
controller.updateNavigationStack = { [weak self] f in
if let strongSelf = self {
@@ -595,7 +597,7 @@ public class AttachmentController: ViewController {
}
let isEffecitvelyCollapsedUpdated = (self.selectionCount > 0) != (self.panel.isSelecting)
let panelHeight = self.panel.update(layout: containerLayout, buttons: self.controller?.buttons ?? [], isSelecting: self.selectionCount > 0, transition: transition)
let panelHeight = self.panel.update(layout: containerLayout, buttons: self.controller?.buttons ?? [], isSelecting: self.selectionCount > 0, elevateProgress: !hasPanel && !hasButton, transition: transition)
if hasPanel || hasButton {
containerInsets.bottom = panelHeight
}