[MediaWiki-commits] [Gerrit] uncrustify stuff - change (apps...wikipedia)
jenkins-bot has submitted this change and it was merged. Change subject: uncrustify stuff .. uncrustify stuff Change-Id: I908a3f0efdaedd4fd5d75fdc27b23cab201d6433 --- M MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m M MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m M Wikipedia/View Controllers/WebView/WebViewController.m M WikipediaUnitTests/MWKSection+WMFSharingTests.m M WikipediaUnitTests/MWKSectionListTests.m M WikipediaUnitTests/Utilities/MWKImage+AssociationTestUtils.m M WikipediaUnitTests/WMFImageInfoControllerTests.m 7 files changed, 17 insertions(+), 24 deletions(-) Approvals: Fjalapeno: Looks good to me, approved jenkins-bot: Verified diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m index 15e7699..b69fc7b 100644 --- a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m +++ b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m @@ -74,7 +74,7 @@ [dict wmf_maybeSetObject:[self iso8601DateString:self.date] forKey:@date]; [dict wmf_maybeSetObject:[MWKHistoryEntry stringForDiscoveryMethod:self.discoveryMethod] forKey:@discoveryMethod]; [dict wmf_maybeSetObject:@(self.scrollPosition) forKey:@scrollPosition]; - + return [NSDictionary dictionaryWithDictionary:dict]; } diff --git a/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m b/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m index b9253dc..21637f1 100644 --- a/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m +++ b/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m @@ -42,7 +42,7 @@ MWKDataStore* tmpDataStore = [[MWKDataStore alloc] initWithBasePath:self.tempDataStoreDir]; // create article w/ mock section to prevent crashing due to image import side effects -MWKTitle* title = [[MWKSite siteWithCurrentLocale] titleWithString:@foo]; +MWKTitle* title = [[MWKSite siteWithCurrentLocale] titleWithString:@foo]; MWKArticle* article = [[MWKArticle alloc] initWithTitle:title dataStore:tmpDataStore]; [article.sections setSections:[NSMutableArray arrayWithObject:mock([MWKSection class])]]; diff --git a/Wikipedia/View Controllers/WebView/WebViewController.m b/Wikipedia/View Controllers/WebView/WebViewController.m index 47e8997..da8259f 100644 --- a/Wikipedia/View Controllers/WebView/WebViewController.m +++ b/Wikipedia/View Controllers/WebView/WebViewController.m @@ -1332,18 +1332,16 @@ - (void)navigateToPage:(MWKTitle*)title discoveryMethod:(MWKHistoryDiscoveryMethod)discoveryMethod { - NSParameterAssert(title); -if([title.text length] == 0){ - +if ([title.text length] == 0) { [self showAlert:MWLocalizedString(@article-unable-to-load-article, nil) type:ALERT_TYPE_TOP duration:2]; return; } - + NSString* cleanTitle = title.text; NSParameterAssert(cleanTitle.length); [self hideKeyboard]; - + self.jumpToFragment = title.fragment; if (discoveryMethod != MWKHistoryDiscoveryMethodBackForward discoveryMethod != MWKHistoryDiscoveryMethodReloadFromNetwork discoveryMethod != MWKHistoryDiscoveryMethodReloadFromCache) { @@ -1352,7 +1350,6 @@ [self retrieveArticleForPageTitle:title discoveryMethod:discoveryMethod]; - } - (void)reloadCurrentArticleFromNetwork { @@ -1382,10 +1379,8 @@ - (void)retrieveArticleForPageTitle:(MWKTitle*)pageTitle discoveryMethod:(MWKHistoryDiscoveryMethod)discoveryMethod { - NSParameterAssert(pageTitle); -if([pageTitle.text length] == 0){ - +if ([pageTitle.text length] == 0) { [self showAlert:MWLocalizedString(@article-unable-to-load-article, nil) type:ALERT_TYPE_TOP duration:2]; return; } @@ -1471,13 +1466,12 @@ self.isFetchingArticle = NO; -if([article.title.text length] == 0){ - +if ([article.title.text length] == 0) { [self showAlert:MWLocalizedString(@article-unable-to-load-article, nil) type:ALERT_TYPE_TOP duration:2]; return; } - + // Update the toc and web view. [self displayArticle:article.title]; @@ -1649,9 +1643,8 @@ #pragma mark Display article from data store - (void)displayArticle:(MWKTitle*)title { - NSParameterAssert(title.text); -if([title.text length] == 0){ +if ([title.text length] == 0) { return; } diff --git a/WikipediaUnitTests/MWKSection+WMFSharingTests.m b/WikipediaUnitTests/MWKSection+WMFSharingTests.m index 1c181c8..a211579 100644 --- a/WikipediaUnitTests/MWKSection+WMFSharingTests.m +++ b/WikipediaUnitTests/MWKSection+WMFSharingTests.m @@ -24,7 +24,7 @@ } - (void)testSimpleSnippet { -MWKTitle* title = [[MWKSite siteWithCurrentLocale] titleWithString:@foo]; +MWKTitle* title = [[MWKSite
[MediaWiki-commits] [Gerrit] uncrustify stuff - change (apps...wikipedia)
Bgerstle has uploaded a new change for review. https://gerrit.wikimedia.org/r/220813 Change subject: uncrustify stuff .. uncrustify stuff Change-Id: I908a3f0efdaedd4fd5d75fdc27b23cab201d6433 --- M MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m M MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m M Wikipedia/View Controllers/WebView/WebViewController.m M WikipediaUnitTests/MWKSection+WMFSharingTests.m M WikipediaUnitTests/MWKSectionListTests.m M WikipediaUnitTests/Utilities/MWKImage+AssociationTestUtils.m M WikipediaUnitTests/WMFImageInfoControllerTests.m 7 files changed, 17 insertions(+), 24 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/13/220813/1 diff --git a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m index 15e7699..b69fc7b 100644 --- a/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m +++ b/MediaWikiKit/MediaWikiKit/MWKHistoryEntry.m @@ -74,7 +74,7 @@ [dict wmf_maybeSetObject:[self iso8601DateString:self.date] forKey:@date]; [dict wmf_maybeSetObject:[MWKHistoryEntry stringForDiscoveryMethod:self.discoveryMethod] forKey:@discoveryMethod]; [dict wmf_maybeSetObject:@(self.scrollPosition) forKey:@scrollPosition]; - + return [NSDictionary dictionaryWithDictionary:dict]; } diff --git a/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m b/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m index b9253dc..21637f1 100644 --- a/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m +++ b/MediaWikiKit/MediaWikiKitTests/MWKImageListTests.m @@ -42,7 +42,7 @@ MWKDataStore* tmpDataStore = [[MWKDataStore alloc] initWithBasePath:self.tempDataStoreDir]; // create article w/ mock section to prevent crashing due to image import side effects -MWKTitle* title = [[MWKSite siteWithCurrentLocale] titleWithString:@foo]; +MWKTitle* title = [[MWKSite siteWithCurrentLocale] titleWithString:@foo]; MWKArticle* article = [[MWKArticle alloc] initWithTitle:title dataStore:tmpDataStore]; [article.sections setSections:[NSMutableArray arrayWithObject:mock([MWKSection class])]]; diff --git a/Wikipedia/View Controllers/WebView/WebViewController.m b/Wikipedia/View Controllers/WebView/WebViewController.m index 47e8997..da8259f 100644 --- a/Wikipedia/View Controllers/WebView/WebViewController.m +++ b/Wikipedia/View Controllers/WebView/WebViewController.m @@ -1332,18 +1332,16 @@ - (void)navigateToPage:(MWKTitle*)title discoveryMethod:(MWKHistoryDiscoveryMethod)discoveryMethod { - NSParameterAssert(title); -if([title.text length] == 0){ - +if ([title.text length] == 0) { [self showAlert:MWLocalizedString(@article-unable-to-load-article, nil) type:ALERT_TYPE_TOP duration:2]; return; } - + NSString* cleanTitle = title.text; NSParameterAssert(cleanTitle.length); [self hideKeyboard]; - + self.jumpToFragment = title.fragment; if (discoveryMethod != MWKHistoryDiscoveryMethodBackForward discoveryMethod != MWKHistoryDiscoveryMethodReloadFromNetwork discoveryMethod != MWKHistoryDiscoveryMethodReloadFromCache) { @@ -1352,7 +1350,6 @@ [self retrieveArticleForPageTitle:title discoveryMethod:discoveryMethod]; - } - (void)reloadCurrentArticleFromNetwork { @@ -1382,10 +1379,8 @@ - (void)retrieveArticleForPageTitle:(MWKTitle*)pageTitle discoveryMethod:(MWKHistoryDiscoveryMethod)discoveryMethod { - NSParameterAssert(pageTitle); -if([pageTitle.text length] == 0){ - +if ([pageTitle.text length] == 0) { [self showAlert:MWLocalizedString(@article-unable-to-load-article, nil) type:ALERT_TYPE_TOP duration:2]; return; } @@ -1471,13 +1466,12 @@ self.isFetchingArticle = NO; -if([article.title.text length] == 0){ - +if ([article.title.text length] == 0) { [self showAlert:MWLocalizedString(@article-unable-to-load-article, nil) type:ALERT_TYPE_TOP duration:2]; return; } - + // Update the toc and web view. [self displayArticle:article.title]; @@ -1649,9 +1643,8 @@ #pragma mark Display article from data store - (void)displayArticle:(MWKTitle*)title { - NSParameterAssert(title.text); -if([title.text length] == 0){ +if ([title.text length] == 0) { return; } diff --git a/WikipediaUnitTests/MWKSection+WMFSharingTests.m b/WikipediaUnitTests/MWKSection+WMFSharingTests.m index 1c181c8..a211579 100644 --- a/WikipediaUnitTests/MWKSection+WMFSharingTests.m +++ b/WikipediaUnitTests/MWKSection+WMFSharingTests.m @@ -24,7 +24,7 @@ } - (void)testSimpleSnippet { -MWKTitle* title = [[MWKSite siteWithCurrentLocale] titleWithString:@foo]; +