[WIP] Monoforums

This commit is contained in:
Isaac
2025-05-10 18:02:55 +01:00
parent 0e119dd6f1
commit 140efd6cfd
70 changed files with 666 additions and 669 deletions

View File

@@ -355,7 +355,7 @@ public final class ChatSideTopicsPanel: Component {
let iconSize = self.icon.update(
transition: .immediate,
component: AnyComponent(BundleIconComponent(
name: "Call/PanelIcon",
name: "Chat/Title Panels/SidebarIcon",
tintColor: theme.rootController.navigationBar.accentTextColor,
maxSize: nil,
scaleFactor: 1.0
@@ -364,7 +364,7 @@ public final class ChatSideTopicsPanel: Component {
containerSize: CGSize(width: 100.0, height: 100.0)
)
let topInset: CGFloat = 12.0
let topInset: CGFloat = 10.0
let bottomInset: CGFloat = 12.0
let contentSize: CGFloat = topInset + iconSize.height + bottomInset
@@ -578,7 +578,6 @@ public final class ChatSideTopicsPanel: Component {
self.scrollView.alwaysBounceHorizontal = false
self.scrollView.alwaysBounceVertical = false
self.scrollView.scrollsToTop = false
//self.scrollView.delegate = self.wrappedScrollViewDelegate
self.addSubview(self.scrollView)
self.scrollView.addSubview(self.selectedLineView)
@@ -591,6 +590,12 @@ public final class ChatSideTopicsPanel: Component {
deinit {
self.itemsDisposable?.dispose()
}
public func updateGlobalOffset(globalOffset: CGFloat, transition: ComponentTransition) {
if let tabItemView = self.tabItemView {
transition.setTransform(view: tabItemView, transform: CATransform3DMakeTranslation(-globalOffset, 0.0, 0.0))
}
}
func update(component: ChatSideTopicsPanel, availableSize: CGSize, state: EmptyComponentState, environment: Environment<EnvironmentType>, transition: ComponentTransition) -> CGSize {
self.isUpdating = true
@@ -774,6 +779,7 @@ public final class ChatSideTopicsPanel: Component {
}
contentSize.height += itemSize.height
contentSize.height -= 20.0
}
do {