react-native-macos/Libraries/Utilities/BackHandler.android.js

104 строки
2.7 KiB
JavaScript
Исходник Обычный вид История

/**
Squashed commit of the following: commit 4c43e301d97042e9eec4401dd81b8ebce053f691 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:49:02 2019 -0700 Squashed commit of the following: commit 862f3fb5d9e3161feab6e5e0e61c7b28e8ac1ef9 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:37 2019 -0700 Revert "Merge 1b12e2caaadf094ce9327deb7e5fe49297e8a115 into 9f1e90947421ad0ea2de1b534117c500dc8c9744" This reverts commit d036bc4c5768d6a3327c5766e1791719cb11693f, reversing changes made to 9f1e90947421ad0ea2de1b534117c500dc8c9744. commit 41477c33c1bcc78f40da00ac7e86ab4dd3f7d062 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:23 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.1" This reverts commit 852df1af0e489063db15d74f0d241ea930778b9c. commit 4993963205e737849e4880309ef86aeac9f2a765 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:16 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.2" This reverts commit 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 41f8beadb2030593208ffc6ff29339991dde3798 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:07 2019 -0700 Revert "Merge 4f3c37886c3f8d0af9571dbed0ec1361d51219a6 into 774513fec948ee5595543e23ab4e7b9cccbdcbf1" This reverts commit a84049078437ce6e0852a30367b4c2d56be7b884, reversing changes made to 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 143e70ec6228e110cd94a5ae9c56309040c1f1eb Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:57 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.3" This reverts commit 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 138191b0d6bf9e4370fb5126dc2095a3fb122a57 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:16 2019 -0700 Revert "Merge d8be239facee73f3ba7b664154766dbfb8049050 into 54dfee820d107cb897c5aca14131cf7fbde616d7" This reverts commit faae1e56f805e2fd953218be92b2c0d1753a7c3c, reversing changes made to 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 40a77c8365c5273df0bba4fc2b0439db17d247d0 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:44 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.4" This reverts commit 043f6330e7a7fe7a73ac4e406c157f61cf1e7f1c. commit adf5c26c8f7132a6643ecfea116226632173447b Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:42 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.5" This reverts commit 4004f889c28f42535b9cc08d439311b2f5802359. commit e68d497a58e32d26f0d04130895954d7b654c2bf Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:39 2019 -0700 Revert "Fix the builds... (#20)" This reverts commit 745eeda26fafa79fd9110e20647ace54c80d3dab. commit 4cdef1eef22edbcdc9ca86e31846a175b944999e Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:31 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.6" This reverts commit 34a307738806da39704d7f45428920144e0bed53.
2019-03-26 20:54:53 +03:00
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
const DeviceEventManager = require('NativeModules').DeviceEventManager;
const RCTDeviceEventEmitter = require('RCTDeviceEventEmitter');
const DEVICE_BACK_EVENT = 'hardwareBackPress';
Squashed commit of the following: commit 4c43e301d97042e9eec4401dd81b8ebce053f691 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:49:02 2019 -0700 Squashed commit of the following: commit 862f3fb5d9e3161feab6e5e0e61c7b28e8ac1ef9 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:37 2019 -0700 Revert "Merge 1b12e2caaadf094ce9327deb7e5fe49297e8a115 into 9f1e90947421ad0ea2de1b534117c500dc8c9744" This reverts commit d036bc4c5768d6a3327c5766e1791719cb11693f, reversing changes made to 9f1e90947421ad0ea2de1b534117c500dc8c9744. commit 41477c33c1bcc78f40da00ac7e86ab4dd3f7d062 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:23 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.1" This reverts commit 852df1af0e489063db15d74f0d241ea930778b9c. commit 4993963205e737849e4880309ef86aeac9f2a765 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:16 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.2" This reverts commit 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 41f8beadb2030593208ffc6ff29339991dde3798 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:07 2019 -0700 Revert "Merge 4f3c37886c3f8d0af9571dbed0ec1361d51219a6 into 774513fec948ee5595543e23ab4e7b9cccbdcbf1" This reverts commit a84049078437ce6e0852a30367b4c2d56be7b884, reversing changes made to 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 143e70ec6228e110cd94a5ae9c56309040c1f1eb Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:57 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.3" This reverts commit 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 138191b0d6bf9e4370fb5126dc2095a3fb122a57 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:16 2019 -0700 Revert "Merge d8be239facee73f3ba7b664154766dbfb8049050 into 54dfee820d107cb897c5aca14131cf7fbde616d7" This reverts commit faae1e56f805e2fd953218be92b2c0d1753a7c3c, reversing changes made to 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 40a77c8365c5273df0bba4fc2b0439db17d247d0 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:44 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.4" This reverts commit 043f6330e7a7fe7a73ac4e406c157f61cf1e7f1c. commit adf5c26c8f7132a6643ecfea116226632173447b Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:42 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.5" This reverts commit 4004f889c28f42535b9cc08d439311b2f5802359. commit e68d497a58e32d26f0d04130895954d7b654c2bf Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:39 2019 -0700 Revert "Fix the builds... (#20)" This reverts commit 745eeda26fafa79fd9110e20647ace54c80d3dab. commit 4cdef1eef22edbcdc9ca86e31846a175b944999e Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:31 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.6" This reverts commit 34a307738806da39704d7f45428920144e0bed53.
2019-03-26 20:54:53 +03:00
type BackPressEventName = $Enum<{
backPress: string,
}>;
Squashed commit of the following: commit 4c43e301d97042e9eec4401dd81b8ebce053f691 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:49:02 2019 -0700 Squashed commit of the following: commit 862f3fb5d9e3161feab6e5e0e61c7b28e8ac1ef9 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:37 2019 -0700 Revert "Merge 1b12e2caaadf094ce9327deb7e5fe49297e8a115 into 9f1e90947421ad0ea2de1b534117c500dc8c9744" This reverts commit d036bc4c5768d6a3327c5766e1791719cb11693f, reversing changes made to 9f1e90947421ad0ea2de1b534117c500dc8c9744. commit 41477c33c1bcc78f40da00ac7e86ab4dd3f7d062 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:23 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.1" This reverts commit 852df1af0e489063db15d74f0d241ea930778b9c. commit 4993963205e737849e4880309ef86aeac9f2a765 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:16 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.2" This reverts commit 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 41f8beadb2030593208ffc6ff29339991dde3798 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:07 2019 -0700 Revert "Merge 4f3c37886c3f8d0af9571dbed0ec1361d51219a6 into 774513fec948ee5595543e23ab4e7b9cccbdcbf1" This reverts commit a84049078437ce6e0852a30367b4c2d56be7b884, reversing changes made to 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 143e70ec6228e110cd94a5ae9c56309040c1f1eb Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:57 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.3" This reverts commit 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 138191b0d6bf9e4370fb5126dc2095a3fb122a57 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:16 2019 -0700 Revert "Merge d8be239facee73f3ba7b664154766dbfb8049050 into 54dfee820d107cb897c5aca14131cf7fbde616d7" This reverts commit faae1e56f805e2fd953218be92b2c0d1753a7c3c, reversing changes made to 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 40a77c8365c5273df0bba4fc2b0439db17d247d0 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:44 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.4" This reverts commit 043f6330e7a7fe7a73ac4e406c157f61cf1e7f1c. commit adf5c26c8f7132a6643ecfea116226632173447b Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:42 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.5" This reverts commit 4004f889c28f42535b9cc08d439311b2f5802359. commit e68d497a58e32d26f0d04130895954d7b654c2bf Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:39 2019 -0700 Revert "Fix the builds... (#20)" This reverts commit 745eeda26fafa79fd9110e20647ace54c80d3dab. commit 4cdef1eef22edbcdc9ca86e31846a175b944999e Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:31 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.6" This reverts commit 34a307738806da39704d7f45428920144e0bed53.
2019-03-26 20:54:53 +03:00
const _backPressSubscriptions = new Set();
RCTDeviceEventEmitter.addListener(DEVICE_BACK_EVENT, function() {
Squashed commit of the following: commit 4c43e301d97042e9eec4401dd81b8ebce053f691 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:49:02 2019 -0700 Squashed commit of the following: commit 862f3fb5d9e3161feab6e5e0e61c7b28e8ac1ef9 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:37 2019 -0700 Revert "Merge 1b12e2caaadf094ce9327deb7e5fe49297e8a115 into 9f1e90947421ad0ea2de1b534117c500dc8c9744" This reverts commit d036bc4c5768d6a3327c5766e1791719cb11693f, reversing changes made to 9f1e90947421ad0ea2de1b534117c500dc8c9744. commit 41477c33c1bcc78f40da00ac7e86ab4dd3f7d062 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:23 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.1" This reverts commit 852df1af0e489063db15d74f0d241ea930778b9c. commit 4993963205e737849e4880309ef86aeac9f2a765 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:16 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.2" This reverts commit 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 41f8beadb2030593208ffc6ff29339991dde3798 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:07 2019 -0700 Revert "Merge 4f3c37886c3f8d0af9571dbed0ec1361d51219a6 into 774513fec948ee5595543e23ab4e7b9cccbdcbf1" This reverts commit a84049078437ce6e0852a30367b4c2d56be7b884, reversing changes made to 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 143e70ec6228e110cd94a5ae9c56309040c1f1eb Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:57 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.3" This reverts commit 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 138191b0d6bf9e4370fb5126dc2095a3fb122a57 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:16 2019 -0700 Revert "Merge d8be239facee73f3ba7b664154766dbfb8049050 into 54dfee820d107cb897c5aca14131cf7fbde616d7" This reverts commit faae1e56f805e2fd953218be92b2c0d1753a7c3c, reversing changes made to 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 40a77c8365c5273df0bba4fc2b0439db17d247d0 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:44 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.4" This reverts commit 043f6330e7a7fe7a73ac4e406c157f61cf1e7f1c. commit adf5c26c8f7132a6643ecfea116226632173447b Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:42 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.5" This reverts commit 4004f889c28f42535b9cc08d439311b2f5802359. commit e68d497a58e32d26f0d04130895954d7b654c2bf Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:39 2019 -0700 Revert "Fix the builds... (#20)" This reverts commit 745eeda26fafa79fd9110e20647ace54c80d3dab. commit 4cdef1eef22edbcdc9ca86e31846a175b944999e Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:31 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.6" This reverts commit 34a307738806da39704d7f45428920144e0bed53.
2019-03-26 20:54:53 +03:00
let invokeDefault = true;
const subscriptions = Array.from(_backPressSubscriptions.values()).reverse();
for (let i = 0; i < subscriptions.length; ++i) {
if (subscriptions[i]()) {
invokeDefault = false;
break;
}
}
Squashed commit of the following: commit 4c43e301d97042e9eec4401dd81b8ebce053f691 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:49:02 2019 -0700 Squashed commit of the following: commit 862f3fb5d9e3161feab6e5e0e61c7b28e8ac1ef9 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:37 2019 -0700 Revert "Merge 1b12e2caaadf094ce9327deb7e5fe49297e8a115 into 9f1e90947421ad0ea2de1b534117c500dc8c9744" This reverts commit d036bc4c5768d6a3327c5766e1791719cb11693f, reversing changes made to 9f1e90947421ad0ea2de1b534117c500dc8c9744. commit 41477c33c1bcc78f40da00ac7e86ab4dd3f7d062 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:23 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.1" This reverts commit 852df1af0e489063db15d74f0d241ea930778b9c. commit 4993963205e737849e4880309ef86aeac9f2a765 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:16 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.2" This reverts commit 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 41f8beadb2030593208ffc6ff29339991dde3798 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:07 2019 -0700 Revert "Merge 4f3c37886c3f8d0af9571dbed0ec1361d51219a6 into 774513fec948ee5595543e23ab4e7b9cccbdcbf1" This reverts commit a84049078437ce6e0852a30367b4c2d56be7b884, reversing changes made to 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 143e70ec6228e110cd94a5ae9c56309040c1f1eb Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:57 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.3" This reverts commit 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 138191b0d6bf9e4370fb5126dc2095a3fb122a57 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:16 2019 -0700 Revert "Merge d8be239facee73f3ba7b664154766dbfb8049050 into 54dfee820d107cb897c5aca14131cf7fbde616d7" This reverts commit faae1e56f805e2fd953218be92b2c0d1753a7c3c, reversing changes made to 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 40a77c8365c5273df0bba4fc2b0439db17d247d0 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:44 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.4" This reverts commit 043f6330e7a7fe7a73ac4e406c157f61cf1e7f1c. commit adf5c26c8f7132a6643ecfea116226632173447b Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:42 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.5" This reverts commit 4004f889c28f42535b9cc08d439311b2f5802359. commit e68d497a58e32d26f0d04130895954d7b654c2bf Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:39 2019 -0700 Revert "Fix the builds... (#20)" This reverts commit 745eeda26fafa79fd9110e20647ace54c80d3dab. commit 4cdef1eef22edbcdc9ca86e31846a175b944999e Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:31 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.6" This reverts commit 34a307738806da39704d7f45428920144e0bed53.
2019-03-26 20:54:53 +03:00
if (invokeDefault) {
BackHandler.exitApp();
}
});
/**
* Detect hardware button presses for back navigation.
*
* Android: Detect hardware back button presses, and programmatically invoke the default back button
* functionality to exit the app if there are no listeners or if none of the listeners return true.
*
* tvOS: Detect presses of the menu button on the TV remote. (Still to be implemented:
* programmatically disable menu button handling
* functionality to exit the app if there are no listeners or if none of the listeners return true.)
*
* iOS: Not applicable.
*
2019-03-01 21:09:07 +03:00
* macOS: Not applicable.
*
* The event subscriptions are called in reverse order (i.e. last registered subscription first),
* and if one subscription returns true then subscriptions registered earlier will not be called.
*
* Example:
*
* ```javascript
* BackHandler.addEventListener('hardwareBackPress', function() {
* // this.onMainScreen and this.goBack are just examples, you need to use your own implementation here
* // Typically you would use the navigator here to go to the last state.
*
* if (!this.onMainScreen()) {
* this.goBack();
* return true;
* }
* return false;
* });
* ```
*/
Squashed commit of the following: commit 4c43e301d97042e9eec4401dd81b8ebce053f691 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:49:02 2019 -0700 Squashed commit of the following: commit 862f3fb5d9e3161feab6e5e0e61c7b28e8ac1ef9 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:37 2019 -0700 Revert "Merge 1b12e2caaadf094ce9327deb7e5fe49297e8a115 into 9f1e90947421ad0ea2de1b534117c500dc8c9744" This reverts commit d036bc4c5768d6a3327c5766e1791719cb11693f, reversing changes made to 9f1e90947421ad0ea2de1b534117c500dc8c9744. commit 41477c33c1bcc78f40da00ac7e86ab4dd3f7d062 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:23 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.1" This reverts commit 852df1af0e489063db15d74f0d241ea930778b9c. commit 4993963205e737849e4880309ef86aeac9f2a765 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:16 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.2" This reverts commit 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 41f8beadb2030593208ffc6ff29339991dde3798 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:07 2019 -0700 Revert "Merge 4f3c37886c3f8d0af9571dbed0ec1361d51219a6 into 774513fec948ee5595543e23ab4e7b9cccbdcbf1" This reverts commit a84049078437ce6e0852a30367b4c2d56be7b884, reversing changes made to 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 143e70ec6228e110cd94a5ae9c56309040c1f1eb Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:57 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.3" This reverts commit 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 138191b0d6bf9e4370fb5126dc2095a3fb122a57 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:16 2019 -0700 Revert "Merge d8be239facee73f3ba7b664154766dbfb8049050 into 54dfee820d107cb897c5aca14131cf7fbde616d7" This reverts commit faae1e56f805e2fd953218be92b2c0d1753a7c3c, reversing changes made to 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 40a77c8365c5273df0bba4fc2b0439db17d247d0 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:44 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.4" This reverts commit 043f6330e7a7fe7a73ac4e406c157f61cf1e7f1c. commit adf5c26c8f7132a6643ecfea116226632173447b Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:42 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.5" This reverts commit 4004f889c28f42535b9cc08d439311b2f5802359. commit e68d497a58e32d26f0d04130895954d7b654c2bf Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:39 2019 -0700 Revert "Fix the builds... (#20)" This reverts commit 745eeda26fafa79fd9110e20647ace54c80d3dab. commit 4cdef1eef22edbcdc9ca86e31846a175b944999e Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:31 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.6" This reverts commit 34a307738806da39704d7f45428920144e0bed53.
2019-03-26 20:54:53 +03:00
const BackHandler = {
exitApp: function() {
DeviceEventManager.invokeDefaultBackPressHandler();
},
/**
* Adds an event handler. Supported events:
*
* - `hardwareBackPress`: Fires when the Android hardware back button is pressed or when the
* tvOS menu button is pressed.
*/
addEventListener: function(
eventName: BackPressEventName,
handler: Function,
): {remove: () => void} {
Squashed commit of the following: commit 4c43e301d97042e9eec4401dd81b8ebce053f691 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:49:02 2019 -0700 Squashed commit of the following: commit 862f3fb5d9e3161feab6e5e0e61c7b28e8ac1ef9 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:37 2019 -0700 Revert "Merge 1b12e2caaadf094ce9327deb7e5fe49297e8a115 into 9f1e90947421ad0ea2de1b534117c500dc8c9744" This reverts commit d036bc4c5768d6a3327c5766e1791719cb11693f, reversing changes made to 9f1e90947421ad0ea2de1b534117c500dc8c9744. commit 41477c33c1bcc78f40da00ac7e86ab4dd3f7d062 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:23 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.1" This reverts commit 852df1af0e489063db15d74f0d241ea930778b9c. commit 4993963205e737849e4880309ef86aeac9f2a765 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:16 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.2" This reverts commit 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 41f8beadb2030593208ffc6ff29339991dde3798 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:07 2019 -0700 Revert "Merge 4f3c37886c3f8d0af9571dbed0ec1361d51219a6 into 774513fec948ee5595543e23ab4e7b9cccbdcbf1" This reverts commit a84049078437ce6e0852a30367b4c2d56be7b884, reversing changes made to 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 143e70ec6228e110cd94a5ae9c56309040c1f1eb Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:57 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.3" This reverts commit 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 138191b0d6bf9e4370fb5126dc2095a3fb122a57 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:16 2019 -0700 Revert "Merge d8be239facee73f3ba7b664154766dbfb8049050 into 54dfee820d107cb897c5aca14131cf7fbde616d7" This reverts commit faae1e56f805e2fd953218be92b2c0d1753a7c3c, reversing changes made to 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 40a77c8365c5273df0bba4fc2b0439db17d247d0 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:44 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.4" This reverts commit 043f6330e7a7fe7a73ac4e406c157f61cf1e7f1c. commit adf5c26c8f7132a6643ecfea116226632173447b Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:42 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.5" This reverts commit 4004f889c28f42535b9cc08d439311b2f5802359. commit e68d497a58e32d26f0d04130895954d7b654c2bf Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:39 2019 -0700 Revert "Fix the builds... (#20)" This reverts commit 745eeda26fafa79fd9110e20647ace54c80d3dab. commit 4cdef1eef22edbcdc9ca86e31846a175b944999e Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:31 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.6" This reverts commit 34a307738806da39704d7f45428920144e0bed53.
2019-03-26 20:54:53 +03:00
_backPressSubscriptions.add(handler);
return {
Squashed commit of the following: commit 4c43e301d97042e9eec4401dd81b8ebce053f691 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:49:02 2019 -0700 Squashed commit of the following: commit 862f3fb5d9e3161feab6e5e0e61c7b28e8ac1ef9 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:37 2019 -0700 Revert "Merge 1b12e2caaadf094ce9327deb7e5fe49297e8a115 into 9f1e90947421ad0ea2de1b534117c500dc8c9744" This reverts commit d036bc4c5768d6a3327c5766e1791719cb11693f, reversing changes made to 9f1e90947421ad0ea2de1b534117c500dc8c9744. commit 41477c33c1bcc78f40da00ac7e86ab4dd3f7d062 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:23 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.1" This reverts commit 852df1af0e489063db15d74f0d241ea930778b9c. commit 4993963205e737849e4880309ef86aeac9f2a765 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:16 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.2" This reverts commit 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 41f8beadb2030593208ffc6ff29339991dde3798 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:07 2019 -0700 Revert "Merge 4f3c37886c3f8d0af9571dbed0ec1361d51219a6 into 774513fec948ee5595543e23ab4e7b9cccbdcbf1" This reverts commit a84049078437ce6e0852a30367b4c2d56be7b884, reversing changes made to 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 143e70ec6228e110cd94a5ae9c56309040c1f1eb Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:57 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.3" This reverts commit 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 138191b0d6bf9e4370fb5126dc2095a3fb122a57 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:16 2019 -0700 Revert "Merge d8be239facee73f3ba7b664154766dbfb8049050 into 54dfee820d107cb897c5aca14131cf7fbde616d7" This reverts commit faae1e56f805e2fd953218be92b2c0d1753a7c3c, reversing changes made to 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 40a77c8365c5273df0bba4fc2b0439db17d247d0 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:44 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.4" This reverts commit 043f6330e7a7fe7a73ac4e406c157f61cf1e7f1c. commit adf5c26c8f7132a6643ecfea116226632173447b Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:42 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.5" This reverts commit 4004f889c28f42535b9cc08d439311b2f5802359. commit e68d497a58e32d26f0d04130895954d7b654c2bf Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:39 2019 -0700 Revert "Fix the builds... (#20)" This reverts commit 745eeda26fafa79fd9110e20647ace54c80d3dab. commit 4cdef1eef22edbcdc9ca86e31846a175b944999e Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:31 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.6" This reverts commit 34a307738806da39704d7f45428920144e0bed53.
2019-03-26 20:54:53 +03:00
remove: () => BackHandler.removeEventListener(eventName, handler),
};
},
/**
* Removes the event handler.
*/
removeEventListener: function(
eventName: BackPressEventName,
handler: Function,
): void {
Squashed commit of the following: commit 4c43e301d97042e9eec4401dd81b8ebce053f691 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:49:02 2019 -0700 Squashed commit of the following: commit 862f3fb5d9e3161feab6e5e0e61c7b28e8ac1ef9 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:37 2019 -0700 Revert "Merge 1b12e2caaadf094ce9327deb7e5fe49297e8a115 into 9f1e90947421ad0ea2de1b534117c500dc8c9744" This reverts commit d036bc4c5768d6a3327c5766e1791719cb11693f, reversing changes made to 9f1e90947421ad0ea2de1b534117c500dc8c9744. commit 41477c33c1bcc78f40da00ac7e86ab4dd3f7d062 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:23 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.1" This reverts commit 852df1af0e489063db15d74f0d241ea930778b9c. commit 4993963205e737849e4880309ef86aeac9f2a765 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:16 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.2" This reverts commit 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 41f8beadb2030593208ffc6ff29339991dde3798 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:46:07 2019 -0700 Revert "Merge 4f3c37886c3f8d0af9571dbed0ec1361d51219a6 into 774513fec948ee5595543e23ab4e7b9cccbdcbf1" This reverts commit a84049078437ce6e0852a30367b4c2d56be7b884, reversing changes made to 774513fec948ee5595543e23ab4e7b9cccbdcbf1. commit 143e70ec6228e110cd94a5ae9c56309040c1f1eb Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:57 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.3" This reverts commit 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 138191b0d6bf9e4370fb5126dc2095a3fb122a57 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:45:16 2019 -0700 Revert "Merge d8be239facee73f3ba7b664154766dbfb8049050 into 54dfee820d107cb897c5aca14131cf7fbde616d7" This reverts commit faae1e56f805e2fd953218be92b2c0d1753a7c3c, reversing changes made to 54dfee820d107cb897c5aca14131cf7fbde616d7. commit 40a77c8365c5273df0bba4fc2b0439db17d247d0 Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:44 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.4" This reverts commit 043f6330e7a7fe7a73ac4e406c157f61cf1e7f1c. commit adf5c26c8f7132a6643ecfea116226632173447b Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:42 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.5" This reverts commit 4004f889c28f42535b9cc08d439311b2f5802359. commit e68d497a58e32d26f0d04130895954d7b654c2bf Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:39 2019 -0700 Revert "Fix the builds... (#20)" This reverts commit 745eeda26fafa79fd9110e20647ace54c80d3dab. commit 4cdef1eef22edbcdc9ca86e31846a175b944999e Author: REDMOND\acoates <acoates@microsoft.com> Date: Tue Mar 26 10:34:31 2019 -0700 Revert "Applying package update to 0.58.6-microsoft.6" This reverts commit 34a307738806da39704d7f45428920144e0bed53.
2019-03-26 20:54:53 +03:00
_backPressSubscriptions.delete(handler);
},
};
module.exports = BackHandler;