Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MobileWikiAppiOSUserHistory schema event logging updates #2447

Merged
merged 26 commits into from Jul 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b91221a
tighten access control in event logging service
montehurd Jul 17, 2018
f00ddfe
Merge branch 'develop' into new-feed-event-logging
montehurd Jul 17, 2018
8a95a41
Merge branch 'develop' into new-feed-event-logging
montehurd Jul 17, 2018
05999ad
bump MobileWikiAppiOSUserHistory schema version
montehurd Jul 18, 2018
c8b50a3
log `feed_disabled`
montehurd Jul 18, 2018
2d95c99
remove unneeded conversion to number
montehurd Jul 18, 2018
ca45b6b
log `trend_notify`
montehurd Jul 18, 2018
51389a0
bump MobileWikiAppiOSUserHistory schema version
montehurd Jul 19, 2018
0f881dc
add logging properties to WMFContentGroupKind extension
montehurd Jul 19, 2018
175fc2f
log `feed_enabled_list`
montehurd Jul 19, 2018
4f0292f
add event logging labels for pic of day and continue reading
montehurd Jul 20, 2018
f5727e4
move WMFContentGroupKind extension to WMF framework
montehurd Jul 20, 2018
98c468a
new WMFContentGroupKind event logging extension
montehurd Jul 20, 2018
222ba0d
Merge branch 'develop' into update/new-feed-event-logging/T197194
montehurd Jul 20, 2018
845381e
Merge branch 'develop' into update/new-feed-event-logging/T197194
montehurd Jul 20, 2018
013219c
use `wmf` prefix for consistency
montehurd Jul 20, 2018
b4c5db9
log `search_tab`
montehurd Jul 20, 2018
e90abd6
Merge branch 'develop' into update/new-feed-event-logging/T197194
montehurd Jul 20, 2018
1cc9ef6
fix test failure
montehurd Jul 23, 2018
df100f6
Merge branch 'develop' into update/new-feed-event-logging/T197194
Jul 23, 2018
4c7022f
Merge branch 'develop' into update/new-feed-event-logging/T197194
joewalsh Jul 23, 2018
6c7ea05
Merge branch 'develop' into update/new-feed-event-logging/T197194
joewalsh Jul 23, 2018
55b945b
revert moving content group kind extensions to WMF framework
montehurd Jul 23, 2018
08507da
update `feed_enabled_list` payload construction to use `globalContent…
montehurd Jul 23, 2018
e8b1a6e
Merge branch 'develop' into update/new-feed-event-logging/T197194
montehurd Jul 23, 2018
bfd1fd3
revert change not needed since backing extensions out of WMF framework
montehurd Jul 23, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions WMF Framework/EventLoggingService.swift
Expand Up @@ -14,13 +14,13 @@ public class EventLoggingService : NSObject, URLSessionDelegate {
static let loggedDaysInstalled = "DailyLoggingStatsDaysInstalled"
}

public var pruningAge: TimeInterval = 60*60*24*30 // 30 days
public var sendImmediatelyOnWWANThreshhold: TimeInterval = 30
public var postBatchSize = 10
public var postTimeout: TimeInterval = 60*2 // 2 minutes
public var postInterval: TimeInterval = 60*10 // 10 minutes
private var pruningAge: TimeInterval = 60*60*24*30 // 30 days
private var sendImmediatelyOnWWANThreshhold: TimeInterval = 30
private var postBatchSize = 10
private var postTimeout: TimeInterval = 60*2 // 2 minutes
private var postInterval: TimeInterval = 60*10 // 10 minutes

public var debugDisableImmediateSend = false
private var debugDisableImmediateSend = false

private static let scheme = "https" // testing is http
private static let host = "meta.wikimedia.org" // testing is deployment.wikimedia.beta.wmflabs.org
Expand Down Expand Up @@ -131,7 +131,7 @@ public class EventLoggingService : NSObject, URLSessionDelegate {
self.managedObjectContext.persistentStoreCoordinator = psc
}

public convenience init(permanentStorageURL: URL) {
private convenience init(permanentStorageURL: URL) {

let reachabilityManager = AFNetworkReachabilityManager.init(forDomain: EventLoggingService.host)

Expand Down Expand Up @@ -258,7 +258,7 @@ public class EventLoggingService : NSObject, URLSessionDelegate {
}

@objc
public func logEvent(_ event: NSDictionary) {
private func logEvent(_ event: NSDictionary) {
let now = NSDate()

let moc = self.managedObjectContext
Expand Down
24 changes: 12 additions & 12 deletions Wikipedia.xcodeproj/project.pbxproj
Expand Up @@ -264,11 +264,6 @@
7A998AC31FE20F3B007FE06E /* CollectionViewEditControllerNavigationDelegate+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A998AC01FE20F3B007FE06E /* CollectionViewEditControllerNavigationDelegate+Extensions.swift */; };
7A998AC41FE20F3B007FE06E /* CollectionViewEditControllerNavigationDelegate+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A998AC01FE20F3B007FE06E /* CollectionViewEditControllerNavigationDelegate+Extensions.swift */; };
7A998AC51FE20F3B007FE06E /* CollectionViewEditControllerNavigationDelegate+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A998AC01FE20F3B007FE06E /* CollectionViewEditControllerNavigationDelegate+Extensions.swift */; };
7AA7011420DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA7011320DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift */; };
7AA7011520DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA7011320DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift */; };
7AA7011620DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA7011320DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift */; };
7AA7011720DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA7011320DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift */; };
7AA7011820DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA7011320DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift */; };
7ABAD6B420338CFB006A364C /* ReadingListDetailUnderBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ABAD6B220338CFA006A364C /* ReadingListDetailUnderBarViewController.swift */; };
7ABAD6B520338CFB006A364C /* ReadingListDetailUnderBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ABAD6B220338CFA006A364C /* ReadingListDetailUnderBarViewController.swift */; };
7ABAD6B620338CFB006A364C /* ReadingListDetailUnderBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ABAD6B220338CFA006A364C /* ReadingListDetailUnderBarViewController.swift */; };
Expand Down Expand Up @@ -603,6 +598,11 @@
B0421AA4206991F500C22630 /* SavedTabBarItemProgressBadgeManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0421AA1206991F500C22630 /* SavedTabBarItemProgressBadgeManager.swift */; };
B0421AA5206991F500C22630 /* SavedTabBarItemProgressBadgeManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0421AA1206991F500C22630 /* SavedTabBarItemProgressBadgeManager.swift */; };
B0421AA6206991F500C22630 /* SavedTabBarItemProgressBadgeManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0421AA1206991F500C22630 /* SavedTabBarItemProgressBadgeManager.swift */; };
B0432344210680A900A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0432343210680A800A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift */; };
B0432345210680A900A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0432343210680A800A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift */; };
B0432346210680A900A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0432343210680A800A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift */; };
B0432347210680A900A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0432343210680A800A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift */; };
B0432348210680A900A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0432343210680A800A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift */; };
B04393F21D21C04500FD2BD9 /* WMFImageTagParserTests.m in Sources */ = {isa = PBXBuildFile; fileRef = B04393F11D21C04500FD2BD9 /* WMFImageTagParserTests.m */; };
B04C444B1E56966B00C6DFB0 /* Array<UITextField>+WMFAllFieldsFilled.swift in Sources */ = {isa = PBXBuildFile; fileRef = B04C444A1E56966B00C6DFB0 /* Array<UITextField>+WMFAllFieldsFilled.swift */; };
B04C809A1EA6E2A100EDD2DE /* WKWebView+WMFWebViewControllerJavascript.swift in Sources */ = {isa = PBXBuildFile; fileRef = B04C80991EA6E2A100EDD2DE /* WKWebView+WMFWebViewControllerJavascript.swift */; };
Expand Down Expand Up @@ -3247,7 +3247,6 @@
7A976F82207BAC3E00F7EFE6 /* AuthenticationDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticationDelegate.swift; sourceTree = "<group>"; };
7A998ABA1FE201AB007FE06E /* SavedArticlesViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SavedArticlesViewController.swift; sourceTree = "<group>"; };
7A998AC01FE20F3B007FE06E /* CollectionViewEditControllerNavigationDelegate+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CollectionViewEditControllerNavigationDelegate+Extensions.swift"; sourceTree = "<group>"; };
7AA7011320DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WMFContentGroupKind+FeedCustomization.swift"; sourceTree = "<group>"; };
7ABAD6B220338CFA006A364C /* ReadingListDetailUnderBarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReadingListDetailUnderBarViewController.swift; sourceTree = "<group>"; };
7ABAD6B320338CFB006A364C /* ReadingListDetailUnderBarViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ReadingListDetailUnderBarViewController.xib; sourceTree = "<group>"; };
7ABAD6BE20349B91006A364C /* Collection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Collection.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3380,6 +3379,7 @@
B040343E1F0592F7001B837B /* OnThisDayExploreCollectionViewCell+WMFFeedContentDisplaying.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "OnThisDayExploreCollectionViewCell+WMFFeedContentDisplaying.swift"; path = "Wikipedia/Code/OnThisDayExploreCollectionViewCell+WMFFeedContentDisplaying.swift"; sourceTree = SOURCE_ROOT; };
B04034491F0722B3001B837B /* NewsCollectionViewCell+WMFFeedContentDisplaying.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NewsCollectionViewCell+WMFFeedContentDisplaying.swift"; path = "Wikipedia/Code/NewsCollectionViewCell+WMFFeedContentDisplaying.swift"; sourceTree = SOURCE_ROOT; };
B0421AA1206991F500C22630 /* SavedTabBarItemProgressBadgeManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SavedTabBarItemProgressBadgeManager.swift; sourceTree = "<group>"; };
B0432343210680A800A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "WMFContentGroupKind+FeedCustomization.swift"; sourceTree = "<group>"; };
B04393F11D21C04500FD2BD9 /* WMFImageTagParserTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMFImageTagParserTests.m; sourceTree = "<group>"; };
B04C444A1E56966B00C6DFB0 /* Array<UITextField>+WMFAllFieldsFilled.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Array<UITextField>+WMFAllFieldsFilled.swift"; path = "Wikipedia/Code/Array<UITextField>+WMFAllFieldsFilled.swift"; sourceTree = SOURCE_ROOT; };
B04C80991EA6E2A100EDD2DE /* WKWebView+WMFWebViewControllerJavascript.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "WKWebView+WMFWebViewControllerJavascript.swift"; path = "Wikipedia/Code/WKWebView+WMFWebViewControllerJavascript.swift"; sourceTree = SOURCE_ROOT; };
Expand Down Expand Up @@ -5912,7 +5912,7 @@
7AA7011220DB352000F3F0BC /* Common */ = {
isa = PBXGroup;
children = (
7AA7011320DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift */,
B0432343210680A800A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift */,
7A19C64720DD3440000EF7F7 /* BaseExploreFeedSettingsViewController.swift */,
);
name = Common;
Expand Down Expand Up @@ -9859,6 +9859,7 @@
8382F8D320D928BF00AE5250 /* ColumnarCollectionViewControllerLayoutCache.swift in Sources */,
B07F823B203F68FE00317D78 /* UILabel+WMFStyling.swift in Sources */,
D88FCADF1E4B74D300505A9F /* WikidataFetcher.swift in Sources */,
B0432344210680A900A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift in Sources */,
B0E802BE1C0CD2360065EBC0 /* UIButton+WMFButton.m in Sources */,
7A20AE082057F39C005FB5DF /* UIView+Identifier.swift in Sources */,
7A29A5CE1F6C49C600E8F42B /* CollectionViewUpdater.swift in Sources */,
Expand Down Expand Up @@ -10137,7 +10138,6 @@
B09B03F51CE0FB7700009083 /* ReadingThemesControlsViewController.swift in Sources */,
B0E8036F1C0CD99A0065EBC0 /* WMFTableOfContentsPresentationController.swift in Sources */,
B0C6BE401E4068C60033BD6E /* WMFLoginViewController.swift in Sources */,
7AA7011420DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift in Sources */,
B0E807111C0CEBF00065EBC0 /* WebViewController.m in Sources */,
7AE1D3391FCD10B900393471 /* SavedViewController.swift in Sources */,
3F82AD8D20690C8C00156E29 /* EditSummaryViewController.swift in Sources */,
Expand Down Expand Up @@ -10322,6 +10322,7 @@
D80ED32D1EE57F4800CE8C50 /* WMFTableOfContentsCell.swift in Sources */,
D80ED32F1EE57F4800CE8C50 /* WMFSettingsMenuItem.m in Sources */,
D80ED3311EE57F4800CE8C50 /* UIScrollView+ScrollSubviewToLocation.m in Sources */,
B0432348210680A900A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift in Sources */,
83987AD420E4FB2C00C92C60 /* UISearchBar+Theme.swift in Sources */,
83AE1C841F34BB5B004B62E0 /* ImageDimmingExampleViewController.swift in Sources */,
832289DF1F7291BA0081A5FB /* SizeThatFitsReusableView.swift in Sources */,
Expand Down Expand Up @@ -10464,7 +10465,6 @@
7AEBAD492102117C002FAB41 /* NSFetchedResultsController+IndexPathValidation.swift in Sources */,
D80ED3AD1EE57F4800CE8C50 /* MWKSection+TOCItem.swift in Sources */,
D87B13A91F276B1000B27227 /* ShareActivityController.swift in Sources */,
7AA7011820DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift in Sources */,
D80ED3AE1EE57F4800CE8C50 /* PageHistoryFetcher.swift in Sources */,
D80ED3AF1EE57F4800CE8C50 /* WikiTextSectionFetcher.m in Sources */,
D80ED3B01EE57F4800CE8C50 /* CreateAccountFunnel.m in Sources */,
Expand Down Expand Up @@ -10826,6 +10826,7 @@
B07F823E203F690900317D78 /* UILabel+WMFStyling.swift in Sources */,
B0C7A0811F710E94008415E7 /* WMFWelcomeLanguagesAnimationBackgroundView.swift in Sources */,
D8A42A641E815A9C00D8E281 /* WMFAuthButton.swift in Sources */,
B0432347210680A900A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift in Sources */,
7A20AE0B2057F39C005FB5DF /* UIView+Identifier.swift in Sources */,
D8A42A651E815A9C00D8E281 /* WMFReferencePanelViewController.swift in Sources */,
7A29A5D11F6C49C600E8F42B /* CollectionViewUpdater.swift in Sources */,
Expand Down Expand Up @@ -11104,7 +11105,6 @@
D8A42B8F1E815A9C00D8E281 /* WMFTableOfContentsPresentationController.swift in Sources */,
D8A42B921E815A9C00D8E281 /* WMFLoginViewController.swift in Sources */,
D8A42B941E815A9C00D8E281 /* WebViewController.m in Sources */,
7AA7011720DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift in Sources */,
D8A42B951E815A9C00D8E281 /* MWKSection+TOCItem.swift in Sources */,
D8533ED81ECF581600E44F86 /* NewsCollectionViewHeader.swift in Sources */,
7AE1D33C1FCD10B900393471 /* SavedViewController.swift in Sources */,
Expand Down Expand Up @@ -11289,6 +11289,7 @@
D8CE258F1E698E2400DAE2E0 /* WMFWelcomeAnimationViewControllers.swift in Sources */,
D8CE25901E698E2400DAE2E0 /* WMFTableOfContentsCell.swift in Sources */,
D8CE25931E698E2400DAE2E0 /* WMFSettingsMenuItem.m in Sources */,
B0432345210680A900A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift in Sources */,
83987AD120E4FB2C00C92C60 /* UISearchBar+Theme.swift in Sources */,
D8CE25951E698E2400DAE2E0 /* UIScrollView+ScrollSubviewToLocation.m in Sources */,
832289DC1F7291BA0081A5FB /* SizeThatFitsReusableView.swift in Sources */,
Expand Down Expand Up @@ -11431,7 +11432,6 @@
7AEBAD462102117C002FAB41 /* NSFetchedResultsController+IndexPathValidation.swift in Sources */,
D8CE26181E698E2400DAE2E0 /* MWKSection+TOCItem.swift in Sources */,
D8CE26191E698E2400DAE2E0 /* PageHistoryFetcher.swift in Sources */,
7AA7011520DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift in Sources */,
D8CE261A1E698E2400DAE2E0 /* WikiTextSectionFetcher.m in Sources */,
B025D8CA1EAF00EC00716CED /* WKScriptMessage+WMFScriptMessage.swift in Sources */,
D8CE261B1E698E2400DAE2E0 /* CreateAccountFunnel.m in Sources */,
Expand Down Expand Up @@ -11465,6 +11465,7 @@
D8EC3DE91E9BDA35006712EB /* UIButton+WMFButton.m in Sources */,
D82E956C1F156F77007BD960 /* UIView+SubviewEnumeration.swift in Sources */,
D8EC3DEA1E9BDA35006712EB /* WMFTableOfContentsAnimator.swift in Sources */,
B0432346210680A900A9A6B6 /* WMFContentGroupKind+FeedCustomization.swift in Sources */,
BA45241A1F324C3100439C42 /* FontSizeSliderViewController.swift in Sources */,
D8EC3DED1E9BDA35006712EB /* WMFReferencePageBackgroundView.swift in Sources */,
83E52BB61F681F940045E776 /* ShareAFactViewController.swift in Sources */,
Expand Down Expand Up @@ -11750,7 +11751,6 @@
7A0161E21FE8B4CA00AEDC3D /* TagCollectionViewCell.swift in Sources */,
D8EC3F181E9BDA35006712EB /* PageHistoryFetcher.swift in Sources */,
D87B13A71F276B1000B27227 /* ShareActivityController.swift in Sources */,
7AA7011620DB355200F3F0BC /* WMFContentGroupKind+FeedCustomization.swift in Sources */,
D8EC3F191E9BDA35006712EB /* WikiTextSectionFetcher.m in Sources */,
B025D8CB1EAF00EC00716CED /* WKScriptMessage+WMFScriptMessage.swift in Sources */,
D8EC3F1A1E9BDA35006712EB /* CreateAccountFunnel.m in Sources */,
Expand Down
2 changes: 2 additions & 0 deletions Wikipedia/Code/EventLoggingFunnel.h
Expand Up @@ -41,6 +41,8 @@ extern EventLoggingLabel const EventLoggingLabelLogin;
extern EventLoggingLabel const EventLoggingLabelSyncArticle;
extern EventLoggingLabel const EventLoggingLabelLocation;
extern EventLoggingLabel const EventLoggingLabelMainPage;
extern EventLoggingLabel const EventLoggingLabelContinueReading;
extern EventLoggingLabel const EventLoggingLabelPictureOfTheDay;

/**
* Base class for EventLogging multi-stage funnels.
Expand Down
2 changes: 2 additions & 0 deletions Wikipedia/Code/EventLoggingFunnel.m
Expand Up @@ -33,6 +33,8 @@
EventLoggingLabel const EventLoggingLabelSyncArticle = @"sync_article";
EventLoggingLabel const EventLoggingLabelLocation = @"location";
EventLoggingLabel const EventLoggingLabelMainPage = @"main_page";
EventLoggingLabel const EventLoggingLabelContinueReading = @"continue_reading";
EventLoggingLabel const EventLoggingLabelPictureOfTheDay = @"picture_of_the_day";

@implementation EventLoggingFunnel

Expand Down
4 changes: 2 additions & 2 deletions Wikipedia/Code/NSUserDefaults+WMFExtensions.swift
Expand Up @@ -244,7 +244,7 @@ let WMFSearchLanguageKey = "WMFSearchLanguageKey"
}
}

@objc public var openAppOnSearchTab: Bool {
@objc public var wmf_openAppOnSearchTab: Bool {
get {
return bool(forKey: "WMFOpenAppOnSearchTab")
}
Expand Down Expand Up @@ -486,7 +486,7 @@ let WMFSearchLanguageKey = "WMFSearchLanguageKey"
set {
set(newValue.rawValue, forKey: WMFDefaultTabTypeKey)
synchronize()
openAppOnSearchTab = newValue == .settings
wmf_openAppOnSearchTab = newValue == .settings
}
}
}
4 changes: 2 additions & 2 deletions Wikipedia/Code/SearchSettingsViewController.swift
Expand Up @@ -32,7 +32,7 @@ public final class SearchSettingsViewController: UIViewController {

private lazy var sections: [Section] = {
let showLanguagesOnSearch = Item(title: WMFLocalizedString("settings-language-bar", value: "Show languages on search", comment: "Title in Settings for toggling the display the language bar in the search view"), isOn: UserDefaults.wmf_userDefaults().wmf_showSearchLanguageBar(), controlTag: 1)
let openAppOnSearchTab = Item(title: WMFLocalizedString("settings-search-open-app-on-search", value: "Open app on Search tab", comment: "Title for setting that allows users to open app on Search tab"), isOn: UserDefaults.wmf_userDefaults().openAppOnSearchTab, controlTag: 2)
let openAppOnSearchTab = Item(title: WMFLocalizedString("settings-search-open-app-on-search", value: "Open app on Search tab", comment: "Title for setting that allows users to open app on Search tab"), isOn: UserDefaults.wmf_userDefaults().wmf_openAppOnSearchTab, controlTag: 2)
let items = [showLanguagesOnSearch, openAppOnSearchTab]
let sections = [Section(items: items, footerTitle: WMFLocalizedString("settings-search-footer-text", value: "Set the app to open to the Search tab instead of the Explore tab", comment: "Footer text for section that allows users to customize certain Search settings"))]
return sections
Expand Down Expand Up @@ -89,7 +89,7 @@ extension SearchSettingsViewController: WMFSettingsTableViewCellDelegate {
case 1:
UserDefaults.wmf_userDefaults().wmf_setShowSearchLanguageBar(sender.isOn)
case 2:
UserDefaults.wmf_userDefaults().openAppOnSearchTab = sender.isOn
UserDefaults.wmf_userDefaults().wmf_openAppOnSearchTab = sender.isOn
default:
break
}
Expand Down