@@ -180,7 +180,7 @@ private final class CollectionRowItem : TableStickItem {
180180 }
181181
182182 override var height : CGFloat {
183- return 40
183+ return 50
184184 }
185185
186186 override func viewClass( ) -> AnyClass {
@@ -274,7 +274,7 @@ private final class CollectionFilterRowView : TableStickView, TableViewDelegate
274274 if tableView. listHeight < bounds. width {
275275 tableView. frame = focus ( NSMakeSize ( tableView. listHeight, 40 ) )
276276 } else {
277- tableView. frame = focus ( NSMakeSize ( frame . width, 40 ) )
277+ tableView. frame = focus ( NSMakeSize ( bounds . width, 40 ) )
278278 }
279279 }
280280}
@@ -496,11 +496,11 @@ private func entries(_ state: State, arguments: Arguments) -> [Entry] {
496496
497497 if !arguments. standalone, !state. collections. isEmpty {
498498
499- entries. append ( . section( index: index, height: 10 ) )
499+ entries. append ( . section( index: index, height: 0 ) )
500500 index = index. peerLocalSuccessor ( )
501501 entries. append ( . collections( index: index, state. collections, state. selectedCollection) )
502- index = index. peerLocalSuccessor ( )
503- entries. append ( . section( index: index, height: 10 ) )
502+ // index = index.peerLocalSuccessor()
503+ // entries.append(.section(index: index, height: 0 ))
504504
505505 hasFolders = true
506506 }
@@ -528,8 +528,8 @@ private func entries(_ state: State, arguments: Arguments) -> [Entry] {
528528 index = index. peerLocalPredecessor ( )
529529 } else {
530530// if !hasFolders {
531- entries. append ( . section( index: index, height: 20 ) )
532- index = index. peerLocalSuccessor ( )
531+ // entries.append(.section(index: index, height: 20))
532+ // index = index.peerLocalSuccessor()
533533// }
534534 }
535535
@@ -596,7 +596,13 @@ fileprivate func prepareTransition(left:[AppearanceWrapperEntry<Entry>], right:
596596
597597final class StoryMediaView : View {
598598
599-
599+ fileprivate var willMove : ( ( NSWindow ? ) -> Void ) ? = nil
600+
601+ override func viewWillMove( toWindow newWindow: NSWindow ? ) {
602+ super. viewWillMove ( toWindow: newWindow)
603+
604+ self . willMove ? ( newWindow)
605+ }
600606
601607 private class Panel : View {
602608 private var pin = TextButton ( )
@@ -1072,6 +1078,14 @@ final class StoryMediaController : TelegramGenericViewController<StoryMediaView>
10721078
10731079 } )
10741080
1081+ genericView. willMove = { [ weak self] window in
1082+ self ? . updateState { current in
1083+ var current = current
1084+ current. onStage = window != nil
1085+ return current
1086+ }
1087+ }
1088+
10751089 let context = self . context
10761090 let peerId = self . peerId
10771091 let initialSize = self . atomicSize
@@ -1494,23 +1508,11 @@ final class StoryMediaController : TelegramGenericViewController<StoryMediaView>
14941508 }
14951509
14961510 override func viewWillDisappear( _ animated: Bool ) {
1497- super. viewWillDisappear ( animated)
1498-
1499- self . updateState { current in
1500- var current = current
1501- current. onStage = false
1502- return current
1503- }
1511+ super. viewWillDisappear ( animated)
15041512 }
15051513
15061514 override func viewWillAppear( _ animated: Bool ) {
15071515 super. viewWillAppear ( animated)
1508-
1509- self . updateState { current in
1510- var current = current
1511- current. onStage = true
1512- return current
1513- }
15141516 }
15151517
15161518 deinit {
0 commit comments