Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Added recents for 4anime & changed Preferences > Settings (#174)
Browse files Browse the repository at this point in the history
* Add recents anime for 4anime
* Change Preferences to Settings
* Update preferences -> settings
  • Loading branch information
ISnackable authored Sep 10, 2020
1 parent b21f28a commit d3aad23
Show file tree
Hide file tree
Showing 15 changed files with 131 additions and 93 deletions.
2 changes: 1 addition & 1 deletion NineAnimator/AppDelegate+Environment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ extension AppDelegate {
// NINEANIMATOR_APPEARANCE_OVERRIDE: Theme Override
if let overridingTheme = NineAnimator.runtime.overridingAppearanceName {
if let theme = Theme.availableThemes[overridingTheme] {
Log.info("[AppDelegate.Environment] Updating appearance to '%@' (note this will not change the preferences in the user settings)...", overridingTheme)
Log.info("[AppDelegate.Environment] Updating appearance to '%@' (note this will not change the setting in the user settings)...", overridingTheme)
Theme.setTheme(theme)
} else {
Log.error("[AppDelegate.Environment] Appearance '%@' is undefined.", overridingTheme)
Expand Down
20 changes: 10 additions & 10 deletions NineAnimator/Base.lproj/Settings.storyboard
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="1QF-QW-wC1">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="1QF-QW-wC1">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Preferences-->
<!--Settings-->
<scene sceneID="Vvw-7M-2Be">
<objects>
<tableViewController id="avc-gc-Mj2" customClass="SettingsSceneController" customModule="NineAnimator" customModuleProvider="target" sceneMemberID="viewController">
Expand Down Expand Up @@ -504,11 +504,11 @@ Fallback to Browser directs the app to open the playback page in Safari when fai
<rect key="frame" x="16" y="1004.5" width="343" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="30T-PY-VFY" id="eTQ-k1-6uJ">
<rect key="frame" x="0.0" y="0.0" width="317" height="44"/>
<rect key="frame" x="0.0" y="0.0" width="324" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Home" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="0eR-hu-Qxf">
<rect key="frame" x="15" y="0.0" width="294" height="44"/>
<rect key="frame" x="15" y="0.0" width="301" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
Expand All @@ -528,7 +528,7 @@ Fallback to Browser directs the app to open the playback page in Safari when fai
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Open Cast Controller" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="7gK-el-Ee1">
<rect key="frame" x="15" y="0.0" width="313" height="44"/>
<rect key="frame" x="15" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" name="controlAccentColor" catalog="System" colorSpace="catalog"/>
Expand Down Expand Up @@ -596,7 +596,7 @@ NineAnimator uses Background App Refresh to determine if a new episode of a subs
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="0 Items" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="7Ky-4E-HeC">
<rect key="frame" x="271" y="12" width="57" height="20.5"/>
<rect key="frame" x="278" y="12" width="57" height="20.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" name="systemGrayColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -620,7 +620,7 @@ NineAnimator uses Background App Refresh to determine if a new episode of a subs
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Checking..." textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="1D4-d4-eg5">
<rect key="frame" x="241.5" y="12" width="86.5" height="20.5"/>
<rect key="frame" x="248.5" y="12" width="86.5" height="20.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" name="systemGrayColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -637,7 +637,7 @@ NineAnimator uses Background App Refresh to determine if a new episode of a subs
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Unsubscribe All" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="hGc-BW-frZ">
<rect key="frame" x="15" y="0.0" width="313" height="44"/>
<rect key="frame" x="15" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" name="controlAccentColor" catalog="System" colorSpace="catalog"/>
Expand Down Expand Up @@ -820,7 +820,7 @@ Clear Shortcuts and Spotlight Items will delete all NineAnimator shortcuts and S
<outlet property="delegate" destination="avc-gc-Mj2" id="w3F-YX-9Kd"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Preferences" id="SsL-fL-doX">
<navigationItem key="navigationItem" title="Settings" id="SsL-fL-doX">
<barButtonItem key="rightBarButtonItem" systemItem="done" id="XHY-Ma-Rtv">
<connections>
<action selector="onDoneButtonClicked:" destination="avc-gc-Mj2" id="U44-8U-CwK"/>
Expand Down Expand Up @@ -2201,7 +2201,7 @@ Remaining storage capacity displayed in this screen may be different from the Se
</cells>
</tableViewSection>
<tableViewSection headerTitle="Privacy" id="Ips-J8-mzS">
<mutableString key="footerTitle">You may clear your playback history and reset your personal preferences in the Preferences menu.

By switching on Opt-out Analytics, the app will no longer automatically collect analytical data. We use analytical data to get insights on how people use our Services so that we can make our Services better. See our Privacy Policy for what data we collect and how we use it.
<mutableString key="footerTitle">You may clear your playback history and reset your personal preferences in the Settings menu.

By switching on Opt-out Analytics, the app will no longer automatically collect analytical data. We use analytical data to get insights on how people use our Services so that we can make our Services better. See our Privacy Policy for what data we collect and how we use it.

NineAnimator will never uploads your personal information or playback history to any third party services or websites without your consent. However, NineAnimator is not designed to prevent services (e.g. 9anime, MyCloud, MyAnimeList) or your Internet Service Provider from tracking you.

Expand Down
6 changes: 3 additions & 3 deletions NineAnimator/Base.lproj/Setup.storyboard
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="jMC-Us-Crt">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="jMC-Us-Crt">
<device id="retina5_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
Expand Down Expand Up @@ -555,7 +555,7 @@
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="5" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ok1-aG-zqs">
<rect key="frame" x="32" y="614.33333333333337" width="311" height="65.666666666666629"/>
<string key="text">Setting the appearance to Dynamic allows NineAnimator to change the theme according to the brightness of the screen.
After setup, you can change the theme settings in the Preferences menu.</string>
After setup, you can change the theme settings in the Settings menu.</string>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
Expand Down Expand Up @@ -789,7 +789,7 @@ After setup, you can change the theme settings in the Preferences menu.</string>
<action selector="onFinishButtonTapped:" destination="Rpq-aZ-KUE" eventType="touchUpInside" id="VAQ-uu-uyT"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Login to your Anilist, Kitsu, or MyAnimeList accounts in the Preferences menu. Join our Discord community to receive updates." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="8" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MDo-yQ-irq">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Login to your Anilist, Kitsu, or MyAnimeList accounts in the Settings menu. Join our Discord community to receive updates." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="8" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MDo-yQ-irq">
<rect key="frame" x="32" y="450" width="311" height="50.333333333333314"/>
<fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="14"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ extension DiscoverySceneViewController {
listOfActions.append(
.init(
icon: UIImage(named: "Cog Icon QuickAction")!,
title: "Preferences"
title: "Settings"
) {
[weak self] completion in
guard let self = self else { return }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ extension NativePlayerController {
}
}

// MARK: - Update preferences
// MARK: - Update settings
extension NativePlayerController {
@objc func onUserPreferenceDidChange(notification _: Notification) {
playerViewController.allowsPictureInPicturePlayback = shouldUsePictureInPicture
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class SettingsDownloadsController: UITableViewController {
}
}

// Update preferences states
// Update settings states
autoRetrySwitch.setOn(
NineAnimator.default.user.autoRestartInterruptedDownloads,
animated: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class SetupThemeViewController: UIViewController, Themable {
if #available(iOS 13.0, *) {
themeDescriptionLabel.text = """
Select Light or Dark to use an appearance independent from the system.
After setup, you can change the theme settings in the Preferences menu.
After setup, you can change the theme settings in the Settings menu.
"""
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ extension UserNotificationManager {
notificationCenter.requestAuthorization(options: [.badge]) {
success, _ in DispatchQueue.main.async {
if shouldPresetError && !success {
let alertController = UIAlertController(title: "Updates Unavailable", message: "NineAnimator doesn't have persmission to send notifications. You won't receive any updates for this anime until you allow notifications from NineAnimator in Settings.", preferredStyle: .alert)
let alertController = UIAlertController(title: "Updates Unavailable", message: "NineAnimator doesn't have persmission to send notifications. You won't receive any updates for this anime until you allow notifications from NineAnimator in system settings app.", preferredStyle: .alert)
alertController.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))
RootViewController.shared?.presentOnTop(alertController, animated: true)
}
Expand Down
Loading

0 comments on commit d3aad23

Please sign in to comment.