mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
clean up
This commit is contained in:
parent
747695c39b
commit
5dc8f4e6e2
2 changed files with 5 additions and 13 deletions
|
@ -167,17 +167,12 @@ final class JoinOpenGroupVC: BaseVC, UIPageViewControllerDataSource, UIPageViewC
|
|||
try MessageSender.syncConfiguration(db, forceSyncNow: true).retainUntilComplete() // FIXME: It's probably cleaner to do this inside addOpenGroup(...)
|
||||
}
|
||||
|
||||
let maybeThread: SessionThread? = Storage.shared.write { db in
|
||||
let threadId: String = OpenGroup.idFor(roomToken: roomToken, server: server)
|
||||
return try SessionThread.fetchOrCreate(db, id: threadId, variant: .openGroup)
|
||||
}
|
||||
|
||||
self?.presentingViewController?.dismiss(animated: true, completion: nil)
|
||||
|
||||
if let thread = maybeThread, shouldOpenCommunity {
|
||||
if shouldOpenCommunity {
|
||||
SessionApp.presentConversation(
|
||||
for: thread.id,
|
||||
threadVariant: thread.variant,
|
||||
for: OpenGroup.idFor(roomToken: roomToken, server: server),
|
||||
threadVariant: .openGroup,
|
||||
isMessageRequest: false,
|
||||
action: .compose,
|
||||
focusInteractionId: nil,
|
||||
|
|
|
@ -110,15 +110,12 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
self.capture.camera = self.capture.back;
|
||||
self.capture.focusMode = AVCaptureFocusModeContinuousAutoFocus;
|
||||
self.capture.delegate = self;
|
||||
|
||||
[self.capture start];
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.capture.layer.frame = self.view.bounds;
|
||||
[self.view.layer addSublayer:self.capture.layer];
|
||||
[self.view bringSubviewToFront:self.maskingView];
|
||||
|
||||
dispatch_async(self.captureQueue, ^{
|
||||
[self.capture start];
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue