1
1
#import < Foundation/Foundation.h>
2
2
#import " CoreDataStack.h"
3
3
4
- NS_ASSUME_NONNULL_BEGIN
5
-
6
4
extern NSString * const ReaderTopicFreshlyPressedPathCommponent;
7
5
8
6
@class ReaderAbstractTopic;
@@ -14,11 +12,11 @@ extern NSString * const ReaderTopicFreshlyPressedPathCommponent;
14
12
15
13
@property (nonatomic , strong , readonly ) id <CoreDataStack> coreDataStack;
16
14
17
- - (instancetype )initWithCoreDataStack : (id <CoreDataStack>)coreDataStack NS_DESIGNATED_INITIALIZER;
15
+ - (nonnull instancetype )initWithCoreDataStack : (id <CoreDataStack>)coreDataStack NS_DESIGNATED_INITIALIZER;
18
16
19
17
- (instancetype )init NS_UNAVAILABLE;
20
18
21
- - (nullable ReaderAbstractTopic *)currentTopicInContext : (NSManagedObjectContext *)context ;
19
+ - (ReaderAbstractTopic *)currentTopicInContext : (NSManagedObjectContext *)context ;
22
20
23
21
- (void )setCurrentTopic : (ReaderAbstractTopic *)topic ;
24
22
@@ -28,7 +26,7 @@ extern NSString * const ReaderTopicFreshlyPressedPathCommponent;
28
26
@param success block called on a successful fetch.
29
27
@param failure block called if there is any error. `error` can be any underlying network error.
30
28
*/
31
- - (void )fetchReaderMenuWithSuccess : (void (^)(void ))success failure : (void (^)(NSError * _Nullable error))failure ;
29
+ - (void )fetchReaderMenuWithSuccess : (void (^)(void ))success failure : (void (^)(NSError *error))failure ;
32
30
33
31
/* *
34
32
Deletes all search topics from core data and saves the context.
@@ -63,7 +61,7 @@ extern NSString * const ReaderTopicFreshlyPressedPathCommponent;
63
61
@param phrase: The search phrase.
64
62
@param completion: A completion callback to receive the created ReaderSearchTopic instance.
65
63
*/
66
- - (void )createSearchTopicForSearchPhrase : (NSString *)phrase completion : (void (^)(NSManagedObjectID * _Nullable objectID ))completion ;
64
+ - (void )createSearchTopicForSearchPhrase : (NSString *)phrase completion : (void (^)(NSManagedObjectID *))completion ;
67
65
68
66
/* *
69
67
Unfollows the specified topic
@@ -72,7 +70,7 @@ extern NSString * const ReaderTopicFreshlyPressedPathCommponent;
72
70
@param success block called on a successful fetch.
73
71
@param failure block called if there is any error. `error` can be any underlying network error.
74
72
*/
75
- - (void )unfollowTag : (ReaderTagTopic *)topic withSuccess : (void (^)(void ))success failure : (void (^)(NSError * _Nullable error))failure ;
73
+ - (void )unfollowTag : (ReaderTagTopic *)topic withSuccess : (void (^)(void ))success failure : (void (^)(NSError *error))failure ;
76
74
77
75
/* *
78
76
Follow the tag with the specified name
@@ -83,7 +81,7 @@ extern NSString * const ReaderTopicFreshlyPressedPathCommponent;
83
81
*/
84
82
- (void )followTagNamed : (NSString *)tagName
85
83
withSuccess : (void (^)(void ))success
86
- failure : (void (^)(NSError * _Nullable error))failure
84
+ failure : (void (^)(NSError *error))failure
87
85
source : (NSString *)source ;
88
86
89
87
/* *
@@ -93,7 +91,7 @@ extern NSString * const ReaderTopicFreshlyPressedPathCommponent;
93
91
@param success block called on a successful change.
94
92
@param failure block called if there is any error. `error` can be any underlying network error.
95
93
*/
96
- - (void )toggleFollowingForTag : (ReaderTagTopic *)topic success : (void (^)(void ))success failure : (void (^)(NSError * _Nullable error))failure ;
94
+ - (void )toggleFollowingForTag : (ReaderTagTopic *)topic success : (void (^)(void ))success failure : (void (^)(NSError *error))failure ;
97
95
98
96
/* *
99
97
Toggle the following status of the site for the specified site topic
@@ -104,7 +102,7 @@ extern NSString * const ReaderTopicFreshlyPressedPathCommponent;
104
102
*/
105
103
- (void )toggleFollowingForSite : (ReaderSiteTopic *)topic
106
104
success : (void (^)(BOOL follow))success
107
- failure : (void (^)(BOOL follow, NSError * _Nullable error))failure ;
105
+ failure : (void (^)(BOOL follow, NSError *error))failure ;
108
106
109
107
/* *
110
108
Fetch a tag topic for a tag with the specified slug.
@@ -114,8 +112,8 @@ extern NSString * const ReaderTopicFreshlyPressedPathCommponent;
114
112
@param failure block called if there is any error. `error` can be any underlying network error.
115
113
*/
116
114
- (void )tagTopicForTagWithSlug : (NSString *)slug
117
- success : (void (^)(NSManagedObjectID * _Nullable objectID))success
118
- failure : (void (^)(NSError * _Nullable error))failure ;
115
+ success : (void (^)(NSManagedObjectID *objectID))success
116
+ failure : (void (^)(NSError *error))failure ;
119
117
120
118
/* *
121
119
Fetch a site topic for a site with the specified ID.
@@ -127,8 +125,8 @@ extern NSString * const ReaderTopicFreshlyPressedPathCommponent;
127
125
*/
128
126
- (void )siteTopicForSiteWithID : (NSNumber *)siteID
129
127
isFeed : (BOOL )isFeed
130
- success : (void (^)(NSManagedObjectID * _Nullable objectID, BOOL isFollowing))success
131
- failure : (void (^)(NSError * _Nullable error))failure ;
128
+ success : (void (^)(NSManagedObjectID *objectID, BOOL isFollowing))success
129
+ failure : (void (^)(NSError *error))failure ;
132
130
133
131
@end
134
132
@@ -138,5 +136,3 @@ extern NSString * const ReaderTopicFreshlyPressedPathCommponent;
138
136
- (void )mergeMenuTopics : (NSArray *)topics isLoggedIn : (BOOL )isLoggedIn withSuccess : (void (^)(void ))success ;
139
137
- (NSString *)formatTitle : (NSString *)str ;
140
138
@end
141
-
142
- NS_ASSUME_NONNULL_END
0 commit comments