mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
Implement home screen activity indicators
This commit is contained in:
@@ -48,10 +48,5 @@
|
||||
*/
|
||||
@property CGFloat keyboardHeight;
|
||||
|
||||
/**
|
||||
Returns `YES` if any `MXSession` currently requires the display of an activity indicator.
|
||||
*/
|
||||
@property (nonatomic, readonly) BOOL shouldShowActivityIndicator;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -492,21 +492,18 @@ const CGFloat MXKViewControllerMaxExternalKeyboardHeight = 80;
|
||||
|
||||
#pragma mark - Activity indicator
|
||||
|
||||
- (BOOL)shouldShowActivityIndicator {
|
||||
- (void)stopActivityIndicator
|
||||
{
|
||||
// Check whether all conditions are satisfied before stopping loading wheel
|
||||
BOOL isActivityInProgress = NO;
|
||||
for (MXSession *mxSession in mxSessionArray)
|
||||
{
|
||||
if (mxSession.shouldShowActivityIndicator)
|
||||
{
|
||||
return YES;
|
||||
isActivityInProgress = YES;
|
||||
}
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void)stopActivityIndicator
|
||||
{
|
||||
// Check whether all conditions are satisfied before stopping loading wheel
|
||||
if (!self.shouldShowActivityIndicator)
|
||||
if (!isActivityInProgress)
|
||||
{
|
||||
[super stopActivityIndicator];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user