mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Merge pull request #6796 from vector-im/doug/fix-empty-state-toolbar
Fix missing toolbar in AllChatsViewController.
This commit is contained in:
commit
ec2a176788
4 changed files with 10 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
|||
- Fix render of links with both characters requiring percent encoding and markdown-like syntax ([#6748](https://github.com/vector-im/element-ios/issues/6748))
|
||||
- Fix crash when scrolling chat list ([#6749](https://github.com/vector-im/element-ios/issues/6749))
|
||||
- App Layout: Unable to send message after filtering for room ([#6755](https://github.com/vector-im/element-ios/issues/6755))
|
||||
- App Layout: Fix missing toolbar for users with no rooms. ([#6796](https://github.com/vector-im/element-ios/pull/6796))
|
||||
- Fix code block background colour ([#6778](https://github.com/vector-im/element-ios/issues/6778))
|
||||
|
||||
🧱 Build
|
||||
|
|
|
@ -93,6 +93,12 @@ FOUNDATION_EXPORT NSString *const RecentsViewControllerDataReadyNotification;
|
|||
*/
|
||||
@property (nonatomic, weak) RootTabEmptyView *emptyView;
|
||||
|
||||
/**
|
||||
The bottom anchor used to layout `emptyView` in the absence of a FAB.
|
||||
If this value is `nil` the empty view will be anchored to the bottom of its superview.
|
||||
*/
|
||||
@property (nonatomic, weak) NSLayoutYAxisAnchor *emptyViewBottomAnchor;
|
||||
|
||||
/**
|
||||
The screen timer used for analytics if they've been enabled. The default value is nil.
|
||||
*/
|
||||
|
|
|
@ -2226,7 +2226,8 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
|||
[self.view addSubview:emptyView];
|
||||
}
|
||||
|
||||
emptyViewBottomConstraint = [emptyView.bottomAnchor constraintEqualToAnchor:emptyView.superview.bottomAnchor];
|
||||
NSLayoutYAxisAnchor *bottomAnchor = self.emptyViewBottomAnchor ?: emptyView.superview.bottomAnchor;
|
||||
emptyViewBottomConstraint = [emptyView.bottomAnchor constraintEqualToAnchor:bottomAnchor constant:-1]; // 1pt spacing for UIToolbar's divider.
|
||||
|
||||
emptyView.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@ class AllChatsViewController: HomeViewController {
|
|||
recentsTableView.contentInsetAdjustmentBehavior = .automatic
|
||||
|
||||
toolbarHeight = toolbar.frame.height
|
||||
emptyViewBottomAnchor = toolbar.topAnchor
|
||||
|
||||
updateUI()
|
||||
|
||||
|
|
Loading…
Reference in a new issue