@@ -180,7 +180,7 @@ private final class CollectionRowItem : TableStickItem {
180
180
}
181
181
182
182
override var height : CGFloat {
183
- return 40
183
+ return 50
184
184
}
185
185
186
186
override func viewClass( ) -> AnyClass {
@@ -274,7 +274,7 @@ private final class CollectionFilterRowView : TableStickView, TableViewDelegate
274
274
if tableView. listHeight < bounds. width {
275
275
tableView. frame = focus ( NSMakeSize ( tableView. listHeight, 40 ) )
276
276
} else {
277
- tableView. frame = focus ( NSMakeSize ( frame . width, 40 ) )
277
+ tableView. frame = focus ( NSMakeSize ( bounds . width, 40 ) )
278
278
}
279
279
}
280
280
}
@@ -496,11 +496,11 @@ private func entries(_ state: State, arguments: Arguments) -> [Entry] {
496
496
497
497
if !arguments. standalone, !state. collections. isEmpty {
498
498
499
- entries. append ( . section( index: index, height: 10 ) )
499
+ entries. append ( . section( index: index, height: 0 ) )
500
500
index = index. peerLocalSuccessor ( )
501
501
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 ))
504
504
505
505
hasFolders = true
506
506
}
@@ -528,8 +528,8 @@ private func entries(_ state: State, arguments: Arguments) -> [Entry] {
528
528
index = index. peerLocalPredecessor ( )
529
529
} else {
530
530
// 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()
533
533
// }
534
534
}
535
535
@@ -596,7 +596,13 @@ fileprivate func prepareTransition(left:[AppearanceWrapperEntry<Entry>], right:
596
596
597
597
final class StoryMediaView : View {
598
598
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
+ }
600
606
601
607
private class Panel : View {
602
608
private var pin = TextButton ( )
@@ -1072,6 +1078,14 @@ final class StoryMediaController : TelegramGenericViewController<StoryMediaView>
1072
1078
1073
1079
} )
1074
1080
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
+
1075
1089
let context = self . context
1076
1090
let peerId = self . peerId
1077
1091
let initialSize = self . atomicSize
@@ -1494,23 +1508,11 @@ final class StoryMediaController : TelegramGenericViewController<StoryMediaView>
1494
1508
}
1495
1509
1496
1510
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)
1504
1512
}
1505
1513
1506
1514
override func viewWillAppear( _ animated: Bool ) {
1507
1515
super. viewWillAppear ( animated)
1508
-
1509
- self . updateState { current in
1510
- var current = current
1511
- current. onStage = true
1512
- return current
1513
- }
1514
1516
}
1515
1517
1516
1518
deinit {
0 commit comments