mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 21:26:57 +02:00
The room settings were not refreshed after debackgrounding the application.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user