mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-01 05:36:57 +02:00
BugFix: Tap on clock status bar should scroll you up
https://github.com/vector-im/vector-ios/issues/289 https://github.com/vector-im/vector-ios/issues/125
This commit is contained in:
@@ -96,6 +96,9 @@
|
||||
NSInteger userSettingsPhoneNumberIndex;
|
||||
NSInteger userSettingsNightModeSepIndex;
|
||||
NSInteger userSettingsNightModeIndex;
|
||||
|
||||
// Observe kAppDelegateDidTapStatusBarNotification to handle tap on clock status bar.
|
||||
id kAppDelegateDidTapStatusBarNotificationObserver;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -244,6 +247,13 @@
|
||||
|
||||
// Refresh linked emails in parallel
|
||||
[self loadLinkedEmails];
|
||||
|
||||
// Observe kAppDelegateDidTapStatusBarNotificationObserver.
|
||||
kAppDelegateDidTapStatusBarNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kAppDelegateDidTapStatusBarNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {
|
||||
|
||||
[self.tableView setContentOffset:CGPointMake(-self.tableView.contentInset.left, -self.tableView.contentInset.top) animated:YES];
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated
|
||||
@@ -274,6 +284,11 @@
|
||||
notificationCenterDidFailObserver = nil;
|
||||
}
|
||||
|
||||
if (kAppDelegateDidTapStatusBarNotificationObserver)
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:kAppDelegateDidTapStatusBarNotificationObserver];
|
||||
kAppDelegateDidTapStatusBarNotificationObserver = nil;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Internal methods
|
||||
|
||||
Reference in New Issue
Block a user