Skip to content

Commit

Permalink
1.1 - Code Analyzer fixes. Change build number.
Browse files Browse the repository at this point in the history
  • Loading branch information
香風智乃 authored and 香風智乃 committed Nov 19, 2018
1 parent c2aced6 commit 15ab6ed
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Shukofukurou-IOS/Backend/AiringNotificationManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ - (void)checknotifications:(void (^)(bool success))completionHandler {
- (void)checkListForAiringTitles:(void (^)(bool success))completionHandler {
NSLog(@"Checking for new airing titles");
__block int service = [AiringNotificationManager airingNotificationServiceSource];
NSArray *list = @[];
NSArray *list;
switch (service) {
case 1: {
NSDictionary *udict = [listservice getAllUserNames];
Expand Down Expand Up @@ -299,7 +299,7 @@ - (void)removeIgnoreNotifyingTitle:(int)titleid withService:(int)service {
- (void)cleanupFinishedTitles {
NSLog(@"Clearing Finished Titles from Notifications");
[_managedObjectContext performBlockAndWait:^{
NSArray *notifications = @[];
NSArray *notifications;
NSFetchRequest *fetchRequest = [NSFetchRequest new];
fetchRequest.entity = [NSEntityDescription entityForName:@"Notifications" inManagedObjectContext:self.managedObjectContext];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"finished == %i", 1];
Expand All @@ -316,7 +316,7 @@ - (void)cleanupFinishedTitles {

- (void)clearNotifyList {
[_managedObjectContext performBlockAndWait:^{
NSArray *notifications = @[];
NSArray *notifications;
NSFetchRequest *fetchRequest = [NSFetchRequest new];
fetchRequest.entity = [NSEntityDescription entityForName:@"Notifications" inManagedObjectContext:self.managedObjectContext];
NSError *error = nil;
Expand Down
2 changes: 1 addition & 1 deletion Shukofukurou-IOS/Backend/TitleIdEnumerator.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

@implementation TitleIdEnumerator
- (instancetype) initWithList:(NSArray *)list withType:(int)type completion:(void (^)(TitleIdEnumerator *titleidenum))completionHandler {
if ([super init]) {
if (self = [super init]) {
self.tmplist = list;
self.type = type;
_completionHandler = completionHandler;
Expand Down
2 changes: 1 addition & 1 deletion Shukofukurou-IOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>20181116</string>
<string>20181119</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIBackgroundModes</key>
Expand Down
2 changes: 1 addition & 1 deletion Shukofukurou-IOS/View Controllers/AiringViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
aentrycell.progress.text = [NSString stringWithFormat:@"Episodes: %@", entry[@"episodes"]];
aentrycell.type.text = [NSString stringWithFormat:@"Type: %@", entry[@"type"]];
[aentrycell loadimage:entry[@"image_url"]];
return aentrycell;
return aentrycell ? aentrycell : [UITableViewCell new];
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
Expand Down
5 changes: 0 additions & 5 deletions Shukofukurou-IOS/View Controllers/ListViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@ - (void)hidemenubtn {
}

- (void)recieveNotification:(NSNotification *)notification {
bool refresh = YES;
if (notification.object && [notification.object isKindOfClass:[NSDictionary class]]) {
NSDictionary *userinfo = notification.object;
refresh = ((NSNumber *)userinfo[@"refresh"]).boolValue;
}
if (([notification.name isEqualToString:@"AnimeRefreshList"] && _listtype == Anime) || ([notification.name isEqualToString:@"MangaRefreshList"] && _listtype == Manga)) {
NSLog(@"Refreshing List");
[self refreshListWithCompletionHandler:^(bool success) {
Expand Down
2 changes: 1 addition & 1 deletion Shukofukurou-IOS/View Controllers/SeasonsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell
// Configure the cell
cell.title.text = entry[@"title"];
[cell loadimage:entry[@"image_url"]];
return cell;
return cell ? cell : [UICollectionViewCell new];
}

#pragma mark <UICollectionViewDelegate>
Expand Down
4 changes: 2 additions & 2 deletions Shukofukurou-IOS/View Controllers/TitleInfoViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ - (NSDictionary *)retrieveEntry:(int)titleid withType:(int)type {
return nil;
}

- (NSArray *)generateUserEntryAnimeArray:(NSDictionary *)entry {
- (NSArray *)generateUserEntryAnimeArray:( NSDictionary * _Nonnull)entry {
NSMutableArray *entrycellarray = [NSMutableArray new];
[entrycellarray addObject:[[EntryCellInfo alloc] initCellWithTitle:@"Episode" withValue:entry[@"watched_episodes"] withMaximumCellValue:((NSNumber *)entry[@"episodes"]).intValue withCellType:cellTypeProgressEntry]];
[entrycellarray addObject:[[EntryCellInfo alloc] initCellWithTitle:@"Status" withValue:entry[@"watched_status"] withCellType:cellTypeEntry]];
Expand All @@ -621,7 +621,7 @@ - (NSArray *)generateUserEntryAnimeArray:(NSDictionary *)entry {
return entrycellarray;
}

- (NSArray *)generateUserEntryMangaArray:(NSDictionary *)entry {
- (NSArray *)generateUserEntryMangaArray:(NSDictionary * _Nonnull)entry {
NSMutableArray *entrycellarray = [NSMutableArray new];
[entrycellarray addObject:[[EntryCellInfo alloc] initCellWithTitle:@"Chapter" withValue:entry[@"chapters_read"] withMaximumCellValue:((NSNumber *)entry[@"chapters"]).intValue withCellType:cellTypeProgressEntry]];
[entrycellarray addObject:[[EntryCellInfo alloc] initCellWithTitle:@"Volume" withValue:entry[@"volumes_read"] withMaximumCellValue:((NSNumber *)entry[@"volumes"]).intValue withCellType:cellTypeProgressEntry]];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cell
cell.title.text = entry[@"title"];
[cell loadimage:entry[@"image_url"]];

return cell;
return cell ? cell : [UICollectionViewCell new];
}

#pragma mark <UICollectionViewDelegate>
Expand All @@ -172,7 +172,7 @@ - (void)showTitleView:(int)titleid withType:(int)type {

- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
{
UICollectionReusableView *reusableview = nil;
UICollectionReusableView *reusableview = [UICollectionReusableView new];
if (kind == UICollectionElementKindSectionHeader) {
TrendingCollectionHeaderView *headerView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"HeaderView" forIndexPath:indexPath];
headerView.sectionLabel.text = _items.allKeys[indexPath.section];
Expand Down

0 comments on commit 15ab6ed

Please sign in to comment.