mirror of
https://github.com/mattermost/mattermost-mobile.git
synced 2026-11-04 09:58:57 +00:00
* Expo-Router partial migration * Full migration to ExpoRouter * i18n * add tests * Merge branch 'main' into expo-router * align package-lock.json * i18n * feedback review * feedback review * android 16kb patch * Refactored emoji picker keyboard using a state machine * set android launch_screen in drawables instead of layout * no conditional hooks * remove duplicate call in test * address feedback * fix tests and address more feedback * small corrections * small corrections * small corrections * fix draft test * fix draft test 2 * remove navigateToScreen in draff test * fix nit in draft test * remove doc file * Feedback review * fix snapshots * improve test coverage * fix i18n * Upgrade t o RN 0.83, other dependencies and new architecture (#9737) * library hardware-keyboard android new arch support fix * library rnshare android new arch support fix * library rnutils android new arch support fix * library secure-pdf-viewer add new arch support * Enable new arch on iOS and Android * update emm and network client with new-arch * update intune to use new-arch * performance improvements * fix tests * fixes post input on new-arch * fix android emoji picker * remove doc * run tests in parallel * upgrade to React Native 0.83.9, Expo 55, React 19, and New Architecture Bumps core dependencies to their latest versions: - React Native 0.77.3 → 0.83.9 (New Architecture enabled) - React 18.3.1 → 19.2.5 - Expo SDK 52 → 55 - TypeScript 5.8.3 → 6.0.3 - Node.js 22.16.0 → 24.15.0 - react-native-reanimated 3.17.3 → 4.3.0 - Various other dependency upgrades Migrates iOS AppDelegate from Objective-C to Swift, updates Android build tooling and Gradle wrapper, refreshes all patches and font assets, and adapts app code, tests, and CI workflows throughout for API changes introduced by these upgrades. * remove unecessary dismissKeyboard in notifications * feedback review * update intune to use new-arch * update @mattermost deps * missing i18n string * additional fixes * update fastlane
121 lines
6.6 KiB
Diff
121 lines
6.6 KiB
Diff
diff --git a/node_modules/expo-video-thumbnails/android/src/main/java/expo/modules/videothumbnails/VideoThumbnailOptions.kt b/node_modules/expo-video-thumbnails/android/src/main/java/expo/modules/videothumbnails/VideoThumbnailOptions.kt
|
|
index 4c9b7c1..f98bee8 100644
|
|
--- a/node_modules/expo-video-thumbnails/android/src/main/java/expo/modules/videothumbnails/VideoThumbnailOptions.kt
|
|
+++ b/node_modules/expo-video-thumbnails/android/src/main/java/expo/modules/videothumbnails/VideoThumbnailOptions.kt
|
|
@@ -11,7 +11,10 @@ data class VideoThumbnailOptions(
|
|
val time: Int = 0,
|
|
|
|
@Field
|
|
- val headers: Map<String, String> = emptyMap()
|
|
+ val headers: Map<String, String> = emptyMap(),
|
|
+
|
|
+ @Field
|
|
+ val cachePath: String? = null
|
|
) : Record
|
|
|
|
data class VideoThumbnailResult(
|
|
diff --git a/node_modules/expo-video-thumbnails/android/src/main/java/expo/modules/videothumbnails/VideoThumbnailsModule.kt b/node_modules/expo-video-thumbnails/android/src/main/java/expo/modules/videothumbnails/VideoThumbnailsModule.kt
|
|
index 2c2d794..8204f98 100644
|
|
--- a/node_modules/expo-video-thumbnails/android/src/main/java/expo/modules/videothumbnails/VideoThumbnailsModule.kt
|
|
+++ b/node_modules/expo-video-thumbnails/android/src/main/java/expo/modules/videothumbnails/VideoThumbnailsModule.kt
|
|
@@ -43,7 +43,14 @@ class VideoThumbnailsModule : Module() {
|
|
val thumbnail = GetThumbnail(sourceFilename, options, context).execute()
|
|
?: throw GenerateThumbnailException()
|
|
|
|
- val path = FileUtilities.generateOutputPath(context.cacheDir, "VideoThumbnails", "jpg")
|
|
+ val path = if (!options.cachePath.isNullOrEmpty()) {
|
|
+ // Use custom cache path: {cacheDir}/{cachePath}/VideoThumbnails/
|
|
+ val customDir = File(context.cacheDir, options.cachePath)
|
|
+ FileUtilities.generateOutputPath(customDir, "VideoThumbnails", "jpg")
|
|
+ } else {
|
|
+ // Use default cache path: {cacheDir}/VideoThumbnails/
|
|
+ FileUtilities.generateOutputPath(context.cacheDir, "VideoThumbnails", "jpg")
|
|
+ }
|
|
FileOutputStream(path).use { outputStream ->
|
|
thumbnail.compress(Bitmap.CompressFormat.JPEG, (options.quality * 100).toInt(), outputStream)
|
|
}
|
|
diff --git a/node_modules/expo-video-thumbnails/build/VideoThumbnailsTypes.types.d.ts b/node_modules/expo-video-thumbnails/build/VideoThumbnailsTypes.types.d.ts
|
|
index 207cbb8..d9f1791 100644
|
|
--- a/node_modules/expo-video-thumbnails/build/VideoThumbnailsTypes.types.d.ts
|
|
+++ b/node_modules/expo-video-thumbnails/build/VideoThumbnailsTypes.types.d.ts
|
|
@@ -26,5 +26,12 @@ export type VideoThumbnailsOptions = {
|
|
* In case `sourceFilename` is a remote URI, `headers` object is passed in a network request.
|
|
*/
|
|
headers?: Record<string, string>;
|
|
+ /**
|
|
+ * Custom cache subdirectory path for storing the thumbnail.
|
|
+ * Will be used as: {cacheDirectory}/{cachePath}/VideoThumbnails/
|
|
+ * If not provided, uses default cache location: {cacheDirectory}/VideoThumbnails/
|
|
+ * @example "server-abc123" or "external"
|
|
+ */
|
|
+ cachePath?: string;
|
|
};
|
|
//# sourceMappingURL=VideoThumbnailsTypes.types.d.ts.map
|
|
\ No newline at end of file
|
|
diff --git a/node_modules/expo-video-thumbnails/ios/VideoThumbnailsModule.swift b/node_modules/expo-video-thumbnails/ios/VideoThumbnailsModule.swift
|
|
index b2996dd..73b1ab1 100644
|
|
--- a/node_modules/expo-video-thumbnails/ios/VideoThumbnailsModule.swift
|
|
+++ b/node_modules/expo-video-thumbnails/ios/VideoThumbnailsModule.swift
|
|
@@ -7,7 +7,7 @@ public class VideoThumbnailsModule: Module {
|
|
public func definition() -> ModuleDefinition {
|
|
Name("ExpoVideoThumbnails")
|
|
|
|
- AsyncFunction("getThumbnail", getVideoThumbnail)
|
|
+ AsyncFunction("getThumbnail", getVideoThumbnail).runOnQueue(.global())
|
|
}
|
|
|
|
internal func getVideoThumbnail(sourceFilename: URL, options: VideoThumbnailsOptions) throws -> [String: Any] {
|
|
@@ -33,7 +33,7 @@ public class VideoThumbnailsModule: Module {
|
|
|
|
let imgRef = try generator.copyCGImage(at: time, actualTime: nil)
|
|
let thumbnail = UIImage(cgImage: imgRef)
|
|
- let savedImageUrl = try saveImage(image: thumbnail, quality: options.quality)
|
|
+ let savedImageUrl = try saveImage(image: thumbnail, quality: options.quality, cachePath: options.cachePath)
|
|
|
|
return [
|
|
"uri": savedImageUrl.absoluteString,
|
|
@@ -45,8 +45,15 @@ public class VideoThumbnailsModule: Module {
|
|
/**
|
|
Saves the image as a file.
|
|
*/
|
|
- internal func saveImage(image: UIImage, quality: Double) throws -> URL {
|
|
- let directory = appContext?.config.cacheDirectory?.appendingPathComponent("VideoThumbnails")
|
|
+ internal func saveImage(image: UIImage, quality: Double, cachePath: String?) throws -> URL {
|
|
+ let directory: URL?
|
|
+ if let cachePath = cachePath, !cachePath.isEmpty {
|
|
+ // Use custom cache path: {cacheDirectory}/{cachePath}/VideoThumbnails/
|
|
+ directory = appContext?.config.cacheDirectory?.appendingPathComponent(cachePath).appendingPathComponent("VideoThumbnails")
|
|
+ } else {
|
|
+ // Use default cache path: {cacheDirectory}/VideoThumbnails/
|
|
+ directory = appContext?.config.cacheDirectory?.appendingPathComponent("VideoThumbnails")
|
|
+ }
|
|
let fileName = UUID().uuidString.appending(".jpg")
|
|
let fileUrl = directory?.appendingPathComponent(fileName)
|
|
|
|
diff --git a/node_modules/expo-video-thumbnails/ios/VideoThumbnailsOptions.swift b/node_modules/expo-video-thumbnails/ios/VideoThumbnailsOptions.swift
|
|
index 8310a8c..2f99e1f 100644
|
|
--- a/node_modules/expo-video-thumbnails/ios/VideoThumbnailsOptions.swift
|
|
+++ b/node_modules/expo-video-thumbnails/ios/VideoThumbnailsOptions.swift
|
|
@@ -4,4 +4,5 @@ internal struct VideoThumbnailsOptions: Record {
|
|
@Field var quality: Double = 1.0
|
|
@Field var time: Int64 = 0
|
|
@Field var headers: [String: String] = [String: String]()
|
|
+ @Field var cachePath: String?
|
|
}
|
|
diff --git a/node_modules/expo-video-thumbnails/src/VideoThumbnailsTypes.types.ts b/node_modules/expo-video-thumbnails/src/VideoThumbnailsTypes.types.ts
|
|
index 1576080..92fb73b 100644
|
|
--- a/node_modules/expo-video-thumbnails/src/VideoThumbnailsTypes.types.ts
|
|
+++ b/node_modules/expo-video-thumbnails/src/VideoThumbnailsTypes.types.ts
|
|
@@ -29,4 +29,11 @@ export type VideoThumbnailsOptions = {
|
|
* In case `sourceFilename` is a remote URI, `headers` object is passed in a network request.
|
|
*/
|
|
headers?: Record<string, string>;
|
|
+ /**
|
|
+ * Custom cache subdirectory path for storing the thumbnail.
|
|
+ * Will be used as: {cacheDirectory}/{cachePath}/VideoThumbnails/
|
|
+ * If not provided, uses default cache location: {cacheDirectory}/VideoThumbnails/
|
|
+ * @example "server-abc123" or "external"
|
|
+ */
|
|
+ cachePath?: string;
|
|
};
|