Skip to content

Commit

Permalink
Activer la signature croisée automatiquement à la création de compte
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Buquet committed Nov 16, 2023
1 parent 3fbed20 commit a148277
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
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

0 comments on commit a148277

Please sign in to comment.