Skip to content

Commit 619cead

Browse files
authored
Merge pull request facebook#61 from szymonzmyslony/master
Changed return type in backhandler Android so that it overrides default behaviour
2 parents 2f4180f + df2a58f commit 619cead

2 files changed

Lines changed: 8 additions & 10 deletions

File tree

src/backHandlerRe.re

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
external exitApp : unit => unit =
2-
"" [@@bs.scope "BackHandler"] [@@bs.module "react-native"];
1+
external exitApp : unit => unit = "" [@@bs.scope "BackHandler"] [@@bs.module "react-native"];
32

4-
external addEventListener : string => (unit => unit) => unit =
3+
external addEventListener : string => (unit => bool) => unit =
54
"" [@@bs.scope "BackHandler"] [@@bs.module "react-native"];
65

7-
external removeEventListener : string => (unit => unit) => unit =
8-
"" [@@bs.scope "BackHandler"] [@@bs.module "react-native"];
6+
external removeEventListener : string => (unit => bool) => unit =
7+
"" [@@bs.scope "BackHandler"] [@@bs.module "react-native"];

src/backHandlerRe.rei

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
external exitApp : unit => unit =
2-
"" [@@bs.scope "BackHandler"] [@@bs.module "react-native"];
1+
external exitApp : unit => unit = "" [@@bs.scope "BackHandler"] [@@bs.module "react-native"];
32

4-
external addEventListener : string => (unit => unit) => unit =
3+
external addEventListener : string => (unit => bool) => unit =
54
"" [@@bs.scope "BackHandler"] [@@bs.module "react-native"];
65

7-
external removeEventListener : string => (unit => unit) => unit =
8-
"" [@@bs.scope "BackHandler"] [@@bs.module "react-native"];
6+
external removeEventListener : string => (unit => bool) => unit =
7+
"" [@@bs.scope "BackHandler"] [@@bs.module "react-native"];

0 commit comments

Comments
 (0)