Commit a7b75353 authored by Carola Nitz's avatar Carola Nitz

VLCSettingsViewController: Add the About viewcontroller to settings

This moves the AboutViewController from the MoreViewController to the Settings
Also remove the theme setting from the settings app because they only make sense in App
parent e62a7fb3
......@@ -4,6 +4,20 @@
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>SETTINGS_ABOUT_TITLE</string>
</dict>
<dict>
<key>Key</key>
<string>about</string>
<key>Title</key>
<string>ABOUT_APP_IOS</string>
<key>Type</key>
<string>IASKButtonSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
......
......@@ -10,16 +10,6 @@
<key>Title</key>
<string>SETTINGS_GENERIC_TITLE</string>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
<key>Key</key>
<string>SETTINGS_USE_DARKTHEME</string>
<key>Title</key>
<string>SETTINGS_APPTHEME</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
</dict>
<dict>
<key>DefaultValue</key>
<true/>
......
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
......@@ -18,6 +18,7 @@
#define kVLCSettingPasscodeAllowFaceID @"AllowFaceID"
#define kVLCThemeDidChangeNotification @"themeDidChangeNotfication"
#define kVLCSettingAppTheme @"darkMode"
#define kVLCSettingAbout @"about"
#define kVLCAutomaticallyPlayNextItem @"AutomaticallyPlayNextItem"
#define kVLCSettingContinueAudioInBackgroundKey @"BackgroundAudioPlayback"
#define kVLCSettingStretchAudio @"audio-time-stretch"
......
......@@ -19,7 +19,6 @@
#import "VLC_iOS-Swift.h"
@interface VLCSettingsController ()<PAPasscodeViewControllerDelegate>
@end
@implementation VLCSettingsController
......@@ -120,6 +119,11 @@
#pragma mark - IASKSettings delegate
- (void)settingsViewController:(IASKAppSettingsViewController*)sender buttonTappedForSpecifier:(IASKSpecifier*)specifier
{
VLCAboutViewController *aboutVC = [[VLCAboutViewController alloc] init];
[self.navigationController pushViewController:aboutVC animated:YES];
}
#pragma mark - PAPasscode delegate
......
......@@ -123,28 +123,10 @@ class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate, UITabBarC
selectedImage: UIImage(named: "OpenNetStream"))
streamVC.tabBarItem.accessibilityIdentifier = "Stream"
//About
let aboutVC = VLCAboutViewController()
aboutVC.title = NSLocalizedString("ABOUT_APP", comment: "")
aboutVC.tabBarItem = UITabBarItem(
title: NSLocalizedString("ABOUT_APP", comment: ""),
image: coneIcon(),
selectedImage: coneIcon())
aboutVC.tabBarItem.accessibilityIdentifier = "About"
let controllers = [audioVC, serverVC, videoVC, settingsVC, cloudVC, downloadVC, streamVC, aboutVC]
let controllers = [audioVC, serverVC, videoVC, settingsVC, cloudVC, downloadVC, streamVC]
tabBarController.viewControllers = controllers.map { UINavigationController(rootViewController: $0)}
}
func coneIcon() -> UIImage? {
let calendar = NSCalendar(calendarIdentifier: .gregorian)
if let dayOfYear = calendar?.ordinality(of: .day, in: .year, for: Date()) {
return dayOfYear >= 354 ? UIImage(named: "vlc-xmas") : UIImage(named: "menuCone")
}
return nil
}
// MARK: - VLCMediaViewControllerDelegate
func mediaViewControllerDidSelectMediaObject(_ VLCMediaViewController: VLCMediaViewController, mediaObject: NSManagedObject) {
playMedia(media:mediaObject)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment