Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crypto: Key sharing: Move the check of incoming key requests so that … #1655

Merged
merged 1 commit into from
Nov 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Riot/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -580,9 +580,6 @@ - (void)applicationDidBecomeActive:(UIApplication *)application
}

[self handleLaunchAnimation];

// Check if we need to display a key share dialog
[self checkPendingRoomKeyRequests];
}

- (void)applicationWillTerminate:(UIApplication *)application
Expand Down Expand Up @@ -1934,6 +1931,14 @@ - (void)initMatrixSessions
}
}
}
else if ([[UIApplication sharedApplication] applicationState] == UIApplicationStateActive)
{
if (mxSession.state == MXSessionStateRunning)
{
// Check if we need to display a key share dialog
[self checkPendingRoomKeyRequests];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You already check [[UIApplication sharedApplication] applicationState] inside the checkPendingRoomKeyRequests method

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true but if you look at the whole state machine management where this piece of code sits, it appears natural to check the UIApplicationStateActive case at this moment.
At least, this is what I feel, no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understood, but we already know here that the applicationState is not background...

}
}

[self handleLaunchAnimation];
}];
Expand Down