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 @@ ...@@ -4,6 +4,20 @@
<dict> <dict>
<key>PreferenceSpecifiers</key> <key>PreferenceSpecifiers</key>
<array> <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> <dict>
<key>Type</key> <key>Type</key>
<string>PSGroupSpecifier</string> <string>PSGroupSpecifier</string>
......
...@@ -10,16 +10,6 @@ ...@@ -10,16 +10,6 @@
<key>Title</key> <key>Title</key>
<string>SETTINGS_GENERIC_TITLE</string> <string>SETTINGS_GENERIC_TITLE</string>
</dict> </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> <dict>
<key>DefaultValue</key> <key>DefaultValue</key>
<true/> <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. */ 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 @@ ...@@ -18,6 +18,7 @@
#define kVLCSettingPasscodeAllowFaceID @"AllowFaceID" #define kVLCSettingPasscodeAllowFaceID @"AllowFaceID"
#define kVLCThemeDidChangeNotification @"themeDidChangeNotfication" #define kVLCThemeDidChangeNotification @"themeDidChangeNotfication"
#define kVLCSettingAppTheme @"darkMode" #define kVLCSettingAppTheme @"darkMode"
#define kVLCSettingAbout @"about"
#define kVLCAutomaticallyPlayNextItem @"AutomaticallyPlayNextItem" #define kVLCAutomaticallyPlayNextItem @"AutomaticallyPlayNextItem"
#define kVLCSettingContinueAudioInBackgroundKey @"BackgroundAudioPlayback" #define kVLCSettingContinueAudioInBackgroundKey @"BackgroundAudioPlayback"
#define kVLCSettingStretchAudio @"audio-time-stretch" #define kVLCSettingStretchAudio @"audio-time-stretch"
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#import "VLC_iOS-Swift.h" #import "VLC_iOS-Swift.h"
@interface VLCSettingsController ()<PAPasscodeViewControllerDelegate> @interface VLCSettingsController ()<PAPasscodeViewControllerDelegate>
@end @end
@implementation VLCSettingsController @implementation VLCSettingsController
...@@ -120,6 +119,11 @@ ...@@ -120,6 +119,11 @@
#pragma mark - IASKSettings delegate #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 #pragma mark - PAPasscode delegate
......
...@@ -123,28 +123,10 @@ class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate, UITabBarC ...@@ -123,28 +123,10 @@ class VLCTabbarCooordinator: NSObject, VLCMediaViewControllerDelegate, UITabBarC
selectedImage: UIImage(named: "OpenNetStream")) selectedImage: UIImage(named: "OpenNetStream"))
streamVC.tabBarItem.accessibilityIdentifier = "Stream" streamVC.tabBarItem.accessibilityIdentifier = "Stream"
//About let controllers = [audioVC, serverVC, videoVC, settingsVC, cloudVC, downloadVC, streamVC]
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]
tabBarController.viewControllers = controllers.map { UINavigationController(rootViewController: $0)} 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 // MARK: - VLCMediaViewControllerDelegate
func mediaViewControllerDidSelectMediaObject(_ VLCMediaViewController: VLCMediaViewController, mediaObject: NSManagedObject) { func mediaViewControllerDidSelectMediaObject(_ VLCMediaViewController: VLCMediaViewController, mediaObject: NSManagedObject) {
playMedia(media:mediaObject) 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