We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4f61c2 commit 6f6859cCopy full SHA for 6f6859c
utils/src/main/java/com/haoge/easyandroid/easy/EasyActivityResult.kt
@@ -32,7 +32,7 @@ object EasyActivityResult {
32
return
33
}
34
35
- if (context !is Activity) {
+ if (context !is Activity || callback == null) {
36
context.startActivity(intent)
37
} else {
38
val requestCode = codeGenerator.nextInt(0x0000FFFF)
@@ -42,10 +42,6 @@ object EasyActivityResult {
42
context.startActivityForResult(intent, requestCode, options)
43
44
45
- if (callback == null) {
46
- return
47
- }
48
-
49
if (container.containsKey(context)) {
50
container[context]?.put(requestCode, callback)
51
0 commit comments