The room settings were not refreshed after debackgrounding the application.

This commit is contained in:
yannick 2015-11-20 17:42:29 +01:00
parent 648a9c2188
commit a56171a9d9

View file

@ -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