Skip to content

Bugfix/android kotlin #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 6, 2020
Merged

Bugfix/android kotlin #49

merged 6 commits into from
Jul 6, 2020

Conversation

nicoache1
Copy link
Contributor

@nicoache1 nicoache1 commented Jul 3, 2020

Bugfix; Android issue with onlyWebLogin

🔄 Type of change:

  • ♻️ Refactor
  • 🔧 Bugfixes

✏️ Description:

Solve issue in android with onlyWebLogin prop, also add some improvements and add support for email and lineIdToken


⚠️ Warnings:

  • Missing iOS support, will be in next pr.

@nicoache1 nicoache1 force-pushed the bugfix/android_kotlin branch from 329a854 to 7d18c20 Compare July 6, 2020 14:38
@@ -56,8 +56,10 @@ class RNLine(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule

@ReactMethod
fun login(args: ReadableMap, promise: Promise) {
println(args)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't you do it only in debug mode or something like that?

return [LineLogin application:app open:url options:options];
}

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add these two to Swift section too.

@@ -92,6 +108,9 @@ Don't forget to add `application` function, as line's instructions indicate.
<string name="line_channel_id" translatable="false">Your channel id here</string>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -23,7 +23,7 @@ import com.linecorp.linesdk.LineProfile
enum class LoginArguments(val key: String) {
SCOPES("scopes"),
ONLY_WEB_LOGIN("onlyWebLogin"),
BOT_PROMPT("onlyWebLogin")
BOT_PROMPT("botPrompt")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fix 👏

@@ -233,7 +232,7 @@ class RNLine(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule
)
)

private fun parseVerifyAccessToken(verifyAccessToken: LineCredential): WritableMap = Arguments.makeNativeMap(
private fun parseVerifyAccessToken( verifyAccessToken: LineCredential): WritableMap = Arguments.makeNativeMap(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private fun parseVerifyAccessToken( verifyAccessToken: LineCredential): WritableMap = Arguments.makeNativeMap(
private fun parseVerifyAccessToken(verifyAccessToken: LineCredential): WritableMap = Arguments.makeNativeMap(

You left a whitespace there 😛

@nicoache1 nicoache1 merged commit c25a475 into master Jul 6, 2020
@nicoache1 nicoache1 deleted the bugfix/android_kotlin branch July 6, 2020 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants