Remove Expo + Code Cleanup +. Test Cases Fix (#312)

This commit is contained in:
Ritesh Shukla
2025-05-01 13:52:45 +05:30
committed by GitHub
parent 2e77eda46f
commit 100acd7641
38 changed files with 284 additions and 2525 deletions
+1 -2
View File
@@ -16,12 +16,11 @@ jobs:
- name: 💬 Echo package.json version to Github ENV
run: echo VERSION_NUMBER=$(node -p -e "require('./package.json').version") >> $GITHUB_ENV
- name: 🍎 Run yarn init-ios:new-arch
run: yarn init-ios:new-arch
- name: 🍫 Install CocoaPods
run: yarn pod:install
- name: 🚀 Run fastlane build
run: yarn fastlane:ios:build
+2
View File
@@ -17,6 +17,7 @@ import { NavigationContainer } from '@react-navigation/native'
import { JellifyDarkTheme, JellifyLightTheme } from './src/components/theme'
import { requestStoragePermission } from './src/helpers/permisson-helpers'
import ErrorBoundary from './src/components/ErrorBoundary'
import Toast from 'react-native-toast-message'
export const backgroundRuntime = createWorkletRuntime('background')
@@ -84,6 +85,7 @@ export default function App(): React.JSX.Element {
</TamaguiProvider>
</GestureHandlerRootView>
</PersistQueryClientProvider>
<Toast />
</NavigationContainer>
</ErrorBoundary>
</SafeAreaProvider>
-304
View File
@@ -1,304 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.7)
base64
nkf
rexml
activesupport (7.2.2.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.1044.0)
aws-sdk-core (3.217.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.97.0)
aws-sdk-core (~> 3, >= 3.216.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.179.0)
aws-sdk-core (~> 3, >= 3.216.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.11.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.9)
claide (1.1.0)
cocoapods (1.15.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.15.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.6.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.15.2)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix (~> 4.0)
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.5)
cocoapods-downloader (2.1)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.1)
cocoapods-trunk (1.6.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored (1.2)
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
concurrent-ruby (1.3.3)
connection_pool (2.5.0)
declarative (0.0.20)
digest-crc (0.7.0)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.6.20240107)
dotenv (2.8.1)
drb (2.2.1)
emoji_regex (3.2.3)
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
excon (0.112.0)
faraday (1.10.4)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
ruby2_keywords (>= 0.0.4)
faraday-cookie_jar (0.0.7)
faraday (>= 0.8.0)
http-cookie (~> 1.0.0)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.1.0)
multipart-post (~> 2.0)
faraday-net_http (1.0.2)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.4.0)
fastlane (2.226.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored (~> 1.2)
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
excon (>= 0.71.0, < 1.0.0)
faraday (~> 1.0)
faraday-cookie_jar (~> 0.0.6)
faraday_middleware (~> 1.0)
fastimage (>= 2.1.0, < 3.0.0)
fastlane-sirp (>= 1.0.0)
gh_inspector (>= 1.1.2, < 2.0.0)
google-apis-androidpublisher_v3 (~> 0.3)
google-apis-playcustomapp_v1 (~> 0.1)
google-cloud-env (>= 1.6.0, < 2.0.0)
google-cloud-storage (~> 1.31)
highline (~> 2.0)
http-cookie (~> 1.0.5)
json (< 3.0.0)
jwt (>= 2.1.0, < 3)
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2)
optparse (>= 0.1.1, < 1.0.0)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.5)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (~> 3)
tty-screen (>= 0.6.3, < 1.0.0)
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.4.0)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-sirp (1.0.0)
sysrandom (~> 1.0)
ffi (1.17.1)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
google-apis-androidpublisher_v3 (0.54.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-core (0.11.3)
addressable (~> 2.5, >= 2.5.1)
googleauth (>= 0.16.2, < 2.a)
httpclient (>= 2.8.1, < 3.a)
mini_mime (~> 1.0)
representable (~> 3.0)
retriable (>= 2.0, < 4.a)
rexml
google-apis-iamcredentials_v1 (0.17.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-playcustomapp_v1 (0.13.0)
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.7.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.4.0)
google-cloud-storage (1.47.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
google-apis-iamcredentials_v1 (~> 0.1)
google-apis-storage_v1 (~> 0.31.0)
google-cloud-core (~> 1.6)
googleauth (>= 0.16.2, < 2.a)
mini_mime (~> 1.0)
googleauth (1.8.1)
faraday (>= 0.17.3, < 3.a)
jwt (>= 1.4, < 3.0)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.8)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
jmespath (1.6.2)
json (2.9.1)
jwt (2.10.1)
base64
logger (1.6.5)
mini_magick (4.13.2)
mini_mime (1.1.5)
minitest (5.25.4)
molinillo (0.8.0)
multi_json (1.15.0)
multipart-post (2.4.1)
nanaimo (0.3.0)
nap (1.1.0)
naturally (2.2.1)
netrc (0.11.0)
nkf (0.2.0)
optparse (0.6.0)
os (1.1.4)
plist (3.7.2)
public_suffix (4.0.7)
rake (13.2.1)
representable (3.2.0)
declarative (< 0.1.0)
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.4.0)
rouge (3.28.0)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
rubyzip (2.4.1)
securerandom (0.4.1)
security (0.1.5)
signet (0.19.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
multi_json (~> 1.10)
simctl (1.6.10)
CFPropertyList
naturally
sysrandom (1.0.5)
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
trailblazer-option (0.1.2)
tty-cursor (0.7.1)
tty-screen (0.8.2)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uber (0.1.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcodeproj (1.25.1)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.4.0)
rouge (~> 3.28.0)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
PLATFORMS
ruby
DEPENDENCIES
activesupport (>= 6.1.7.5, != 7.1.0)
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
concurrent-ruby (< 1.3.4)
fastlane
xcodeproj (< 1.26.0)
RUBY VERSION
ruby 3.1.4p223
BUNDLED WITH
2.3.26
@@ -1,5 +1,5 @@
package com.jellify
import expo.modules.ReactActivityDelegateWrapper
import com.facebook.react.ReactActivity
import com.facebook.react.ReactActivityDelegate
@@ -19,5 +19,6 @@ class MainActivity : ReactActivity() {
* which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
*/
override fun createReactActivityDelegate(): ReactActivityDelegate =
ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled))
DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)
}
@@ -1,7 +1,4 @@
package com.jellify
import android.content.res.Configuration
import expo.modules.ApplicationLifecycleDispatcher
import expo.modules.ReactNativeHostWrapper
import android.app.Application
import com.facebook.react.PackageList
@@ -18,7 +15,7 @@ import com.facebook.soloader.SoLoader
class MainApplication : Application(), ReactApplication {
override val reactNativeHost: ReactNativeHost =
ReactNativeHostWrapper(this, object : DefaultReactNativeHost(this) {
object : DefaultReactNativeHost(this) {
override fun getPackages(): List<ReactPackage> =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:
@@ -31,10 +28,10 @@ class MainApplication : Application(), ReactApplication {
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
})
}
override val reactHost: ReactHost
get() = ReactNativeHostWrapper.createReactHost(applicationContext, reactNativeHost)
get() = getDefaultReactHost(applicationContext, reactNativeHost)
override fun onCreate() {
super.onCreate()
@@ -43,11 +40,5 @@ class MainApplication : Application(), ReactApplication {
// If you opted-in for the New Architecture, we load the native entry point for this app.
load()
}
ApplicationLifecycleDispatcher.onApplicationCreate(this)
}
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
ApplicationLifecycleDispatcher.onConfigurationChanged(this, newConfig)
}
}
}
+2 -17
View File
@@ -1,21 +1,6 @@
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex ->
def command = [
'node',
'--no-warnings',
'--eval',
'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))',
'react-native-config',
'--json',
'--platform',
'android'
].toList()
ex.autolinkLibrariesFromCommand(command)
}
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'Jellify'
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')
apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
useExpoModules()
includeBuild('../node_modules/@react-native/gradle-plugin')
+1 -1
View File
@@ -344,4 +344,4 @@ RUBY VERSION
ruby 3.1.4p223
BUNDLED WITH
2.6.2
2.6.2
+1 -2
View File
@@ -1,3 +1,2 @@
#import "RNCarPlay.h"
#import <Expo/Expo.h>
#import <RCTAppDelegate.h>
#import <RCTAppDelegate.h>
-40
View File
@@ -10,7 +10,6 @@
00E356F31AD99517003FC87E /* JellifyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* JellifyTests.m */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
217EBE16A3E8C5FBF476C905 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = F757EB73303E0AC21EF34F64 /* PrivacyInfo.xcprivacy */; };
66BC9C5D1B536CD0799EEC89 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82DE980BB8253E3C5F2207CE /* ExpoModulesProvider.swift */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
92C580068317633958E4B0F9 /* libPods-Jellify.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4912CEDF8E675A9B3515C88E /* libPods-Jellify.a */; };
CF620D0C2CF2BB210045E433 /* Aileron-Italic.otf in Resources */ = {isa = PBXBuildFile; fileRef = CF620CFC2CF2BB1F0045E433 /* Aileron-Italic.otf */; };
@@ -82,7 +81,6 @@
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = Jellify/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
4912CEDF8E675A9B3515C88E /* libPods-Jellify.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Jellify.a"; sourceTree = BUILT_PRODUCTS_DIR; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = Jellify/LaunchScreen.storyboard; sourceTree = "<group>"; };
82DE980BB8253E3C5F2207CE /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-Jellify/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
A4403789D3D6FBE6706E62B4 /* Pods-Jellify.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Jellify.release.xcconfig"; path = "Target Support Files/Pods-Jellify/Pods-Jellify.release.xcconfig"; sourceTree = "<group>"; };
ACD0D4797EFB0AA1C5B6FC7D /* Pods-Jellify.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Jellify.debug.xcconfig"; path = "Target Support Files/Pods-Jellify/Pods-Jellify.debug.xcconfig"; sourceTree = "<group>"; };
CF620CFC2CF2BB1F0045E433 /* Aileron-Italic.otf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "Aileron-Italic.otf"; path = "../assets/fonts/Aileron-Italic.otf"; sourceTree = "<group>"; };
@@ -216,22 +214,6 @@
name = Frameworks;
sourceTree = "<group>";
};
56E1F4734630BBAE3738C238 /* ExpoModulesProviders */ = {
isa = PBXGroup;
children = (
7466A2DFBB2DB18C07F6CEC6 /* Jellify */,
);
name = ExpoModulesProviders;
sourceTree = "<group>";
};
7466A2DFBB2DB18C07F6CEC6 /* Jellify */ = {
isa = PBXGroup;
children = (
82DE980BB8253E3C5F2207CE /* ExpoModulesProvider.swift */,
);
name = Jellify;
sourceTree = "<group>";
};
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
isa = PBXGroup;
children = (
@@ -265,7 +247,6 @@
83CBBA001A601CBA00E9B192 /* Products */,
2D16E6871FA4F8E400B85C8A /* Frameworks */,
BBD78D7AC51CEA395F1C20DB /* Pods */,
56E1F4734630BBAE3738C238 /* ExpoModulesProviders */,
);
indentWidth = 2;
sourceTree = "<group>";
@@ -376,7 +357,6 @@
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "Jellify" */;
buildPhases = (
B44EEE05F9243658C0ACC188 /* [CP] Check Pods Manifest.lock */,
41245AA25E9CF87045F16E79 /* [Expo] Configure project */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
@@ -545,25 +525,6 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Jellify/Pods-Jellify-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
41245AA25E9CF87045F16E79 /* [Expo] Configure project */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "[Expo] Configure project";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-Jellify/expo-configure-project.sh\"\n";
};
B44EEE05F9243658C0ACC188 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -604,7 +565,6 @@
CF98CA472D3E99E0003D88B7 /* CarScene.swift in Sources */,
CF98CA482D3E99E0003D88B7 /* PhoneScene.swift in Sources */,
CF98CA492D3E99E0003D88B7 /* AppDelegate.swift in Sources */,
66BC9C5D1B536CD0799EEC89 /* ExpoModulesProvider.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
-68
View File
@@ -1,68 +0,0 @@
// ios/AppDelegate.swift
import UIKit
import CarPlay
import React
#if DEBUG
#if FB_SONARKIT_ENABLED
import FlipperKit
#endif
#endif
@main
class AppDelegate: UIResponder, UIApplicationDelegate, RCTBridgeDelegate {
var window: UIWindow?
var bridge: RCTBridge?;
var rootView: RCTRootView?;
static var shared: AppDelegate { return UIApplication.shared.delegate as! AppDelegate }
func sourceURL(for bridge: RCTBridge!) -> URL! {
#if DEBUG
return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index");
#else
return Bundle.main.url(forResource:"main", withExtension:"jsbundle")
#endif
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
initializeFlipper(with: application)
self.bridge = RCTBridge.init(delegate: self, launchOptions: launchOptions)
self.rootView = RCTRootView.init(bridge: self.bridge!, moduleName: "Jellify", initialProperties: nil)
super.application(application, didFinishLaunchingWithOptions: launchOptions)
return true
}
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
if (connectingSceneSession.role == UISceneSession.Role.carTemplateApplication) {
let scene = UISceneConfiguration(name: "CarPlay", sessionRole: connectingSceneSession.role)
scene.delegateClass = CarSceneDelegate.self
return scene
} else {
let scene = UISceneConfiguration(name: "Phone", sessionRole: connectingSceneSession.role)
scene.delegateClass = PhoneSceneDelegate.self
return scene
}
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
}
override func bundleURL() -> URL? {
return RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index");
}
private func initializeFlipper(with application: UIApplication) {
#if DEBUG
#if FB_SONARKIT_ENABLED
let client = FlipperClient.shared()
let layoutDescriptorMapper = SKDescriptorMapper(defaults: ())
client?.add(FlipperKitLayoutPlugin(rootNode: application, with: layoutDescriptorMapper!))
client?.add(FKUserDefaultsPlugin(suiteName: nil))
client?.add(FlipperKitReactPlugin())
client?.add(FlipperKitNetworkPlugin(networkAdapter: SKIOSNetworkAdapter()))
client?.start()
#endif
#endif
}
}
-14
View File
@@ -1,14 +0,0 @@
// ios/CarScene.swift
import Foundation
import CarPlay
class CarSceneDelegate: UIResponder, CPTemplateApplicationSceneDelegate {
func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene,
didConnect interfaceController: CPInterfaceController) {
RNCarPlay.connect(with: interfaceController, window: templateApplicationScene.carWindow);
}
func templateApplicationScene(_ templateApplicationScene: CPTemplateApplicationScene, didDisconnectInterfaceController interfaceController: CPInterfaceController) {
RNCarPlay.disconnect()
}
}
+10 -10
View File
@@ -4,6 +4,14 @@
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
@@ -17,9 +25,9 @@
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
<string>0A2A.1</string>
<string>3B52.1</string>
<string>C617.1</string>
</array>
</dict>
<dict>
@@ -27,16 +35,8 @@
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>E174.1</string>
<string>85F4.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
<string>E174.1</string>
</array>
</dict>
</array>
+1 -20
View File
@@ -1,4 +1,3 @@
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
@@ -6,7 +5,6 @@ require Pod::Executable.execute_command('node', ['-p',
{paths: [process.argv[1]]},
)', __dir__]).strip
puts "RCT_NEW_ARCH_ENABLED = " + ENV['RCT_NEW_ARCH_ENABLED'];
platform :ios, min_ios_version_supported
prepare_react_native_project!
@@ -18,24 +16,7 @@ if linkage != nil
end
target 'Jellify' do
use_expo_modules!
if ENV['EXPO_USE_COMMUNITY_AUTOLINKING'] == '1'
config_command = ['node', '-e', "process.argv=['', '', 'config'];require('@react-native-community/cli').run()"];
else
config_command = [
'node',
'--no-warnings',
'--eval',
'require(require.resolve(\'expo-modules-autolinking\', { paths: [require.resolve(\'expo/package.json\')] }))(process.argv.slice(1))',
'react-native-config',
'--json',
'--platform',
'ios'
]
end
config = use_native_modules!(config_command)
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
+33 -138
View File
@@ -1,78 +1,6 @@
PODS:
- boost (1.84.0)
- Burnt (0.13.0):
- ExpoModulesCore
- SPAlert (~> 4.2)
- SPIndicator (~> 1.6)
- DoubleConversion (1.1.6)
- EXConstants (17.1.3):
- ExpoModulesCore
- Expo (53.0.1):
- DoubleConversion
- ExpoModulesCore
- glog
- hermes-engine
- RCT-Folly (= 2024.11.18.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-hermes
- React-ImageManager
- React-jsi
- React-NativeModulesApple
- React-RCTAppDelegate
- React-RCTFabric
- React-renderercss
- React-rendererdebug
- React-utils
- ReactAppDependencyProvider
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- ExpoAsset (11.1.3):
- ExpoModulesCore
- ExpoFileSystem (18.1.7):
- ExpoModulesCore
- ExpoFont (13.2.2):
- ExpoModulesCore
- ExpoImage (2.0.7):
- ExpoModulesCore
- libavif/libdav1d
- SDWebImage (~> 5.19.1)
- SDWebImageAVIFCoder (~> 0.11.0)
- SDWebImageSVGCoder (~> 1.7.0)
- ExpoKeepAwake (14.1.3):
- ExpoModulesCore
- ExpoModulesCore (2.3.11):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.11.18.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-hermes
- React-ImageManager
- React-jsi
- React-jsinspector
- React-NativeModulesApple
- React-RCTFabric
- React-renderercss
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- fast_float (6.1.4)
- FBLazyVector (0.79.1)
- fmt (11.0.2)
@@ -80,11 +8,18 @@ PODS:
- hermes-engine (0.79.1):
- hermes-engine/Pre-built (= 0.79.1)
- hermes-engine/Pre-built (0.79.1)
- libavif/core (0.11.1)
- libavif/libdav1d (0.11.1):
- libavif/core
- libdav1d (>= 0.6.0)
- libdav1d (1.2.0)
- libwebp (1.5.0):
- libwebp/demux (= 1.5.0)
- libwebp/mux (= 1.5.0)
- libwebp/sharpyuv (= 1.5.0)
- libwebp/webp (= 1.5.0)
- libwebp/demux (1.5.0):
- libwebp/webp
- libwebp/mux (1.5.0):
- libwebp/demux
- libwebp/sharpyuv (1.5.0)
- libwebp/webp (1.5.0):
- libwebp/sharpyuv
- RCT-Folly (2024.11.18.00):
- boost
- DoubleConversion
@@ -1937,6 +1872,10 @@ PODS:
- Yoga
- RNDeviceInfo (14.0.4):
- React-Core
- RNFastImage (8.6.3):
- React-Core
- SDWebImage (~> 5.11.1)
- SDWebImageWebPCoder (~> 0.8.4)
- RNFS (2.20.0):
- React-Core
- RNGestureHandler (2.25.0):
@@ -2186,32 +2125,19 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- SDWebImage (5.19.7):
- SDWebImage/Core (= 5.19.7)
- SDWebImage/Core (5.19.7)
- SDWebImageAVIFCoder (0.11.0):
- libavif/core (>= 0.11.0)
- SDWebImage (~> 5.10)
- SDWebImageSVGCoder (1.7.0):
- SDWebImage/Core (~> 5.6)
- SDWebImage (5.11.1):
- SDWebImage/Core (= 5.11.1)
- SDWebImage/Core (5.11.1)
- SDWebImageWebPCoder (0.8.5):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.10)
- SocketRocket (0.7.1)
- SPAlert (4.2.0)
- SPIndicator (1.6.4)
- SwiftAudioEx (1.1.0)
- Yoga (0.0.0)
DEPENDENCIES:
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- Burnt (from `../node_modules/burnt/ios`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- EXConstants (from `../node_modules/expo-constants/ios`)
- Expo (from `../node_modules/expo`)
- ExpoAsset (from `../node_modules/expo-asset/ios`)
- ExpoFileSystem (from `../node_modules/expo-file-system/ios`)
- ExpoFont (from `../node_modules/expo-font/ios`)
- ExpoImage (from `../node_modules/expo-image/ios`)
- ExpoKeepAwake (from `../node_modules/expo-keep-awake/ios`)
- ExpoModulesCore (from `../node_modules/expo-modules-core`)
- fast_float (from `../node_modules/react-native/third-party-podspecs/fast_float.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`)
@@ -2292,6 +2218,7 @@ DEPENDENCIES:
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- "RNCMaskedView (from `../node_modules/@react-native-masked-view/masked-view`)"
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
- RNFastImage (from `../node_modules/react-native-fast-image`)
- RNFS (from `../node_modules/react-native-fs`)
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- RNReactNativeHapticFeedback (from `../node_modules/react-native-haptic-feedback`)
@@ -2302,39 +2229,17 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- libavif
- libdav1d
- libwebp
- SDWebImage
- SDWebImageAVIFCoder
- SDWebImageSVGCoder
- SDWebImageWebPCoder
- SocketRocket
- SPAlert
- SPIndicator
- SwiftAudioEx
EXTERNAL SOURCES:
boost:
:podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec"
Burnt:
:path: "../node_modules/burnt/ios"
DoubleConversion:
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
EXConstants:
:path: "../node_modules/expo-constants/ios"
Expo:
:path: "../node_modules/expo"
ExpoAsset:
:path: "../node_modules/expo-asset/ios"
ExpoFileSystem:
:path: "../node_modules/expo-file-system/ios"
ExpoFont:
:path: "../node_modules/expo-font/ios"
ExpoImage:
:path: "../node_modules/expo-image/ios"
ExpoKeepAwake:
:path: "../node_modules/expo-keep-awake/ios"
ExpoModulesCore:
:path: "../node_modules/expo-modules-core"
fast_float:
:podspec: "../node_modules/react-native/third-party-podspecs/fast_float.podspec"
FBLazyVector:
@@ -2492,6 +2397,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-masked-view/masked-view"
RNDeviceInfo:
:path: "../node_modules/react-native-device-info"
RNFastImage:
:path: "../node_modules/react-native-fast-image"
RNFS:
:path: "../node_modules/react-native-fs"
RNGestureHandler:
@@ -2509,23 +2416,13 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
boost: 7e761d76ca2ce687f7cc98e698152abd03a18f90
Burnt: 0616363a206ed96ba9af3e2eb0e184dc97be1458
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
EXConstants: 01a258d03504c87ef015dfd0fe8d92a7fc1d8345
Expo: 6dd724d3322082adfa13b092b3729709cb590155
ExpoAsset: c97af8e75cd5165aa0c48266eb1bb8d2a57e5caa
ExpoFileSystem: 175267faf2b38511b01ac110243b13754dac57d3
ExpoFont: ab96f88d5e959232152c8dcecafd8ba1235c5763
ExpoImage: d840b256050f4428d2942bc2b6e9251f9e0d7021
ExpoKeepAwake: 213acedecafb6fda8c0ffedad22ee9e2903400c5
ExpoModulesCore: f98b254540e59e7eabc9628ba636789959295ead
fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6
FBLazyVector: abbac80c6f89e71a8c55c7e92ec015c8a9496753
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
hermes-engine: c32f2e405098bc1ebe30630a051ddce6f21d3c2e
libavif: 84bbb62fb232c3018d6f1bab79beea87e35de7b7
libdav1d: 23581a4d8ec811ff171ed5e2e05cd27bad64c39f
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82
RCTDeprecation: 0ada4fb1e5c5637bff940dc40b94e2d3bf96b0ab
RCTRequired: 76ca80ff10acb3834ed0dacba9645645009578a2
@@ -2599,21 +2496,19 @@ SPEC CHECKSUMS:
ReactCommon: aa48e4fddbc6a0afa19dca39a1b6016c150b5db4
RNCMaskedView: ae521efb1c6c2b183ae0f8479487db03c826184c
RNDeviceInfo: d863506092aef7e7af3a1c350c913d867d795047
RNFastImage: 462a183c4b0b6b26fdfd639e1ed6ba37536c3b87
RNFS: 89de7d7f4c0f6bafa05343c578f61118c8282ed8
RNGestureHandler: ebef699ea17e7c0006c1074e1e423ead60ce0121
RNReactNativeHapticFeedback: 851adf794e1fcdc0664d80820fa3272ee8a6a538
RNReanimated: 2313402fe27fecb7237619e9c6fcee3177f08a65
RNScreens: 5e0027417985f7b4619410f7fcbd391fa157cc71
RNVectorIcons: 941a39b5d3b9d8cf8ac2e2fc09b07bfafbcf9796
SDWebImage: 8a6b7b160b4d710e2a22b6900e25301075c34cb3
SDWebImageAVIFCoder: 00310d246aab3232ce77f1d8f0076f8c4b021d90
SDWebImageSVGCoder: 15a300a97ec1c8ac958f009c02220ac0402e936c
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
SPAlert: 735da1f16a887e294719217572ce1f936d8c8782
SPIndicator: 93e0a4fb23de51294ac48e874c0f081a5e293e4f
SwiftAudioEx: f6aa653770f3a0d3851edaf8d834a30aee4a7646
Yoga: d15f5aa644c466e917569ac43b19cbf17975239a
Yoga: fee373fb83c58550e84555a4e6bdafc34b4c5790
PODFILE CHECKSUM: 8a165b08a274fa7a2ef8008684d2fa318fd691f2
PODFILE CHECKSUM: 6c43107ef8f93930ea4053b68b45c8912648b48c
COCOAPODS: 1.16.2
+2 -1
View File
@@ -1,6 +1,6 @@
// https://docs.swmansion.com/react-native-gesture-handler/docs/guides/testing
module.exports = {
preset: 'jest-expo',
preset: 'react-native',
setupFiles: ['./node_modules/react-native-gesture-handler/jestSetup.js'],
setupFilesAfterEnv: [
'./jest/setup.ts',
@@ -11,6 +11,7 @@ module.exports = {
'./jest/setup-rnfs.ts',
'./jest/setup-rntp.ts',
'./tamagui.config.ts',
'./jest/setup-native-modules.ts',
],
extensionsToTreatAsEsm: ['.ts', '.tsx'],
transformIgnorePatterns: [
+3
View File
@@ -0,0 +1,3 @@
import mockRNCNetInfo from '@react-native-community/netinfo/jest/netinfo-mock'
jest.mock('@react-native-community/netinfo', () => mockRNCNetInfo)
-8
View File
@@ -9,11 +9,3 @@ jest.mock('react-native-haptic-feedback', () => {
},
}
})
jest.mock('burnt', () => {
return {
default: {
alert: jest.fn(),
},
}
})
+5 -7
View File
@@ -4,7 +4,7 @@
"private": true,
"scripts": {
"init-ios": "echo 'Please run `yarn init-ios:new-arch` to enable the new architecture'",
"init-ios:new-arch": "yarn install && yarn run pod:install:new-arch",
"init-ios:new-arch": "yarn && cd ios && bundle install && bundle exec pod install && cd ..",
"reinstall": "rm -rf ./node_modules && yarn install",
"android": "react-native run-android",
"ios": "react-native run-ios",
@@ -39,19 +39,14 @@
"@react-navigation/native-stack": "^7.3.10",
"@react-navigation/stack": "^7.2.10",
"@tamagui/config": "^1.126.4",
"@tamagui/toast": "^1.126.4",
"@tanstack/query-sync-storage-persister": "^5.74.6",
"@tanstack/react-query": "^5.74.4",
"@tanstack/react-query-persist-client": "^5.74.6",
"@testing-library/react-native": "^13.2.0",
"axios": "^1.8.4",
"bundle": "^2.1.0",
"burnt": "^0.13.0",
"expo": "^53.0.1",
"expo-image": "^2.0.7",
"gem": "^2.4.3",
"invert-color": "^2.0.0",
"jest-expo": "^53.0.1",
"lodash": "^4.17.21",
"react": "19.0.0",
"react-freeze": "^1.0.4",
@@ -61,6 +56,7 @@
"react-native-carplay": "^2.4.1-beta.0",
"react-native-device-info": "^14.0.4",
"react-native-draggable-flatlist": "^4.0.2",
"react-native-fast-image": "^8.6.3",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "^2.25.0",
"react-native-haptic-feedback": "^2.3.3",
@@ -71,6 +67,7 @@
"react-native-screens": "^4.11.0-beta.2",
"react-native-swipeable-item": "^2.0.9",
"react-native-text-ticker": "^1.14.0",
"react-native-toast-message": "^2.3.0",
"react-native-track-player": "4.1.1",
"react-native-url-polyfill": "^2.0.0",
"react-native-uuid": "^2.0.3",
@@ -106,6 +103,7 @@
"lint-staged": "^15.5.0",
"patch-package": "8.0.0",
"prettier": "^2.8.8",
"react-dom": "^19.1.0",
"react-native-cli-bump-version": "^1.5.1",
"react-test-renderer": "19.0.0",
"typescript": "5.8.3"
@@ -119,4 +117,4 @@
"engines": {
"node": ">=18"
}
}
}
+4 -3
View File
@@ -11,7 +11,8 @@ import { QueryKeys } from '../../enums/query-keys'
import { getImageApi, getItemsApi } from '@jellyfin/sdk/lib/utils/api'
import Client from '../../api/client'
import { ItemCard } from '../Global/components/item-card'
import { Image } from 'expo-image'
// import { Image } from 'expo-image'
import FastImage from 'react-native-fast-image'
import { groupBy, isEqual } from 'lodash'
export function AlbumScreen({ route, navigation }: HomeAlbumProps): React.JSX.Element {
@@ -83,8 +84,8 @@ export function AlbumScreen({ route, navigation }: HomeAlbumProps): React.JSX.El
}}
ListHeaderComponent={
<YStack marginTop={'$2'} minHeight={getToken('$20') + getToken('$15')}>
<Image
source={getImageApi(Client.api!).getItemImageUrlById(album.Id!)}
<FastImage
source={{ uri: getImageApi(Client.api!).getItemImageUrlById(album.Id!) }}
style={{
borderRadius: getToken('$5'),
width: getToken('$20') + getToken('$15'),
+8 -6
View File
@@ -6,7 +6,7 @@ import { useSafeAreaFrame } from 'react-native-safe-area-context'
import { YStack } from 'tamagui'
import Albums from './albums'
import SimilarArtists from './similar'
import { Image } from 'expo-image'
import FastImage from 'react-native-fast-image'
import {
createMaterialTopTabNavigator,
MaterialTopTabBar,
@@ -37,11 +37,13 @@ export default function ArtistNavigation(): React.JSX.Element {
tabBar={(props) => (
<>
<Animated.View style={[animatedBannerStyle]}>
<Image
source={getImageApi(Client.api!).getItemImageUrlById(
artist.Id!,
ImageType.Backdrop,
)}
<FastImage
source={{
uri: getImageApi(Client.api!).getItemImageUrlById(
artist.Id!,
ImageType.Backdrop,
),
}}
style={{ width: width, height: '100%' }}
/>
</Animated.View>
+3 -3
View File
@@ -1,7 +1,7 @@
import Client from '../../../api/client'
import { BaseItemDto } from '@jellyfin/sdk/lib/generated-client/models'
import { getImageApi } from '@jellyfin/sdk/lib/utils/api'
import { Image } from 'expo-image'
import FastImage from 'react-native-fast-image'
import { getToken, getTokenValue, SizeTokens } from 'tamagui'
interface ImageProps {
@@ -18,8 +18,8 @@ export default function ItemImage({
height,
}: ImageProps): React.JSX.Element {
return (
<Image
source={getImageApi(Client.api!).getItemImageUrlById(item.Id!)}
<FastImage
source={{ uri: getImageApi(Client.api!).getItemImageUrlById(item.Id!) }}
style={{
borderRadius: circular
? width
+7 -10
View File
@@ -3,7 +3,7 @@ import type { CardProps as TamaguiCardProps } from 'tamagui'
import { getToken, Card as TamaguiCard, View, YStack } from 'tamagui'
import { BaseItemDto } from '@jellyfin/sdk/lib/generated-client/models'
import { Text } from '../helpers/text'
import { Image } from 'expo-image'
import FastImage from 'react-native-fast-image'
import { getImageApi } from '@jellyfin/sdk/lib/utils/api'
import Client from '../../../api/client'
import { useQuery } from '@tanstack/react-query'
@@ -50,15 +50,12 @@ export function ItemCard(props: CardProps) {
)} */}
</TamaguiCard.Footer>
<TamaguiCard.Background>
<Image
source={getImageApi(Client.api!).getItemImageUrlById(
props.item.Type === 'Audio' ? props.item.AlbumId! : props.item.Id!,
)}
placeholder={
props.item.ImageBlurHashes && props.item.ImageBlurHashes['Primary']
? props.item.ImageBlurHashes['Primary'][0]
: undefined
}
<FastImage
source={{
uri: getImageApi(Client.api!).getItemImageUrlById(
props.item.Type === 'Audio' ? props.item.AlbumId! : props.item.Id!,
),
}}
style={{
width: '100%',
height: '100%',
@@ -1,7 +0,0 @@
import { ToastViewport } from '@tamagui/toast'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
export default function SafeToastViewport(): React.JSX.Element {
const { left, top, right } = useSafeAreaInsets()
return <ToastViewport flexDirection='column-reverse' top={top} left={left} right={right} />
}
@@ -1,28 +0,0 @@
import { Toast as TamaguiToast, useToastState } from '@tamagui/toast'
import { YStack } from 'tamagui'
export default function Toast(): React.JSX.Element | null {
const currentToast = useToastState()
if (!currentToast || currentToast.isHandledNatively) return null
return (
<TamaguiToast
key={currentToast.id}
duration={currentToast.duration}
enterStyle={{ opacity: 0, scale: 0.5, y: -25 }}
exitStyle={{ opacity: 0, scale: 1, y: -20 }}
y={0}
opacity={1}
scale={1}
animation='200ms'
viewportName={currentToast.viewportName}
>
<YStack>
<TamaguiToast.Title>{currentToast.title}</TamaguiToast.Title>
{!!currentToast.message && (
<TamaguiToast.Description>{currentToast.message}</TamaguiToast.Description>
)}
</YStack>
</TamaguiToast>
)
}
+5 -3
View File
@@ -10,7 +10,7 @@ import { StackParamList } from '../../../components/types'
import { QueuingType } from '../../../enums/queuing-type'
import { Queue } from '../../../player/types/queue-item'
import FavoriteIcon from './favorite-icon'
import { Image } from 'expo-image'
import FastImage from 'react-native-fast-image'
import { getImageApi } from '@jellyfin/sdk/lib/utils/api'
import Client from '../../../api/client'
import { networkStatusTypes } from '../../../components/Network/internetConnectionWatcher'
@@ -118,8 +118,10 @@ export default function Track({
minHeight={showArtwork ? '$4' : 'unset'}
>
{showArtwork ? (
<Image
source={getImageApi(Client.api!).getItemImageUrlById(track.AlbumId!)}
<FastImage
source={{
uri: getImageApi(Client.api!).getItemImageUrlById(track.AlbumId!),
}}
style={{
width: getToken('$12'),
height: getToken('$12'),
+7 -5
View File
@@ -10,7 +10,7 @@ import { useEffect } from 'react'
import { trigger } from 'react-native-haptic-feedback'
import TextTicker from 'react-native-text-ticker'
import { TextTickerConfig } from '../Player/component.config'
import { Image } from 'expo-image'
import FastImage from 'react-native-fast-image'
import { getImageApi } from '@jellyfin/sdk/lib/utils/api'
import Client from '../../api/client'
import Icon from '../Global/helpers/icon'
@@ -81,10 +81,12 @@ export default function ItemDetail({
<Spacer />
<Image
source={getImageApi(Client.api!).getItemImageUrlById(
item.Type === 'Audio' ? item.AlbumId! : item.Id!,
)}
<FastImage
source={{
uri: getImageApi(Client.api!).getItemImageUrlById(
item.Type === 'Audio' ? item.AlbumId! : item.Id!,
),
}}
style={{
width: getToken('$20') + getToken('$20') + getToken('$5'),
height: getToken('$20') + getToken('$20') + getToken('$5'),
@@ -27,12 +27,12 @@ import { QueryKeys } from '../../../enums/query-keys'
import { fetchItem } from '../../../api/queries/functions/item'
import { fetchUserPlaylists } from '../../../api/queries/functions/playlists'
import * as Burnt from 'burnt'
import { Image } from 'expo-image'
import { getImageApi } from '@jellyfin/sdk/lib/utils/api'
import Client from '../../../api/client'
import { useNetworkContext } from '../../../components/Network/provider'
import { useQueueContext } from '../../../player/queue-provider'
import Toast from 'react-native-toast-message'
import FastImage from 'react-native-fast-image'
interface TrackOptionsProps {
track: BaseItemDto
@@ -77,10 +77,14 @@ export default function TrackOptions({
return addToPlaylist(track, playlist)
},
onSuccess: (data, { playlist }) => {
Burnt.alert({
title: `Added to playlist`,
duration: 1,
preset: 'done',
// Burnt.alert({
// title: `Added to playlist`,
// duration: 1,
// preset: 'done',
// })
Toast.show({
text1: 'Added to playlist',
type: 'success',
})
trigger('notificationSuccess')
@@ -94,10 +98,14 @@ export default function TrackOptions({
})
},
onError: () => {
Burnt.alert({
title: `Unable to add`,
duration: 1,
preset: 'error',
// Burnt.alert({
// title: `Unable to add`,
// duration: 1,
// preset: 'error',
// })
Toast.show({
text1: 'Unable to add',
type: 'error',
})
trigger('notificationError')
@@ -206,10 +214,12 @@ export default function TrackOptions({
>
<XStack alignItems='center'>
<YStack flex={1}>
<Image
source={getImageApi(
Client.api!,
).getItemImageUrlById(playlist.Id!)}
<FastImage
source={{
uri: getImageApi(
Client.api!,
).getItemImageUrlById(playlist.Id!),
}}
style={{
borderRadius: getToken('$1.5'),
width: getToken('$12'),
@@ -10,8 +10,8 @@ import { createPlaylist } from '../../../api/mutations/functions/playlists'
import { trigger } from 'react-native-haptic-feedback'
import { queryClient } from '../../../constants/query-client'
import { QueryKeys } from '../../../enums/query-keys'
import * as Burnt from 'burnt'
import Toast from 'react-native-toast-message'
// import * as Burnt from 'burnt'
export default function AddPlaylist({
navigation,
@@ -25,11 +25,16 @@ export default function AddPlaylist({
onSuccess: (data, { name }) => {
trigger('notificationSuccess')
Burnt.alert({
title: `Playlist created`,
message: `Created playlist ${name}`,
duration: 1,
preset: 'done',
// Burnt.alert({
// title: `Playlist created`,
// message: `Created playlist ${name}`,
// duration: 1,
// preset: 'done',
// })
Toast.show({
text1: 'Playlist created',
text2: `Created playlist ${name}`,
type: 'success',
})
navigation.goBack()
@@ -9,7 +9,7 @@ import { trigger } from 'react-native-haptic-feedback'
import { queryClient } from '../../../constants/query-client'
import { QueryKeys } from '../../../enums/query-keys'
import * as Burnt from 'burnt'
// import * as Burnt from 'burnt'
export default function DeletePlaylist({
navigation,
@@ -22,12 +22,12 @@ export default function DeletePlaylist({
navigation.goBack()
navigation.goBack()
Burnt.alert({
title: `Playlist deleted`,
message: `Deleted ${playlist.Name ?? 'Untitled Playlist'}`,
duration: 1,
preset: 'done',
})
// Burnt.alert({
// title: `Playlist deleted`,
// message: `Deleted ${playlist.Name ?? 'Untitled Playlist'}`,
// duration: 1,
// preset: 'done',
// })
// Refresh favorite playlists component in library
queryClient.invalidateQueries({
@@ -16,9 +16,9 @@ import { useAuthenticationContext } from '../provider'
import { NativeStackNavigationProp } from '@react-navigation/native-stack'
import { StackParamList } from '../../../components/types'
import * as Burnt from 'burnt'
// import * as Burnt from 'burnt'
import { Image } from 'react-native'
import Toast from 'react-native-toast-message'
export default function ServerAddress({
navigation,
}: {
@@ -69,10 +69,17 @@ export default function ServerAddress({
Client.signOut()
setServer(undefined)
Burnt.toast({
title: 'Unable to connect',
preset: 'error',
// message: `Unable to connect to Jellyfin at ${useHttps ? https : http}${serverAddress}`,
// Burnt.toast({
// title: 'Unable to connect',
// preset: 'error',
// // message: `Unable to connect to Jellyfin at ${useHttps ? https : http}${serverAddress}`,
// })
Toast.show({
text1: 'Unable to connect',
text2: `Unable to connect to Jellyfin at ${
useHttps ? https : http
}${serverAddress}`,
type: 'error',
})
},
})
@@ -12,14 +12,13 @@ import { JellifyUser } from '../../../types/JellifyUser'
import { ServerAuthenticationProps } from '../../../components/types'
import Input from '../../../components/Global/helpers/input'
import Icon from '../../../components/Global/helpers/icon'
import { useToastController } from '@tamagui/toast'
import Toast from '../../../components/Global/components/toast'
// import Toast from '../../../components/Global/components/toast'
export default function ServerAuthentication({
route,
navigation,
}: ServerAuthenticationProps): React.JSX.Element {
const toast = useToastController()
// const toast = useToastController()
const [username, setUsername] = useState<string | undefined>(undefined)
const [password, setPassword] = React.useState<string | undefined>(undefined)
@@ -60,7 +59,7 @@ export default function ServerAuthentication({
onError: async (error: Error) => {
console.error('An error occurred connecting to the Jellyfin instance', error)
toast.show('Sign in failed', {})
// toast.show('Sign in failed', {})
return Promise.reject(`An error occured signing into ${Client.server!.name}`)
},
})
@@ -133,7 +132,7 @@ export default function ServerAuthentication({
</Button>
)}
</XStack>
<Toast />
{/* <Toast /> */}
</YStack>
</SafeAreaView>
)
+8 -13
View File
@@ -1,5 +1,5 @@
import React from 'react'
import { getToken, getTokens, useTheme, View, XStack, YStack } from 'tamagui'
import { getToken, getTokens, Image, useTheme, View, XStack, YStack } from 'tamagui'
import { usePlayerContext } from '../../player/player-provider'
import { BottomTabNavigationEventMap } from '@react-navigation/bottom-tabs'
import { NavigationHelpers, ParamListBase } from '@react-navigation/native'
@@ -8,7 +8,7 @@ import { Text } from '../Global/helpers/text'
import TextTicker from 'react-native-text-ticker'
import PlayPauseButton from './helpers/buttons'
import { TextTickerConfig } from './component.config'
import { Image } from 'expo-image'
import FastImage from 'react-native-fast-image'
import { getImageApi } from '@jellyfin/sdk/lib/utils/api'
import Client from '../../api/client'
import { useQueueContext } from '../../player/queue-provider'
@@ -44,17 +44,12 @@ export function Miniplayer({
minHeight={'$12'}
marginLeft={'$2'}
>
<Image
source={getImageApi(Client.api!).getItemImageUrlById(
nowPlaying!.item.AlbumId!,
)}
placeholder={
nowPlaying &&
nowPlaying.item.ImageBlurHashes &&
nowPlaying.item.ImageBlurHashes.Primary
? nowPlaying.item.ImageBlurHashes.Primary[0]
: undefined
}
<FastImage
source={{
uri: getImageApi(Client.api!).getItemImageUrlById(
nowPlaying!.item.AlbumId!,
),
}}
style={{
width: getToken('$12'),
height: getToken('$12'),
+7 -12
View File
@@ -11,7 +11,7 @@ import TextTicker from 'react-native-text-ticker'
import { TextTickerConfig } from '../component.config'
import Scrubber from '../helpers/scrubber'
import Controls from '../helpers/controls'
import { Image } from 'expo-image'
import FastImage from 'react-native-fast-image'
import { getImageApi } from '@jellyfin/sdk/lib/utils/api'
import Client from '../../../api/client'
import { useQueueContext } from '../../../player/queue-provider'
@@ -74,17 +74,12 @@ export default function PlayerScreen({
alignContent='center'
minHeight={'$20'}
>
<Image
source={getImageApi(Client.api!).getItemImageUrlById(
nowPlaying!.item.AlbumId!,
)}
placeholder={
nowPlaying &&
nowPlaying.item.ImageBlurHashes &&
nowPlaying.item.ImageBlurHashes.Primary
? nowPlaying.item.ImageBlurHashes.Primary[0]
: undefined
}
<FastImage
source={{
uri: getImageApi(Client.api!).getItemImageUrlById(
nowPlaying!.item.AlbumId!,
),
}}
style={{
borderRadius: getToken('$4'),
width:
+3 -3
View File
@@ -16,7 +16,7 @@ import { QueryKeys } from '../../enums/query-keys'
import { getImageApi, getItemsApi } from '@jellyfin/sdk/lib/utils/api'
import Client from '../../api/client'
import { RefreshControl } from 'react-native'
import { Image } from 'expo-image'
import FastImage from 'react-native-fast-image'
interface PlaylistProps {
playlist: BaseItemDto
@@ -144,8 +144,8 @@ export default function Playlist({ playlist, navigation }: PlaylistProps): React
ItemSeparatorComponent={() => <Separator />}
ListHeaderComponent={
<YStack alignItems='center' marginTop={'$4'}>
<Image
source={getImageApi(Client.api!).getItemImageUrlById(playlist.Id!)}
<FastImage
source={{ uri: getImageApi(Client.api!).getItemImageUrlById(playlist.Id!) }}
style={{
borderRadius: getToken('$5'),
width: getToken('$20') + getToken('$15'),
+3 -6
View File
@@ -7,7 +7,6 @@ import { PlayerProvider } from '../player/player-provider'
import { useColorScheme } from 'react-native'
import { PortalProvider } from '@tamagui/portal'
import { JellifyProvider, useJellifyContext } from './provider'
import { ToastProvider } from '@tamagui/toast'
import { JellifyUserDataProvider } from './user-data-provider'
import { NetworkContextProvider } from './Network/provider'
import { QueueProvider } from '../player/queue-provider'
@@ -22,11 +21,9 @@ export default function Jellify(): React.JSX.Element {
return (
<PortalProvider shouldAddRootHost>
<ToastProvider burntOptions={{ from: 'top' }}>
<JellifyProvider>
<App />
</JellifyProvider>
</ToastProvider>
<JellifyProvider>
<App />
</JellifyProvider>
</PortalProvider>
)
}
+17 -10
View File
@@ -4,10 +4,10 @@ import { getUserLibraryApi } from '@jellyfin/sdk/lib/utils/api'
import { useMutation } from '@tanstack/react-query'
import { createContext, ReactNode, SetStateAction, useContext } from 'react'
import * as Burnt from 'burnt'
import { trigger } from 'react-native-haptic-feedback'
import { queryClient } from '../constants/query-client'
import { QueryKeys } from '../enums/query-keys'
import Toast from 'react-native-toast-message'
interface SetFavoriteMutation {
item: BaseItemDto
@@ -27,10 +27,14 @@ const JellifyUserDataContextInitializer = () => {
})
},
onSuccess: ({ data }, { item, setFavorite, onToggle }) => {
Burnt.alert({
title: `Added favorite`,
duration: 1,
preset: 'heart',
// Burnt.alert({
// title: `Added favorite`,
// duration: 1,
// preset: 'heart',
// })
Toast.show({
text1: 'Added favorite',
type: 'success',
})
trigger('notificationSuccess')
@@ -50,12 +54,15 @@ const JellifyUserDataContextInitializer = () => {
})
},
onSuccess: ({ data }, { item, setFavorite, onToggle }) => {
Burnt.alert({
title: `Removed favorite`,
duration: 1,
preset: 'done',
// Burnt.alert({
// title: `Removed favorite`,
// duration: 1,
// preset: 'done',
// })
Toast.show({
text1: 'Removed favorite',
type: 'error',
})
trigger('notificationSuccess')
setFavorite(false)
+10 -6
View File
@@ -15,12 +15,12 @@ import TrackPlayer, { Event, useTrackPlayerEvents } from 'react-native-track-pla
import { findPlayQueueIndexStart } from './helpers'
import { getQueue, play, seekTo } from 'react-native-track-player/lib/src/trackPlayer'
import { trigger } from 'react-native-haptic-feedback'
import * as Burnt from 'burnt'
// import * as Burnt from 'burnt'
import { markItemPlayed } from '../api/mutations/functions/item'
import { filterTracksOnNetworkStatus } from './helpers/queue'
import { SKIP_TO_PREVIOUS_THRESHOLD } from './config'
import { isUndefined } from 'lodash'
import Toast from 'react-native-toast-message'
interface QueueContext {
queueRef: Queue
playQueue: JellifyTrack[]
@@ -194,10 +194,14 @@ const QueueContextInitailizer = () => {
onSuccess: (data, { queuingType }) => {
trigger('notificationSuccess')
Burnt.alert({
title: queuingType === QueuingType.PlayingNext ? 'Playing next' : 'Added to queue',
duration: 0.5,
preset: 'done',
// Burnt.alert({
// title: queuingType === QueuingType.PlayingNext ? 'Playing next' : 'Added to queue',
// duration: 0.5,
// preset: 'done',
// })
Toast.show({
text1: queuingType === QueuingType.PlayingNext ? 'Playing next' : 'Added to queue',
type: 'success',
})
},
onError: () => {
+74 -1724
View File
File diff suppressed because it is too large Load Diff