You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move WPAccountwordPressComRestAPI definition to Swift (#24230)
* Tidy: Remove unused `import Foundation`
* Tidy: Reduce surface area of `WPAccount` `wordPressComRestApi` usages
* Move `wordPressComRestAPI` definition to Swift
* Use `guard` over `if` in `WPAccount+RestApi`
// At the time of writing, there is an implicit assumption on what the object parameter value means.
31
+
// For example, the WordPressAppDelegate.handleDefaultAccountChangedNotification(_:) subscriber inspects the object parameter to decide whether the notification was sent as a result of a login.
32
+
// If the object is non-nil, then the method considers the source a login.
33
+
//
34
+
// The code path in which we are is that of an invalid token, and that's neither a login nor a logout, it's more appropriate to consider it a logout.
35
+
// That's because if the token is invalid the app will soon received errors from the API and it's therefore better to force the user to login again.
/// A WordPressRestComApi object if the account is a WordPress.com account. Otherwise, it returns `nil`.
38
+
///
39
+
/// Important: Do not set this directly!
40
+
///
41
+
/// It's reserved for Objective-C to Swift interoperability in the context of separating this model from the app target and will be removed at some point.
// At the time of writing, there is an implicit assumption on what the object parameter value means.
178
-
// For example, the WordPressAppDelegate.handleDefaultAccountChangedNotification(_:) subscriber inspects the object parameter to decide whether the notification was sent as a result of a login.
179
-
// If the object is non-nil, then the method considers the source a login.
180
-
//
181
-
// The code path in which we are is that of an invalid token, and that's neither a login nor a logout, it's more appropriate to consider it a logout.
182
-
// That's because if the token is invalid the app will soon received errors from the API and it's therefore better to force the user to login again.
0 commit comments