Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-threads
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
冷佳娟
react-native-threads
Commits
d6ca8ac6
Commit
d6ca8ac6
authored
Jun 23, 2018
by
Travis Nuttall
Committed by
GitHub
Jun 23, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #33 from joltup/remove-file-slug
stop replacing "/" with "_", but remove leading "./" if found
parents
85e2bd12
8ef6842f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
android/src/main/java/com/reactlibrary/RNThreadModule.java
android/src/main/java/com/reactlibrary/RNThreadModule.java
+5
-1
examples/SimpleExample/android/app/build.gradle
examples/SimpleExample/android/app/build.gradle
+1
-1
No files found.
android/src/main/java/com/reactlibrary/RNThreadModule.java
View file @
d6ca8ac6
...
@@ -58,7 +58,11 @@ public class RNThreadModule extends ReactContextBaseJavaModule implements Lifecy
...
@@ -58,7 +58,11 @@ public class RNThreadModule extends ReactContextBaseJavaModule implements Lifecy
public
void
startThread
(
final
String
jsFileName
,
final
Promise
promise
)
{
public
void
startThread
(
final
String
jsFileName
,
final
Promise
promise
)
{
Log
.
d
(
TAG
,
"Starting web thread - "
+
jsFileName
);
Log
.
d
(
TAG
,
"Starting web thread - "
+
jsFileName
);
String
jsFileSlug
=
jsFileName
.
contains
(
"/"
)
?
jsFileName
.
replaceAll
(
"/"
,
"_"
)
:
jsFileName
;
// When we create the absolute file path later, a "./" will break it.
// Remove the leading "./" if it exists.
String
jsFileSlug
=
jsFileName
.
contains
(
"./"
)
?
jsFileName
.
replace
(
"./"
,
""
)
:
jsFileName
;
JSBundleLoader
bundleLoader
=
getDevSupportManager
().
getDevSupportEnabled
()
JSBundleLoader
bundleLoader
=
getDevSupportManager
().
getDevSupportEnabled
()
?
createDevBundleLoader
(
jsFileName
,
jsFileSlug
)
?
createDevBundleLoader
(
jsFileName
,
jsFileSlug
)
...
...
examples/SimpleExample/android/app/build.gradle
View file @
d6ca8ac6
...
@@ -148,10 +148,10 @@ android {
...
@@ -148,10 +148,10 @@ android {
}
}
dependencies
{
dependencies
{
compile
project
(
':react-native-threads'
)
compile
fileTree
(
dir:
"libs"
,
include:
[
"*.jar"
])
compile
fileTree
(
dir:
"libs"
,
include:
[
"*.jar"
])
compile
"com.android.support:appcompat-v7:23.0.1"
compile
"com.android.support:appcompat-v7:23.0.1"
compile
"com.facebook.react:react-native:+"
// From node_modules
compile
"com.facebook.react:react-native:+"
// From node_modules
compile
project
(
':react-native-threads'
)
}
}
// Run this once to be able to run the application with BUCK
// Run this once to be able to run the application with BUCK
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment