From df2a58f3d19818bf86c98b7cebdbb1d60558f8c1 Mon Sep 17 00:00:00 2001 From: Szymon Date: Tue, 29 Aug 2017 11:09:30 +0200 Subject: [PATCH] Changed return type in backhandler Android so that it overrides default behaviour --- src/backHandlerRe.re | 9 ++++----- src/backHandlerRe.rei | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/backHandlerRe.re b/src/backHandlerRe.re index fbc7604b6b80a4..87d2df67c802a1 100644 --- a/src/backHandlerRe.re +++ b/src/backHandlerRe.re @@ -1,8 +1,7 @@ -external exitApp : unit => unit = - "" [@@bs.scope "BackHandler"] [@@bs.module "react-native"]; +external exitApp : unit => unit = "" [@@bs.scope "BackHandler"] [@@bs.module "react-native"]; -external addEventListener : string => (unit => unit) => unit = +external addEventListener : string => (unit => bool) => unit = "" [@@bs.scope "BackHandler"] [@@bs.module "react-native"]; -external removeEventListener : string => (unit => unit) => unit = - "" [@@bs.scope "BackHandler"] [@@bs.module "react-native"]; \ No newline at end of file +external removeEventListener : string => (unit => bool) => unit = + "" [@@bs.scope "BackHandler"] [@@bs.module "react-native"]; diff --git a/src/backHandlerRe.rei b/src/backHandlerRe.rei index fbc7604b6b80a4..87d2df67c802a1 100644 --- a/src/backHandlerRe.rei +++ b/src/backHandlerRe.rei @@ -1,8 +1,7 @@ -external exitApp : unit => unit = - "" [@@bs.scope "BackHandler"] [@@bs.module "react-native"]; +external exitApp : unit => unit = "" [@@bs.scope "BackHandler"] [@@bs.module "react-native"]; -external addEventListener : string => (unit => unit) => unit = +external addEventListener : string => (unit => bool) => unit = "" [@@bs.scope "BackHandler"] [@@bs.module "react-native"]; -external removeEventListener : string => (unit => unit) => unit = - "" [@@bs.scope "BackHandler"] [@@bs.module "react-native"]; \ No newline at end of file +external removeEventListener : string => (unit => bool) => unit = + "" [@@bs.scope "BackHandler"] [@@bs.module "react-native"];