Skip to content

Commit

Permalink
New Tab Page Settings Storage (#3159)
Browse files Browse the repository at this point in the history
  • Loading branch information
dus7 authored Jul 30, 2024
1 parent ab28349 commit a49505e
Show file tree
Hide file tree
Showing 13 changed files with 491 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Core/UserDefaultsPropertyWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ public struct UserDefaultsWrapper<T> {

case vpnRedditWorkaroundInstalled = "com.duckduckgo.ios.vpn.workaroundInstalled"


case newTabPageSectionsSettings = "com.duckduckgo.ios.newTabPage.sections.settings"
case newTabPageShortcutsSettings = "com.duckduckgo.ios.newTabPage.shortcuts.settings"

// Debug keys

case debugNewTabPageSectionsEnabledKey = "com.duckduckgo.ios.debug.newTabPageSectionsEnabled"
Expand Down
56 changes: 56 additions & 0 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,11 @@
6F03CB052C32EFCC004179A8 /* MockPixelFiring.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F03CB032C32EFA8004179A8 /* MockPixelFiring.swift */; };
6F03CB072C32F173004179A8 /* PixelFiring.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F03CB062C32F173004179A8 /* PixelFiring.swift */; };
6F03CB092C32F331004179A8 /* PixelFiringAsync.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F03CB082C32F331004179A8 /* PixelFiringAsync.swift */; };
6F0FEF6B2C516D540090CDE4 /* NewTabPageSettingsStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F0FEF6A2C516D540090CDE4 /* NewTabPageSettingsStorage.swift */; };
6F3537A22C4AB97A009F8717 /* NewTabPagePreferencesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F3537A12C4AB97A009F8717 /* NewTabPagePreferencesModel.swift */; };
6F40D15B2C34423800BF22F0 /* HomePageDisplayDailyPixelBucket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F40D15A2C34423800BF22F0 /* HomePageDisplayDailyPixelBucket.swift */; };
6F40D15E2C34436500BF22F0 /* HomePageDisplayDailyPixelBucketTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F40D15C2C34436200BF22F0 /* HomePageDisplayDailyPixelBucketTests.swift */; };
6F5345AF2C53F2DE00424A43 /* NewTabPageSettingsPersistentStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F5345AE2C53F2DE00424A43 /* NewTabPageSettingsPersistentStorage.swift */; };
6F5CC0812C2AFFE400AFC840 /* ToggleExpandButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F5CC0802C2AFFE400AFC840 /* ToggleExpandButtonView.swift */; };
6F64AA532C47E92600CF4489 /* FavoritesFaviconLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F64AA522C47E92600CF4489 /* FavoritesFaviconLoader.swift */; };
6F64AA592C4818D700CF4489 /* NewTabPageShortcut.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F64AA582C4818D700CF4489 /* NewTabPageShortcut.swift */; };
Expand All @@ -269,7 +272,12 @@
6F655BE22BAB289E00AC3597 /* DefaultTheme.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F655BE12BAB289E00AC3597 /* DefaultTheme.swift */; };
6F691CCA2C4979EC002E9553 /* FavoritesTooltip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F691CC92C4979EC002E9553 /* FavoritesTooltip.swift */; };
6F8496412BC3D8EE00ADA54E /* OnboardingButtonsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F8496402BC3D8EE00ADA54E /* OnboardingButtonsView.swift */; };
6F934F862C58DB00008364E4 /* NewTabPageSettingsPersistentStorageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F934F852C58DB00008364E4 /* NewTabPageSettingsPersistentStorageTests.swift */; };
6F96FF102C2B128500162692 /* NewTabPageCustomizeButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F96FF0F2C2B128500162692 /* NewTabPageCustomizeButtonView.swift */; };
6F9FFE262C579BCD00A238BE /* NewTabPageShortcutsSettingsStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F9FFE252C579BCD00A238BE /* NewTabPageShortcutsSettingsStorage.swift */; };
6F9FFE282C579DEA00A238BE /* NewTabPageSectionsSettingsStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F9FFE272C579DEA00A238BE /* NewTabPageSectionsSettingsStorage.swift */; };
6F9FFE2D2C57AE8F00A238BE /* NewTabPageShortcutsSettingsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F9FFE2C2C57AE8F00A238BE /* NewTabPageShortcutsSettingsModel.swift */; };
6F9FFE302C57B34800A238BE /* NewTabPageSectionsSettingsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F9FFE2F2C57B34800A238BE /* NewTabPageSectionsSettingsModel.swift */; };
6FA3438F2C3D3BC300470677 /* Favorite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FA3438E2C3D3BC300470677 /* Favorite.swift */; };
6FA343922C3D3C3B00470677 /* FavoriteIconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FA343912C3D3C3B00470677 /* FavoriteIconView.swift */; };
6FB1FE9E2C24D41D0075B68B /* NewTabPageSectionsDebugView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FB1FE9D2C24D41D0075B68B /* NewTabPageSectionsDebugView.swift */; };
Expand Down Expand Up @@ -1412,8 +1420,11 @@
6F03CB032C32EFA8004179A8 /* MockPixelFiring.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockPixelFiring.swift; sourceTree = "<group>"; };
6F03CB062C32F173004179A8 /* PixelFiring.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PixelFiring.swift; sourceTree = "<group>"; };
6F03CB082C32F331004179A8 /* PixelFiringAsync.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PixelFiringAsync.swift; sourceTree = "<group>"; };
6F0FEF6A2C516D540090CDE4 /* NewTabPageSettingsStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewTabPageSettingsStorage.swift; sourceTree = "<group>"; };
6F3537A12C4AB97A009F8717 /* NewTabPagePreferencesModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewTabPagePreferencesModel.swift; sourceTree = "<group>"; };
6F40D15A2C34423800BF22F0 /* HomePageDisplayDailyPixelBucket.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageDisplayDailyPixelBucket.swift; sourceTree = "<group>"; };
6F40D15C2C34436200BF22F0 /* HomePageDisplayDailyPixelBucketTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomePageDisplayDailyPixelBucketTests.swift; sourceTree = "<group>"; };
6F5345AE2C53F2DE00424A43 /* NewTabPageSettingsPersistentStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewTabPageSettingsPersistentStorage.swift; sourceTree = "<group>"; };
6F5CC0802C2AFFE400AFC840 /* ToggleExpandButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToggleExpandButtonView.swift; sourceTree = "<group>"; };
6F64AA522C47E92600CF4489 /* FavoritesFaviconLoader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavoritesFaviconLoader.swift; sourceTree = "<group>"; };
6F64AA582C4818D700CF4489 /* NewTabPageShortcut.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewTabPageShortcut.swift; sourceTree = "<group>"; };
Expand All @@ -1423,7 +1434,12 @@
6F655BE12BAB289E00AC3597 /* DefaultTheme.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultTheme.swift; sourceTree = "<group>"; };
6F691CC92C4979EC002E9553 /* FavoritesTooltip.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavoritesTooltip.swift; sourceTree = "<group>"; };
6F8496402BC3D8EE00ADA54E /* OnboardingButtonsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingButtonsView.swift; sourceTree = "<group>"; };
6F934F852C58DB00008364E4 /* NewTabPageSettingsPersistentStorageTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewTabPageSettingsPersistentStorageTests.swift; sourceTree = "<group>"; };
6F96FF0F2C2B128500162692 /* NewTabPageCustomizeButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewTabPageCustomizeButtonView.swift; sourceTree = "<group>"; };
6F9FFE252C579BCD00A238BE /* NewTabPageShortcutsSettingsStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewTabPageShortcutsSettingsStorage.swift; sourceTree = "<group>"; };
6F9FFE272C579DEA00A238BE /* NewTabPageSectionsSettingsStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewTabPageSectionsSettingsStorage.swift; sourceTree = "<group>"; };
6F9FFE2C2C57AE8F00A238BE /* NewTabPageShortcutsSettingsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewTabPageShortcutsSettingsModel.swift; sourceTree = "<group>"; };
6F9FFE2F2C57B34800A238BE /* NewTabPageSectionsSettingsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewTabPageSectionsSettingsModel.swift; sourceTree = "<group>"; };
6FA3438E2C3D3BC300470677 /* Favorite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Favorite.swift; sourceTree = "<group>"; };
6FA343912C3D3C3B00470677 /* FavoriteIconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FavoriteIconView.swift; sourceTree = "<group>"; };
6FB030C7234331B400A10DB9 /* Configuration.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Configuration.xcconfig; path = Configuration/Configuration.xcconfig; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3494,10 +3510,20 @@
children = (
6F03CB002C32ED42004179A8 /* NewTabPageMessagesModelTests.swift */,
6F40D15C2C34436200BF22F0 /* HomePageDisplayDailyPixelBucketTests.swift */,
6F934F852C58DB00008364E4 /* NewTabPageSettingsPersistentStorageTests.swift */,
);
name = NewTabPage;
sourceTree = "<group>";
};
6F35379C2C4AAF1C009F8717 /* Preferences */ = {
isa = PBXGroup;
children = (
6F9FFE2E2C57B14100A238BE /* Model */,
6F9FFE2B2C57AE4200A238BE /* Storage */,
);
name = Preferences;
sourceTree = "<group>";
};
6F691CC82C4979DD002E9553 /* Tooltip */ = {
isa = PBXGroup;
children = (
Expand All @@ -3506,6 +3532,27 @@
name = Tooltip;
sourceTree = "<group>";
};
6F9FFE2B2C57AE4200A238BE /* Storage */ = {
isa = PBXGroup;
children = (
6F0FEF6A2C516D540090CDE4 /* NewTabPageSettingsStorage.swift */,
6F5345AE2C53F2DE00424A43 /* NewTabPageSettingsPersistentStorage.swift */,
6F9FFE252C579BCD00A238BE /* NewTabPageShortcutsSettingsStorage.swift */,
6F9FFE272C579DEA00A238BE /* NewTabPageSectionsSettingsStorage.swift */,
);
name = Storage;
sourceTree = "<group>";
};
6F9FFE2E2C57B14100A238BE /* Model */ = {
isa = PBXGroup;
children = (
6F9FFE2C2C57AE8F00A238BE /* NewTabPageShortcutsSettingsModel.swift */,
6F9FFE2F2C57B34800A238BE /* NewTabPageSectionsSettingsModel.swift */,
6F3537A12C4AB97A009F8717 /* NewTabPagePreferencesModel.swift */,
);
name = Model;
sourceTree = "<group>";
};
6FA3438D2C3D3BB800470677 /* Model */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -3572,6 +3619,7 @@
6FE1273B2C204C0D00EB5724 /* Subviews */ = {
isa = PBXGroup;
children = (
6F35379C2C4AAF1C009F8717 /* Preferences */,
6FE127472C20941A00EB5724 /* Shortcuts */,
6FE127412C204DE900EB5724 /* Favorites */,
6F5CC0802C2AFFE400AFC840 /* ToggleExpandButtonView.swift */,
Expand Down Expand Up @@ -6788,6 +6836,7 @@
853C5F6121C277C7001F7A05 /* global.swift in Sources */,
EE9D68D82AE15AD600B55EF4 /* UIApplicationExtension.swift in Sources */,
566B73702BECD46800FF1959 /* MainViewController+SyncAlerts.swift in Sources */,
6F0FEF6B2C516D540090CDE4 /* NewTabPageSettingsStorage.swift in Sources */,
F13B4BD31F1822C700814661 /* Tab.swift in Sources */,
BDFF031D2BA3D2BD00F324C9 /* DefaultNetworkProtectionVisibility.swift in Sources */,
F1BE54581E69DE1000FCF649 /* TutorialSettings.swift in Sources */,
Expand All @@ -6804,11 +6853,13 @@
C1B924B72ACD6E6800EE7B06 /* AutofillNeverSavedTableViewCell.swift in Sources */,
3132FA2A27A0788F00DD7A12 /* QuickLookPreviewHelper.swift in Sources */,
D670E5BB2BB6A75300941A42 /* SubscriptionNavigationCoordinator.swift in Sources */,
6F9FFE262C579BCD00A238BE /* NewTabPageShortcutsSettingsStorage.swift in Sources */,
C1D21E2D293A5965006E5A05 /* AutofillLoginSession.swift in Sources */,
4B53648A26718D0E001AA041 /* EmailWaitlist.swift in Sources */,
D63677F52BBDB1C300605BA5 /* DaxLogoNavbarTitle.swift in Sources */,
8524CC98246D66E100E59D45 /* String+Markdown.swift in Sources */,
CBEFB9142AE0844700DEDE7B /* CriticalAlerts.swift in Sources */,
6F9FFE302C57B34800A238BE /* NewTabPageSectionsSettingsModel.swift in Sources */,
986B16C425E92DF0007D23E8 /* BrowsingMenuViewController.swift in Sources */,
988AC355257E47C100793C64 /* RequeryLogic.swift in Sources */,
6FB2A67A2C2C5BAE004D20C8 /* FavoriteEmptyStateItem.swift in Sources */,
Expand Down Expand Up @@ -6892,6 +6943,7 @@
83BE9BC3215D69C1009844D9 /* AppConfigurationFetch.swift in Sources */,
37CF91622BB474AA00BADCAE /* CrashCollectionOnboardingView.swift in Sources */,
1EEC460627A9499600E75FCB /* DownloadsList.swift in Sources */,
6F3537A22C4AB97A009F8717 /* NewTabPagePreferencesModel.swift in Sources */,
9F23B8032C2BCD0000950875 /* DaxDialogStyles.swift in Sources */,
C1641EAF2BC2F5140012607A /* ImportPasswordsViewController.swift in Sources */,
D63FF8982C1B6A45006DE24D /* DuckPlayer.swift in Sources */,
Expand Down Expand Up @@ -6948,12 +7000,14 @@
85C11E4C2090888C00BFFEB4 /* HomeRowReminder.swift in Sources */,
31B2F11F287846320040427A /* NoMicPermissionAlert.swift in Sources */,
310C4B45281B5A9A00BA79A9 /* AutofillLoginDetailsView.swift in Sources */,
6F9FFE2D2C57AE8F00A238BE /* NewTabPageShortcutsSettingsModel.swift in Sources */,
6FD3F8112C3EFCDB00DA5797 /* FavoritesModel.swift in Sources */,
D62EC3C22C248AF800FC9D04 /* DuckNavigationHandling.swift in Sources */,
9FB027142C252E0C009EA190 /* OnboardingView+BrowsersComparisonContent.swift in Sources */,
D664C7B62B289AA200CBFA76 /* SubscriptionFlowViewModel.swift in Sources */,
1EFDCBC127D2393C00916BC5 /* DownloadsDeleteHelper.swift in Sources */,
C1836CE12C359EC90016D057 /* AutofillBreakageReportCellContentView.swift in Sources */,
6F9FFE282C579DEA00A238BE /* NewTabPageSectionsSettingsStorage.swift in Sources */,
85374D3C21AC41E700FF5A1E /* FavoritesHomeViewSectionRenderer.swift in Sources */,
85DFEDF124C7EEA400973FE7 /* LargeOmniBarState.swift in Sources */,
9880722A25FA497B0039EF4B /* MenuButton.swift in Sources */,
Expand Down Expand Up @@ -7142,6 +7196,7 @@
C12726F22A5FF8CB00215B02 /* EmailSignupPromptViewController.swift in Sources */,
983EABB8236198F6003948D1 /* DatabaseMigration.swift in Sources */,
314C92B827C3DD660042EC96 /* QuickLookPreviewView.swift in Sources */,
6F5345AF2C53F2DE00424A43 /* NewTabPageSettingsPersistentStorage.swift in Sources */,
F1AE54E81F0425FC00D9A700 /* AuthenticationViewController.swift in Sources */,
560E990F2BEE2CB800507CE0 /* SyncErrorMessage.swift in Sources */,
983D71B12A286E810072E26D /* SyncDebugViewController.swift in Sources */,
Expand Down Expand Up @@ -7293,6 +7348,7 @@
569437362BE5160600C0881B /* SyncSettingsViewControllerErrorTests.swift in Sources */,
850559D223CF710C0055C0D5 /* WebCacheManagerTests.swift in Sources */,
EEC02C162B065BE00045CE11 /* NetworkProtectionVPNLocationViewModelTests.swift in Sources */,
6F934F862C58DB00008364E4 /* NewTabPageSettingsPersistentStorageTests.swift in Sources */,
987130C5294AAB9F00AB05E0 /* BookmarkEditorViewModelTests.swift in Sources */,
BDFF03262BA3DA4900F324C9 /* NetworkProtectionFeatureVisibilityTests.swift in Sources */,
D62EC3BA2C246A7000FC9D04 /* YoutublePlayerNavigationHandlerTests.swift in Sources */,
Expand Down
3 changes: 3 additions & 0 deletions DuckDuckGo/AppSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ protocol AppSettings: AnyObject, AppDebugSettings {

var duckPlayerMode: DuckPlayerMode { get set }
var duckPlayerAskModeOverlayHidden: Bool { get set }

var newTabPageShortcutsSettings: Data? { get set }
var newTabPageSectionsSettings: Data? { get set }
}

protocol AppDebugSettings {
Expand Down
6 changes: 6 additions & 0 deletions DuckDuckGo/AppUserDefaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,12 @@ public class AppUserDefaults: AppSettings {
object: duckPlayerMode)
}
}

@UserDefaultsWrapper(key: .newTabPageShortcutsSettings, defaultValue: nil)
var newTabPageShortcutsSettings: Data?

@UserDefaultsWrapper(key: .newTabPageSectionsSettings, defaultValue: nil)
var newTabPageSectionsSettings: Data?
}

extension AppUserDefaults: AppConfigurationFetchStatistics {
Expand Down
74 changes: 74 additions & 0 deletions DuckDuckGo/NewTabPagePreferencesModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
//
// NewTabPagePreferencesModel.swift
// DuckDuckGo
//
// Copyright © 2024 DuckDuckGo. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

import Foundation
import SwiftUI

final class NewTabPagePreferencesModel<SettingItem: NewTabPageSettingsStorageItem, Storage: NewTabPageSettingsStorage>: ObservableObject where Storage.SettingItem == SettingItem {

/// Preferences page settings collection with bindings
@Published private(set) var itemsSettings: [NTPSetting<SettingItem>] = []

/// Enabled items, ordered.
@Published private(set) var enabledItems: [SettingItem] = []

private let preferencesStorage: Storage

init(preferencesStorage: Storage) {
self.preferencesStorage = preferencesStorage

updatePublishedValues()
}

func moveItems(from: IndexSet, to: Int) {
preferencesStorage.moveItems(from, toOffset: to)
updatePublishedValues()
}

func save() {
preferencesStorage.save()
}

private func updatePublishedValues() {
populateSettings()
populateEnabledItems()
}

private func populateEnabledItems() {
enabledItems = preferencesStorage.enabledItems
}

private func populateSettings() {
itemsSettings = preferencesStorage.itemsOrder.map { item in
NTPSetting(item: item, isEnabled: Binding(get: {
self.preferencesStorage.isEnabled(item)
}, set: { newValue in
self.preferencesStorage.setItem(item, enabled: newValue)
self.updatePublishedValues()
}))
}
}
}

extension NewTabPagePreferencesModel {
struct NTPSetting<Item> {
let item: Item
let isEnabled: Binding<Bool>
}
}
28 changes: 28 additions & 0 deletions DuckDuckGo/NewTabPageSectionsSettingsModel.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// NewTabPageSectionsSettingsModel.swift
// DuckDuckGo
//
// Copyright © 2024 DuckDuckGo. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

import Foundation

typealias NewTabPageSectionsSettingsModel = NewTabPagePreferencesModel<NewTabPageSection, NewTabPageSectionsSettingsStorage>

extension NewTabPageSectionsSettingsModel {
convenience init(storage: NewTabPageSectionsSettingsStorage = NewTabPageSectionsSettingsStorage()) {
self.init(preferencesStorage: storage)
}
}
Loading

0 comments on commit a49505e

Please sign in to comment.