Move threads enabling logic to the coordinator

This commit is contained in:
ismailgulek 2022-04-05 11:35:57 +03:00
parent bd6794af71
commit 13a0e63ec4
No known key found for this signature in database
GPG key ID: E96336D42D9470A9
2 changed files with 2 additions and 2 deletions

View file

@ -7440,8 +7440,6 @@ static CGSize kThreadListBarButtonItemImageSize;
MXWeakify(self);
[self.threadsBetaBridgePresenter dismissWithAnimated:YES completion:^{
MXStrongifyAndReturnIfNil(self);
RiotSettings.shared.enableThreads = YES;
MXSDKOptions.sharedInstance.enableThreads = YES;
[self cancelEventSelection];
[self.roomDataSource reload];
[self openThreadWithId:coordinatorBridgePresenter.threadId];

View file

@ -30,6 +30,8 @@ final class ThreadsBetaCoordinator: NSObject, ThreadsBetaCoordinatorProtocol {
let result = ThreadsBetaViewController.instantiate()
result.didTapEnableButton = { [weak self] in
guard let self = self else { return }
RiotSettings.shared.enableThreads = true
MXSDKOptions.sharedInstance().enableThreads = true
self.delegate?.threadsBetaCoordinatorDidTapEnable(self)
}
result.didTapCancelButton = { [weak self] in