Feature/4041 new layout new feature banner

This commit is contained in:
Frank Rotermund
2023-02-08 15:39:51 +00:00
parent 1611724756
commit 1442750a6d
6 changed files with 50 additions and 20 deletions
@@ -81,10 +81,10 @@
constraintWithItem:topBannerViewController.view
attribute:NSLayoutAttributeTop
relatedBy:NSLayoutRelationEqual
toItem:self.view
toItem:self.view.safeAreaLayoutGuide
attribute:NSLayoutAttributeTop
multiplier:1.0
constant:statusBarHeight + navigationBarHeight];
constant:0];
[[self view] addConstraint:alignTopConstraint];
NSLayoutConstraint *alignLeadingConstraint = [NSLayoutConstraint
@@ -131,7 +131,7 @@
FeatureBannerVisibilityService *service = [[FeatureBannerVisibilityService alloc] initWithMxSession:session];
[service isUnreadWithVersion:version completion:^(BOOL unread) {
if (unread) {
//[bannerControllers addObject:[[FeatureBannerViewController alloc] initWithSession:session version:version]];
// [bannerControllers addObject:[[FeatureBannerViewController alloc] initWithSession:session version:version]];
self->topBannerViewController = [[TopBannerViewController alloc] initWithControllers: bannerControllers];
@@ -143,7 +143,7 @@
// this notification will be called either if the user clicked on the banner or wants to hide it using a swipe gesture
[[NSNotificationCenter defaultCenter] addObserverForName:@"de.bwi.messenger.mark_top_banner_as_read" object:NULL queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notification) {
shouldHideBanner = TRUE;
self->shouldHideBanner = TRUE;
}];
self->bannersInitialized = TRUE;