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

Activer la signature croisée automatiquement à la création de compte #925

Merged
Show file tree
Hide file tree
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
23 changes: 23 additions & 0 deletions Riot/Modules/Home/HomeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ @interface HomeViewController () <SecureBackupSetupCoordinatorBridgePresenterDel
// The content offset of the collection in which the edited room is displayed.
// We store this value to prevent the collection view from scrolling to the beginning (observed on iOS < 10).
CGFloat selectedCollectionViewContentOffset;

// Tchap: initial sync done listener
id tchapInitialSyncDoneListener;
}

@property (nonatomic, strong) SecureBackupSetupCoordinatorBridgePresenter *secureBackupSetupCoordinatorBridgePresenter;
Expand Down Expand Up @@ -101,6 +104,18 @@ - (void)viewDidLoad

// Change the table data source. It must be the home view controller itself.
self.recentsTableView.dataSource = self;

// Tchap: listen to Tchap InitialSyncDone notification added by Tchap in Matrix SDK.
if (tchapInitialSyncDoneListener == nil)
{
tchapInitialSyncDoneListener = [NSNotificationCenter.defaultCenter addObserverForName:kTchapMXSessionInitialSyncDone
object:nil
queue:NSOperationQueue.mainQueue
usingBlock:^(NSNotification * _Nonnull notification) {
// Try to force activate cross-signing after initial sync.
[self showCrossSigningSetup];
}];
}
}

- (void)viewWillAppear:(BOOL)animated
Expand Down Expand Up @@ -138,6 +153,14 @@ - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id <UIV

- (void)destroy
{
// Tchap: remove intial sync done listener
if (tchapInitialSyncDoneListener)
{
[NSNotificationCenter.defaultCenter removeObserver:tchapInitialSyncDoneListener
name:kTchapMXSessionInitialSyncDone
object:nil];
tchapInitialSyncDoneListener = nil;
}
[super destroy];
}

Expand Down
1 change: 1 addition & 0 deletions changelog.d/924.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Activer la signature croisée automatiquement à la création de compte
Loading