-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reviewed By: fromcelticpark Differential Revision: D6502049 fbshipit-source-id: 31a611cea4c017877c3ce2f7e9a3503723af4c2d
- Loading branch information
1 parent
ba31d29
commit 489b98b
Showing
2 changed files
with
1 addition
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,19 +52,15 @@ class AssetSourceResolver { | |
serverUrl: ?string; | ||
// where the jsbundle is being run from | ||
jsbundleUrl: ?string; | ||
// where the embedded bundle in the app is stored | ||
embeddedBundleUrl: ?string; | ||
// the asset to resolve | ||
asset: PackagerAsset; | ||
|
||
constructor(serverUrl: ?string, | ||
jsbundleUrl: ?string, | ||
embeddedBundleUrl: ?string, | ||
asset: PackagerAsset | ||
) { | ||
this.serverUrl = serverUrl; | ||
this.jsbundleUrl = jsbundleUrl; | ||
this.embeddedBundleUrl = embeddedBundleUrl; | ||
this.asset = asset; | ||
} | ||
|
||
|
@@ -76,10 +72,6 @@ class AssetSourceResolver { | |
return !!(this.jsbundleUrl && this.jsbundleUrl.startsWith('file://')); | ||
} | ||
|
||
canLoadFromEmbeddedBundledLocation(): boolean { | ||
return !!this.embeddedBundleUrl; | ||
} | ||
|
||
defaultAsset(): ResolvedAssetSource { | ||
if (this.isLoadedFromServer()) { | ||
return this.assetServerURL(); | ||
|
@@ -123,15 +115,6 @@ class AssetSourceResolver { | |
return this.fromSource(path + getScaledAssetPath(this.asset)); | ||
} | ||
|
||
/** | ||
* Resolves to the asset that was bundled with the app, with a scaled asset filename | ||
* E.g. 'file:///sdcard/bundle/assets/AwesomeModule/[email protected]' | ||
*/ | ||
scaledAssetURLInEmbeddedBundleUrl(): ResolvedAssetSource { | ||
const path = this.embeddedBundleUrl || 'file://'; | ||
return this.fromSource(path + getScaledAssetPath(this.asset)); | ||
} | ||
|
||
/** | ||
* The default location of assets bundled with the app, located by | ||
* resource identifier | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters