-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add communities * Add Join to a community * fixing weird bug in gobot * partially adding directory to onboardin * commented out the directing to the directory * pushing a build to test flight * updating preloaded feeds Co-authored-by: Martin Dutra <[email protected]>
- Loading branch information
Showing
26 changed files
with
582 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// | ||
// UnfollowOperation.swift | ||
// Planetary | ||
// | ||
// Created by Martin Dutra on 1/31/21. | ||
// Copyright © 2021 Verse Communications Inc. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class UnfollowOperation: AsynchronousOperation { | ||
|
||
var identity: Identity | ||
private(set) var error: Error? | ||
|
||
init(identity: Identity) { | ||
self.identity = identity | ||
super.init() | ||
} | ||
|
||
override func main() { | ||
Log.info("UnfollowOperation started.") | ||
|
||
let configuredIdentity = AppConfiguration.current?.identity | ||
let loggedInIdentity = Bots.current.identity | ||
guard loggedInIdentity != nil, loggedInIdentity == configuredIdentity else { | ||
Log.info("Not logged in. UnfollowOperation finished.") | ||
self.error = BotError.notLoggedIn | ||
self.finish() | ||
return | ||
} | ||
|
||
Bots.current.unfollow(self.identity) { [weak self] (contact, error) in | ||
Log.optional(error) | ||
CrashReporting.shared.reportIfNeeded(error: error) | ||
self?.error = error | ||
Log.info("UnfollowOperation finished.") | ||
self?.finish() | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.