mirror of
https://github.com/leanote/leanote-ios.git
synced 2025-10-18 17:52:23 +00:00
Convert int to NSUInteger
This commit is contained in:
@@ -539,7 +539,7 @@ BOOL hiddenBar = NO;
|
||||
}
|
||||
|
||||
// 得到当前的url
|
||||
int count = [realUrls count];
|
||||
NSUInteger count = [realUrls count];
|
||||
if(count < 1) {
|
||||
return;
|
||||
}
|
||||
|
@@ -92,7 +92,7 @@ BOOL inSyncing = NO;
|
||||
// 同步笔记本
|
||||
- (void) syncNotebook:(NSNumber *)afterUsn callback:(void (^)(BOOL))callback
|
||||
{
|
||||
NSNumber *maxEntry = [NSNumber numberWithInt:maxEntryInt];
|
||||
NSNumber *maxEntry = [NSNumber numberWithUnsignedInteger:maxEntryInt];
|
||||
[ApiService getSyncNotebooks:afterUsn maxEntry:maxEntry success:^(NSArray * notebookObjs) {
|
||||
if(self.canceled) {
|
||||
return;
|
||||
@@ -100,7 +100,7 @@ BOOL inSyncing = NO;
|
||||
[self syncNotebookToLocal:notebookObjs];
|
||||
|
||||
// 如果一样, 表示很可能还有笔记本, 得到最大的usn, 递归调用之
|
||||
int count = [notebookObjs count];
|
||||
NSUInteger count = [notebookObjs count];
|
||||
if (count == maxEntryInt) {
|
||||
NSNumber *maxUsn = notebookObjs[count-1][@"Usn"];
|
||||
[self syncNotebook:maxUsn callback:callback];
|
||||
@@ -186,7 +186,7 @@ BOOL inSyncing = NO;
|
||||
// 同步笔记
|
||||
- (void) syncNote:(NSNumber *)afterUsn callback:(void (^)(BOOL))callback
|
||||
{
|
||||
NSNumber *maxEntry = [NSNumber numberWithInt:maxEntryInt];
|
||||
NSNumber *maxEntry = [NSNumber numberWithUnsignedInteger:maxEntryInt];
|
||||
[ApiService getSyncNotes:afterUsn maxEntry:maxEntry success:^(NSArray * noteObjs) {
|
||||
if(self.canceled) {
|
||||
return;
|
||||
@@ -194,7 +194,7 @@ BOOL inSyncing = NO;
|
||||
[self syncNoteToLocal:noteObjs];
|
||||
|
||||
// 如果一样, 表示很可能还有笔记本, 得到最大的usn, 递归调用之
|
||||
int count = [noteObjs count];
|
||||
NSUInteger count = [noteObjs count];
|
||||
if (count == maxEntryInt) {
|
||||
NSNumber *maxUsn = noteObjs[count-1][@"Usn"];
|
||||
[self syncNote:maxUsn callback:callback];
|
||||
@@ -244,7 +244,7 @@ BOOL inSyncing = NO;
|
||||
// 同步标签
|
||||
- (void) syncTag:(NSNumber *)afterUsn callback:(void (^)(BOOL))callback
|
||||
{
|
||||
NSNumber *maxEntry = [NSNumber numberWithInt:maxEntryInt];
|
||||
NSNumber *maxEntry = [NSNumber numberWithUnsignedInteger:maxEntryInt];
|
||||
[ApiService getSyncTags:afterUsn maxEntry:maxEntry success:^(NSArray * tagObjs) {
|
||||
if(self.canceled) {
|
||||
return;
|
||||
@@ -252,7 +252,7 @@ BOOL inSyncing = NO;
|
||||
[self syncTagToLocal:tagObjs];
|
||||
|
||||
// 如果一样, 表示很可能还有Tag, 得到最大的usn, 递归调用之
|
||||
int count = [tagObjs count];
|
||||
NSUInteger count = [tagObjs count];
|
||||
if (count == maxEntryInt) {
|
||||
NSNumber *maxUsn = tagObjs[count-1][@"Usn"];
|
||||
[self syncTag:maxUsn callback:callback];
|
||||
|
@@ -39,7 +39,7 @@
|
||||
request.HTTPBody = [requestBody dataUsingEncoding:NSUTF8StringEncoding];
|
||||
|
||||
// Auth Headers
|
||||
[request setValue:[NSString stringWithFormat:@"%d", requestBody.length] forHTTPHeaderField:@"Content-Length"];
|
||||
[request setValue:[NSString stringWithFormat:@"%lu", requestBody.length] forHTTPHeaderField:@"Content-Length"];
|
||||
[request addValue:@"*/*" forHTTPHeaderField:@"Accept"];
|
||||
|
||||
// Bearer Token
|
||||
|
@@ -16,6 +16,6 @@
|
||||
|
||||
@property (strong, nonatomic) NSArray *urlArr;
|
||||
@property (strong, nonatomic) NSString *curUrl;
|
||||
@property int curIndex;
|
||||
@property NSUInteger curIndex;
|
||||
|
||||
@end
|
@@ -20,7 +20,7 @@
|
||||
|
||||
@property (nonatomic, strong) UIButton *saveBtn;
|
||||
|
||||
@property int count;
|
||||
@property NSUInteger count;
|
||||
@property (strong, nonatomic) NSMutableArray *views;
|
||||
@end
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
}
|
||||
-(void)setIndexLabel
|
||||
{
|
||||
_label.text = [NSString stringWithFormat:@"%i/%i", self.curIndex + 1, self.count];
|
||||
_label.text = [NSString stringWithFormat:@"%lu/%lu", self.curIndex + 1, self.count];
|
||||
}
|
||||
|
||||
@end
|
||||
|
Reference in New Issue
Block a user