mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-30 00:02:47 +00:00
The room settings were not refreshed after debackgrounding the application.
This commit is contained in:
parent
648a9c2188
commit
a56171a9d9
1 changed files with 21 additions and 0 deletions
|
@ -56,11 +56,19 @@
|
|||
self.tableView.separatorColor = [UIColor clearColor];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didMXSessionStateChange:) name:kMXSessionStateDidChangeNotification object:nil];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated
|
||||
{
|
||||
[super viewWillDisappear:animated];
|
||||
|
||||
[self dismissFirstResponder];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:kMXSessionStateDidChangeNotification object:nil];
|
||||
}
|
||||
|
||||
- (void)destroy
|
||||
|
@ -139,6 +147,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void)didMXSessionStateChange:(NSNotification *)notif
|
||||
{
|
||||
// Check this is our Matrix session that has changed
|
||||
if (notif.object == self.session)
|
||||
{
|
||||
// refresh when the session sync is done.
|
||||
if (MXSessionStateRunning == self.session.state)
|
||||
{
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)onDone:(id)sender
|
||||
{
|
||||
// check if there is some update
|
||||
|
|
Loading…
Reference in a new issue