Skip to content
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

fix(android): processPushBundle flipped returned value #160

Merged
merged 1 commit into from
Feb 26, 2022

Conversation

erisu
Copy link

@erisu erisu commented Jan 30, 2022

Description

Appears that during refactoring from Java to Kotlin, the returned value ofprocessPushBundle was flipped.

When reading the code, I was expecting that the returned value was only true when the inline reply exists. This is determined if RemoteInput.getResultsFromIntent was not null.

I expected this case because the variable name inline, but the variable name was not actually detailed enough to explain if it was has vs notHave.

Compaing with Java code, it appears that true is always returned even when there is no inline reply. So this means when Inline reply is set, then false is returned.

This PR should flip the case back and I also renamed the variable inline to notHaveInlineReply to properly explain what the return result represents.

Related Issue

fixes #149

Motivation and Context

Fixes the flipped return value in processPushBundle.

How Has This Been Tested?

n/a

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@erisu erisu added the bug Something isn't working label Jan 30, 2022
@erisu erisu added this to the 3.0.1 milestone Jan 30, 2022
@erisu
Copy link
Author

erisu commented Jan 30, 2022

@hdkz-dev このPRを確認していただけますか?

この返却値の反転の結果、アプリ起動しない動きになっているように見えたので
 意図的な変更なのか?
 コンバートミスなのか?

コンバートミスです。誤って結果を反転させました。

変数名 inlineは十分に詳細ではありませんでした。 「Inline Reply」が存在するのはtrueと思いました。Javaでは、「Inline Reply」が設定されている場合を除いて、結果は常に「true」でした。また、変数の名前を「inline」から「notHaveInlineReply」に変更しました。

@hdkz-dev
Copy link

hdkz-dev commented Feb 1, 2022

@erisu
対応ありがとうございます。
修正の認識は一致しています。

申し訳ありませんが、
使用していたプロジェクトチームから外れた為、
ソースへのアクセス権限が無く
アプリに組み込んで確認が出来ませんでした。

@erisu erisu merged commit ad6e0ee into master Feb 26, 2022
@erisu erisu deleted the fix/android-processPushBundle-inline branch February 26, 2022 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android push notification events
2 participants